public IntegrationProcessManager()
        {
            IntegrationProcesses = new Dictionary<string, IIntegration>();
            Configuration = new IntegrationConfiguration();
            CommandManagers = new Dictionary<string, CommandsManager>();

            if (File.Exists("config.json"))
            {
                JsonSerializer js = new JsonSerializer();
                js.Formatting = Formatting.Indented;
                using (StreamReader ser = new StreamReader(Environment.CurrentDirectory + Path.DirectorySeparatorChar + "config.json"))
                {
                    using (JsonReader jsr = new JsonTextReader(ser))
                    {
                        Configuration = js.Deserialize<IntegrationConfiguration>(jsr);
                    }
                }
            }
            else
                Configuration = new IntegrationConfiguration();
        }
        public IntegrationProcessManager()
        {
            IntegrationProcesses = new Dictionary <string, IIntegration>();
            Configuration        = new IntegrationConfiguration();
            CommandManagers      = new Dictionary <string, CommandsManager>();

            if (File.Exists("config.json"))
            {
                JsonSerializer js = new JsonSerializer();
                js.Formatting = Formatting.Indented;
                using (StreamReader ser = new StreamReader(Environment.CurrentDirectory + Path.DirectorySeparatorChar + "config.json"))
                {
                    using (JsonReader jsr = new JsonTextReader(ser))
                    {
                        Configuration = js.Deserialize <IntegrationConfiguration>(jsr);
                    }
                }
            }
            else
            {
                Configuration = new IntegrationConfiguration();
            }
        }
Example #3
0
 public OwnerSetup(IntegrationConfiguration conf)
 {
     ConfigurationToApplyTo = conf;
 }