Beispiel #1
0
        private static bool IsSetupRequested(StreamWatchOptions options)
        {
            if (options.Install)
            {
                WindowsServiceInstaller.RuntimeInstall <StreamWatchWindowsService>();
            }
            else if (options.Uninstall)
            {
                WindowsServiceInstaller.RuntimeUnInstall <StreamWatchWindowsService>();
            }
            else
            {
                return(false);
            }

            return(true);
        }
        private StartOptions CreateStartOptions(StreamWatchOptions options)
        {
            var url = new UriBuilder(Uri.UriSchemeHttp, "localhost", options.Port);

            return(new StartOptions(url.Uri.AbsoluteUri));
        }
 private void ConfigureApi(StreamWatchOptions options)
 {
     this.server = WebApp.Start <Startup>(this.CreateStartOptions(options));
 }