コード例 #1
0
ファイル: RunAsExtensions.cs プロジェクト: CharlieBP/Topshelf
        public static HostConfigurator RunAs(this HostConfigurator configurator, string username, string password)
        {
            if (configurator == null)
                throw new ArgumentNullException("configurator");

            var runAsConfigurator = new RunAsUserHostConfigurator(username, password);

            configurator.AddConfigurator(runAsConfigurator);

            return configurator;
        }
コード例 #2
0
        public static HostConfigurator RunAs(this HostConfigurator configurator, string username, string password)
        {
            if (configurator == null)
            {
                throw new ArgumentNullException("configurator");
            }

            var runAsConfigurator = new RunAsUserHostConfigurator(username, password);

            configurator.AddConfigurator(runAsConfigurator);

            return(configurator);
        }