public Delegate GetFieldSetter(FieldInfo info, Type delegateType, Type tElement, Type tField, bool addThisArgForStatic) { Delegate result; var key = new LocalFieldCacheKey(info, delegateType, tElement, tField, addThisArgForStatic); if (!GetCachedDelegate(key, globalFieldSetterCache, localFieldSetterCache, out result)) { result = ReflectionHelper.CreateFieldGetterOrSetter(false, delegateType, info, tElement, tField, !addThisArgForStatic); SetCachedDelegate(key, result, globalFieldSetterCache, localFieldSetterCache); } return(result); }
bool Equals(LocalFieldCacheKey other) { return(addThisArgForStatic == other.addThisArgForStatic && delegateType == other.delegateType && Equals(info, other.info) && tElement == other.tElement && tField == other.tField); }