public NativeMethod(NativeModuleBase instance, MethodInfo method)
            {
                var delegateFactory = instance._delegateFactory;

                delegateFactory.Validate(method);
                _invokeDelegate = new Lazy <Action <IReactInstance, JArray> >(() => delegateFactory.Create(instance, method));
                Type            = delegateFactory.GetMethodType(method);
            }
Example #2
0
            public NativeMethod(NativeModuleBase instance, MethodInfo method, ReactMethodAttribute attribute)
            {
                var delegateFactory = instance._delegateFactory;

                delegateFactory.Validate(method, attribute);
                _invokeDelegate = new Lazy <Func <IReactInstance, JArray, JToken> >(() => delegateFactory.Create(instance, method));
                Type            = delegateFactory.GetMethodType(method, attribute);
            }