public sealed override Delegate CreateDelegate(Type delegateType, Object target) { if (ReflectionTrace.Enabled) { ReflectionTrace.MethodInfo_CreateDelegate(this, delegateType, target); } return(CreateDelegate(delegateType, target, allowClosedInstanceDelegates: true)); }
// V4.5 api - Creates open or closed delegates over static or instance methods. public sealed override Delegate CreateDelegate(Type delegateType, Object target) { #if ENABLE_REFLECTION_TRACE if (ReflectionTrace.Enabled) { ReflectionTrace.MethodInfo_CreateDelegate(this, delegateType, target); } #endif return(CreateDelegateWorker(delegateType, target, allowClosed: true)); }
public sealed override Delegate CreateDelegate(Type delegateType) { if (ReflectionTrace.Enabled) { ReflectionTrace.MethodInfo_CreateDelegate(this, delegateType); } // Legacy: The only difference between calling CreateDelegate(type) and CreateDelegate(type, null) is that the former // disallows closed instance delegates for V1.1 backward compatibility. return(CreateDelegate(delegateType, null, allowClosedInstanceDelegates: false)); }