public NatsClient(ILog log, INatsConfig natsConfig) { this.log = log; this.natsHost = natsConfig.Host; this.natsPort = natsConfig.Port; this.natsUser = natsConfig.User; this.natsPassword = natsConfig.Password; uniqueIdentifier = Guid.NewGuid(); log.Debug(Resources.NatsClient_Initialized_Fmt, UniqueIdentifier, natsHost, natsPort); }
public void UseConfig(INatsConfig natsConfig) { if (startAttempted) { throw new InvalidOperationException(Resources.NatsClient_CantChangeConfigAfterStart_Message); } else { this.natsHost = natsConfig.Host; this.natsPort = natsConfig.Port; this.natsUser = natsConfig.User; this.natsPassword = natsConfig.Password; } }
public DeaConfig(INatsConfig natsConfig) { this.deaSection = (DeaSection)ConfigurationManager.GetSection(DeaSection.SectionName); this.localIPAddress = Utility.GetLocalIPAddress(deaSection.LocalRoute, natsConfig.Host); this.filesServiceUri = new Uri(String.Format("http://*****:*****@"SOFTWARE\Microsoft\InetStp")) { iisInstallPath = subKey.GetValue("InstallPath").ToString(); } } appCmdPath = Path.Combine(iisInstallPath, "appcmd.exe"); if (File.Exists(appCmdPath)) { hasAppCmd = true; } else { appCmdPath = null; hasAppCmd = false; } } catch { appCmdPath = null; hasAppCmd = false; } }