Ejemplo n.º 1
0
        public SusSuiteManager(ILogger <SusSuiteCore> logger)
        {
            var susPlugin = new SusSuitePlugin()
            {
                Name       = "SusSuite",
                PluginType = PluginType.Extra
            };

            Logger        = logger;
            LoggerService = new LoggerService(logger, susPlugin);
            PluginManager = new PluginManager(LoggerService);
            SusSuiteCore  = GetSusSuiteCore(susPlugin);

            var validation = new JsonSerializerOptions();

            validation.Converters.Add(new SusSuiteConfigPropertyConverter());

            var serverConfig = SusSuiteCore.ConfigService.GetConfig <SusSuiteConfig>("SusSuiteServer", validation);

            ServerPlugin = new SusSuitePlugin()
            {
                Name        = serverConfig.ServerName,
                PluginColor = serverConfig.ServerColor,
                PluginType  = PluginType.Extra
            };
        }
Ejemplo n.º 2
0
 public LoggerService(ILogger logger, SusSuitePlugin susSuitePlugin)
 {
     _logger = logger;
     _plugin = susSuitePlugin;
 }
Ejemplo n.º 3
0
 public SusSuiteCore(ILogger <SusSuiteCore> logger, SusSuitePlugin susSuitePlugin, SusSuiteManager susSuiteManager)
 {
     LoggerService = new LoggerService(logger, susSuitePlugin);
     ConfigService = new ConfigService(LoggerService, susSuitePlugin);
     PluginService = new PluginService(susSuitePlugin, susSuiteManager);
 }
Ejemplo n.º 4
0
 public SusSuiteCore GetSusSuiteCore(SusSuitePlugin susSuitePlugin)
 {
     return(new SusSuiteCore(Logger, susSuitePlugin, this));
 }
Ejemplo n.º 5
0
 public PluginService(SusSuitePlugin susSuitePlugin, SusSuiteManager susSuiteManager)
 {
     _susSuitePlugin  = susSuitePlugin;
     _susSuiteManager = susSuiteManager;
     _data            = new Dictionary <string, object>();
 }
Ejemplo n.º 6
0
 public ConfigService(LoggerService loggerService, SusSuitePlugin plugin)
 {
     _loggerService = loggerService;
     _plugin        = plugin;
 }