예제 #1
0
 public void LoadDefaultConfigs()
 {
     EnvironmentConfigs.Clear();
     EnvironmentConfigs.Add(new SreEnvironmentConfig(this, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "idped.exe"), 0, false));
     EnvironmentConfigs.Add(new SreEnvironmentConfig(this, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "idpe.exe")));
     EnvironmentConfigsInstancesOnly[0].RemoteUrl = "net.tcp://localhost:7200/srees";
 }
예제 #2
0
        public void CheckAdditionalInstances(string remoteUrl)
        {
            int instances = GetNumberOfInstances(remoteUrl);

            for (int i = 1; i < instances; i++)
            {
                EnvironmentConfigs.Add(new SreEnvironmentConfig(this, Path.Combine(RootFolder, "idpe" + i + ".exe"), i));
            }
        }
예제 #3
0
        public void SetEnvironmentConfigsPath()
        {
            foreach (SreEnvironmentConfig config in EnvironmentConfigs)
            {
                config.ConfigFileName = Path.Combine(RootFolder, Path.GetFileName(config.ConfigFileName));
            }


            if ((EnvironmentConfigs.Where(c => c.DisplayName == "Configurator").SingleOrDefault() != null) &&
                (EnvironmentConfigsInstancesOnly.Where(ce => ce.InstanceNumber == 0).SingleOrDefault() != null))
            {
                EnvironmentConfigs.Where(c => c.DisplayName == "Configurator").SingleOrDefault().RemoteUrl = EnvironmentConfigsInstancesOnly.Where(ce => ce.InstanceNumber == 0).SingleOrDefault().RemoteUrl;
            }
        }
예제 #4
0
        static void Main(string[] args)
        {
            var env = new EnvironmentConfigs();

            IConfigurationRoot configuration = env.InitializedEnvironmentConfigs();

            ConsumerOptions consumerOptions = env.GetOptions(configuration);

            ContainerBuilder builder = new DependenciesConfigs().InitializedDependencies(configuration, consumerOptions);

            new DependenciesConfigs().StartUpConfigurations(builder, consumerOptions);

            new DependenciesConfigs().RunConsumer(builder).GetAwaiter().GetResult();
        }
예제 #5
0
 public SreEnvironmentConfig GetEnvironmentConfig(int instanceNumber)
 {
     return(EnvironmentConfigs.Where(ecf => ((ecf.IsService) && (ecf.InstanceNumber == instanceNumber))).SingleOrDefault());
 }