internal static void AddAttributedModules(this IReactPackageBuilder packageBuilder) { foreach (var type in typeof(ReactPackageBuilderExtensions).GetTypeInfo().Assembly.GetTypes()) { var moduleAttribute = type.GetTypeInfo().GetCustomAttribute <ReactModuleAttribute>(); if (moduleAttribute != null) { ReactModuleInfo moduleInfo = ReactModuleInfo.GetOrAddModuleInfo(type, moduleAttribute); packageBuilder.AddModule(moduleInfo.ModuleName, moduleInfo.ModuleProvider); } } }
public void AddToPackageBuilder(IReactPackageBuilder packageBuilder) { ReactModuleInfo moduleInfo = ReactModuleInfo.GetOrAddModuleInfo(ModuleType, ModuleAttribute); packageBuilder.AddModule(moduleInfo.ModuleName, moduleInfo.ModuleProvider); }