예제 #1
0
 public void AddToModuleBuilder(IReactModuleBuilder moduleBuilder, object module)
 {
     moduleBuilder.AddSyncMethod(MethodName, (IJSValueReader inputReader, IJSValueWriter outputWriter) =>
     {
         MethodImpl.Value(module, inputReader, outputWriter);
     });
 }
        private void AddModuleMembers(IReactModuleBuilder moduleBuilder, object module)
        {
            foreach (var methodInfo in m_methodInfos.Value)
            {
                methodInfo.AddToModuleBuilder(moduleBuilder, module);
            }

            foreach (var syncMethodInfo in m_syncMethodInfos.Value)
            {
                syncMethodInfo.AddToModuleBuilder(moduleBuilder, module);
            }

            foreach (var eventInfo in m_eventInfos.Value)
            {
                eventInfo.AddToModuleBuilder(moduleBuilder, module);
            }

            foreach (var constantInfo in m_constantInfos.Value)
            {
                constantInfo.AddToModuleBuilder(moduleBuilder, module);
            }

            foreach (var constantProviderInfo in m_constantProviderInfos.Value)
            {
                constantProviderInfo.AddToModuleBuilder(moduleBuilder, module);
            }
        }
 public void AddToModuleBuilder(IReactModuleBuilder moduleBuilder, object module)
 {
     moduleBuilder.AddEventHandlerSetter(EventName, (ReactEventHandler eventHandler) =>
     {
         EventImpl.Value(module, eventHandler);
     });
 }
예제 #4
0
 public void AddToModuleBuilder(IReactModuleBuilder moduleBuilder, object module)
 {
     moduleBuilder.AddConstantProvider((IJSValueWriter writer) =>
     {
         writer.WritePropertyName(ConstantName);
         ConstantImpl.Value(module, writer);
     });
 }
예제 #5
0
 public void AddToModuleBuilder(IReactModuleBuilder moduleBuilder, object module)
 {
     moduleBuilder.AddConstantProvider((IJSValueWriter writer) =>
     {
         ReactConstantProvider constantProvider = new ReactConstantProvider(writer);
         ConstantProviderImpl.Value(module, constantProvider);
     });
 }
 public void AddToModuleBuilder(IReactModuleBuilder moduleBuilder, object module)
 {
     moduleBuilder.AddMethod(MethodName, MethodReturnType, (
                                 IJSValueReader inputReader,
                                 IJSValueWriter outputWriter,
                                 MethodResultCallback resolve,
                                 MethodResultCallback reject) =>
     {
         MethodImpl.Value(module, inputReader, outputWriter, resolve, reject);
     });
 }
 public void AddToModuleBuilder(IReactModuleBuilder moduleBuilder, object module)
 {
     moduleBuilder.AddInitializer((IReactContext reactContext) => EventImpl.Value(module, reactContext));
 }