public Delegate GetOrCreateConstructorCall(AssembledTypeID typeID, Type delegateType, bool allowNonPublic) { ArgumentUtility.DebugCheckNotNull("delegateType", delegateType); ArgumentUtility.DebugCheckTypeIsAssignableFrom("delegateType", delegateType, typeof(Delegate)); var constructionKey = new ConstructionKey(typeID, delegateType, allowNonPublic); return(_constructorCalls.GetOrAdd(constructionKey, _createConstructorCallFunc)); }
private Delegate CreateConstructorCall(ConstructionKey key) { var assembledType = _typeCache.GetOrCreateType(key.TypeID); return(_constructorDelegateFactory.CreateConstructorCall(key.TypeID.RequestedType, assembledType, key.DelegateType, key.AllowNonPublic)); }