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"; }
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)); } }
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; } }
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(); }
public SreEnvironmentConfig GetEnvironmentConfig(int instanceNumber) { return(EnvironmentConfigs.Where(ecf => ((ecf.IsService) && (ecf.InstanceNumber == instanceNumber))).SingleOrDefault()); }