示例#1
0
        ///Gather the ports through the wrapper
        protected override void RegisterPorts()
        {
            if (method == null)
            {
                return;
            }

            if (method.DeclaringType.RTIsValueType() || method.GetParameters().Any(p => p.IsOut))
            {
                RegisterWithPureReflection();
                return;
            }

            //JIT
            try
            {
                reflectedMethodNode = ReflectedMethodNode.Create(method);
                if (reflectedMethodNode != null)
                {
                    reflectedMethodNode.RegisterPorts(this, method, callable);
                }
            }

            //AOT
            catch
            {
                RegisterWithPureReflection();
            }
        }
 ///Gather the ports through the wrapper
 protected override void RegisterPorts()
 {
     if (method == null)
     {
         return;
     }
     reflectedMethodNode = ReflectedMethodNode.Create(method);
     if (reflectedMethodNode != null)
     {
         var options = new ReflectedMethodRegistrationOptions();
         options.callable           = callable;
         options.exposeParams       = exposeParams;
         options.exposedParamsCount = exposedParamsCount;
         reflectedMethodNode.RegisterPorts(this, method, options);
     }
 }