示例#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
            };
        }
示例#2
0
 public LoggerService(ILogger logger, SusSuitePlugin susSuitePlugin)
 {
     _logger = logger;
     _plugin = susSuitePlugin;
 }
示例#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);
 }
示例#4
0
 public SusSuiteCore GetSusSuiteCore(SusSuitePlugin susSuitePlugin)
 {
     return(new SusSuiteCore(Logger, susSuitePlugin, this));
 }
示例#5
0
 public PluginService(SusSuitePlugin susSuitePlugin, SusSuiteManager susSuiteManager)
 {
     _susSuitePlugin  = susSuitePlugin;
     _susSuiteManager = susSuiteManager;
     _data            = new Dictionary <string, object>();
 }
示例#6
0
 public ConfigService(LoggerService loggerService, SusSuitePlugin plugin)
 {
     _loggerService = loggerService;
     _plugin        = plugin;
 }