예제 #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();
 }
예제 #2
0
 static Comparison()
 {
     _equalityCache = new ConcurrentTypeCache <IEqualityComparer>();
 }
예제 #3
0
파일: Cloner.cs 프로젝트: Dissolution/Jay
 static Cloner()
 {
     _cloneMethods       = new ConcurrentTypeCache <MethodInfo>();
     _objectCloneMethods = new ConcurrentTypeCache <CloneDelegate <object?> >();
 }