Пример #1
0
 public void StopWebServer()
 {
     if (_iisExpress != null) {
         _iisExpress.Dispose();
         _iisExpress = null;
     }
 }
Пример #2
0
        public void StartWebServer()
        {
            if (IISExpressDriver.GetIISExpressPath() == null) {
                Assert.Ignore("IIS Express is not installed.");
                return;
            }

            // ReSharper disable AssignNullToNotNullAttribute
            var applicationPath =
                Path.GetFullPath(Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), @"..\..\..\NuUpdate.NuGetTestServer"));
            // ReSharper restore AssignNullToNotNullAttribute

            _iisExpress = new IISExpressDriver();
            _iisExpress.Start(applicationPath, Port);
        }