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(); }
static Comparison() { _equalityCache = new ConcurrentTypeCache <IEqualityComparer>(); }
static Cloner() { _cloneMethods = new ConcurrentTypeCache <MethodInfo>(); _objectCloneMethods = new ConcurrentTypeCache <CloneDelegate <object?> >(); }