コード例 #1
0
        public SchedulerServiceSettings(ILogger l)
        {
            var appSvcIpPort = RegistryConfigurationProvider.GetAppSvcIPPort();
            var tokens       = appSvcIpPort.Split(":".ToCharArray());

            if (tokens == null || tokens.Length != 2)
            {
                throw new Exception("Missing or incorrect application server hostname and port");
            }

            AppSvcHostname = tokens[0];

            ushort appSvcPort;

            AppSvcHostname = tokens[0];
            if (!ushort.TryParse(tokens[1], out appSvcPort))
            {
                l.LogError($"Failed to parse AppSvcIPPort TCP port {tokens[1]} as valid port number (integer between 1 and 65535");
                throw new ArgumentException();
            }
            AppSvcPort = appSvcPort;

            ClientInstanceId = NativeMethods.GetWindowsMachineGuid();
        }
コード例 #2
0
 public string GetServicePassword() => RegistryConfigurationProvider.GetServicePassword();
コード例 #3
0
 public string GetServiceUsername() => RegistryConfigurationProvider.GetServiceUsername();