Skip to content

Instantly share code, notes, and snippets.

Marek Safar marek-safar

Block or report user

Report or block marek-safar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:482d13a21daebfc73393a73253f0ac8a
./Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ZeroInitialize.cs: public override object Object => Activator.CreateInstance(Type.AssociatedSystemType);
./Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs: return CreateConstant(type, ConstVal.Get(Activator.CreateInstance(type.AssociatedSystemType)));
./System.Data.OleDb/src/OleDbEnumerator.cs: object value = Activator.CreateInstance(type, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
./System.Data.OleDb/src/OleDbWrapper.cs: // DataLinks (the unknown parameter) is created via Activator.CreateInstance outside of the SafeHandle
./System.Data.OleDb/src/OleDbConnectionInternal.cs: return Activator.CreateInstance(datalink, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
./System.Linq.Queryable/src/System/
View gist:19e0af908a30404a91b551ce7c182290
[Serializable]
[DebuggerDisplay ("{v,nq}")]
public unsafe struct nfloat : IFormattable, IConvertible, IComparable, IComparable<nfloat>, IEquatable <nfloat>
{
internal nfloat (nfloat v) { this.v = v.v; }
public nfloat (Single v) { this.v = v; }
#if ARCH_32
public static readonly int Size = 4;
View gist:c8757098a0269f83ee10e431f6ebc494
using System;
class Sample
{
protected static int origRow;
protected static int origCol;
protected static void WriteAt(string s, int x, int y)
{
Console.Write(" " + s);
View gist:8df9195911ba3c92c8c57b8a0d2b50da
{
"payload" :
{
"protocol_version" : "0.0.4",
"configuration" : {
"version" : "(6.4.0.179) (2019-06/3608a495413)",
"tlc" : "normal",
"sigsgev" : "altstack",
"notifications" : "kqueue",
"architecture" : "amd64",
View gist:ba4c1a7a7087d77a9341d8ff36515493
IEnumerator<ConstructorInfo> e = typeInfo.DeclaredConstructors.GetEnumerator();
do {
ConstructorInfo constructorInfo = e.Current();
if (!constructorInfo.IsStatic && constructorInfo.GetParameters.Length() == 0) {
inst = constructorInfo.Invoke(null);
break;
}
} while (e.MoveNext())
View gist:7ab38b550cdb71dba987c00480f7bfa0
IEnumerator<ConstructorInfo> e = typeInfo.DeclaredConstructors.GetEnumerator();
do {
ConstructorInfo constructorInfo = e.Current();
if (!constructorInfo.IsStatic && constructorInfo.GetParameters.Length() == 0) {
inst = constructorInfo.Invoke(null);
break;
}
} while (e.MoveNext())
View gist:ab2938a963b1b7ee685dc61a54ee2efb
mscorlib.dll
Microsoft.Win32.RegistryKey
.ctor
CreateSubKey
FromHandle
GetSubKeyNames
GetValue
GetAccessControl
GetValueKind
View gist:60b3fa6b5ceb779aa67f0d88790fe99a
## mscorlib
Microsoft.Win32.RegistryKey
.ctor
CreateSubKey
CreateSubKey
CreateSubKey
CreateSubKey
CreateSubKey
CreateSubKey
View gist:542d7f536f37228107ba774e0e4ce59e
Mono: DllImport searching in: 'System.IO.Compression.Native' ('/Users/marek/git/my/trees/build-fixes/netcore/corefx/packages/runtime.osx-x64.microsoft.private.corefx.netcoreapp/4.6.0-preview7.19305.1/runtimes/osx-x64/native/System.IO.Compression.Native.dylib').
Mono: Searching for 'CompressionNative_Inflate'.
Mono: Probing 'CompressionNative_Inflate'.
Mono: Found as 'CompressionNative_Inflate'.
Process 40137 stopped
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x5a274e0)
frame #0: 0x00007fff72eafac4 libz.1.dylib`inflate + 848
libz.1.dylib`inflate:
-> 0x7fff72eafac4 <+848>: movzbl (%r12), %edx
0x7fff72eafac9 <+853>: incq %r12
View gist:1ccb9e7a67b710d8aed909f6febdd7e6
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests/Mono.Linker.Tests.csproj
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj
Sequence contains no matching element
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests/Mono.Linker.Tests.csproj
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
Getting restore information for project /Users/marek/git/my/linker/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj
Getting restore information for project /U
You can’t perform that action at this time.