예제 #1
0
        public DelegateCreationInfo GetDelegateCtor(TypeDesc delegateType, MethodDesc target, bool followVirtualDispatch)
        {
            // If we're creating a delegate to a virtual method that cannot be overriden, devirtualize.
            // This is not just an optimization - it's required for correctness in the presence of sealed
            // vtable slots.
            if (followVirtualDispatch && (target.IsFinal || target.OwningType.IsSealed()))
            {
                followVirtualDispatch = false;
            }

            return(DelegateCreationInfo.Create(delegateType, target, NodeFactory, followVirtualDispatch));
        }
예제 #2
0
 public DelegateCreationInfo GetDelegateCtor(TypeDesc delegateType, MethodDesc target, bool followVirtualDispatch)
 {
     return(DelegateCreationInfo.Create(delegateType, target, NodeFactory, followVirtualDispatch));
 }
예제 #3
0
 public DelegateCreationInfo GetDelegateCtor(TypeDesc delegateType, MethodDesc target)
 {
     return(DelegateCreationInfo.Create(delegateType, target, NodeFactory));
 }