Single Web Host test configuration class
Esempio n. 1
0
        protected void StartWebAppHost(
            SingleWebHostTestConfiguration configuration)
        {
            if (null == configuration)
            {
                throw new ArgumentNullException("configuration");
            }

            this.Config = configuration;

            this.Server = IisExpress.Start(
                configuration.WebHostConfig,
                configuration.AttachDebugger);

            this.HttpClient = new HttpClient
            {
                BaseAddress = new Uri(configuration.ApplicationUri)
            };

            this.Listener = new HttpListenerObservable(configuration.TelemetryListenerUri);
            this.Listener.Start();

            this.EtwSession = new EtwEventSession();
            this.EtwSession.Start();
        }
        protected void StartWebAppHost(
            SingleWebHostTestConfiguration configuration)
        {
            if (null == configuration)
            {
                throw new ArgumentNullException("configuration");
            }

            this.Config = configuration;

            this.Server = IisExpress.Start(
                configuration.WebHostConfig,
                configuration.AttachDebugger);

            this.HttpClient = new HttpClient
            {
                BaseAddress = new Uri(configuration.ApplicationUri)
            };

            this.Listener = new HttpListenerObservable(configuration.TelemetryListenerUri);
            this.Listener.Start();

            this.EtwSession = new EtwEventSession();
            this.EtwSession.Start();
        }