public static IApp CreateApp() { var configService = new ConfigService(new FilesConfigProvider("./Config", "yaml"), new YamlConfigSerializer()); if (configService.Get <AppConfig>().Modules.Count == 0) { configService.Get <AppConfig>().Modules.Add(ModuleConfigElement.Create <WebAppInitializerModule>()); } var app = AppBrix.App.Create(configService); app.Start(); return(app); }
public ModuleInfo(IModule module, ModuleConfigElement config) { this.Module = module; this.Config = config; this.Status = config.Status; }
private IModule CreateModule(ModuleConfigElement element) => Type.GetType(element.Type).CreateObject <IModule>();
/// <summary> /// Creates a default application with a specified configuration service. /// Registers the provided module type in the <see cref="AppConfig"/>. /// </summary> /// <typeparam name="T">Type of the <see cref="MainModuleBase"/> to be registered.</typeparam> /// <param name="configService">The configuration service.</param> /// <returns>The created app.</returns> public static IApp Create <T>(IConfigService configService) where T : MainModuleBase, new() { configService.Get <AppConfig>().Modules.Add(ModuleConfigElement.Create <T>()); return(App.Create(configService)); }
private IModule CreateModule(ModuleConfigElement element) { return Type.GetType(element.Type).CreateObject<IModule>(); }
private IModule CreateModule(ModuleConfigElement element) { return(Type.GetType(element.Type).CreateObject <IModule>()); }