Exemplo n.º 1
0
 static Formatter()
 {
     _tryFormatCache = new ConcurrentTypeCache <TryFormatSig <object?> >();
     _formatCache    = new ConcurrentTypeCache <FormatSig <object?> >();
     TryFormatMethod = typeof(Formatter).GetMethod(nameof(TryFormat),
                                                   BindingFlags.Public | BindingFlags.Static)
                       .ThrowIfNull();
     FormatMethod = typeof(Formatter).GetMethod(nameof(Format),
                                                BindingFlags.Public | BindingFlags.Static)
                    .ThrowIfNull();
 }
Exemplo n.º 2
0
 static Comparison()
 {
     _equalityCache = new ConcurrentTypeCache <IEqualityComparer>();
 }
Exemplo n.º 3
0
 static Cloner()
 {
     _cloneMethods       = new ConcurrentTypeCache <MethodInfo>();
     _objectCloneMethods = new ConcurrentTypeCache <CloneDelegate <object?> >();
 }