Esempio n. 1
0
 public void Dispose()
 {
     if (iisProcess != null)
     {
         iisProcess.Dispose();
         iisProcess = null;
     }
 }
Esempio n. 2
0
 public void Dispose()
 {
     if (iisProcess != null)
     {
         iisProcess.Dispose();
         iisProcess = null;
     }
 }
Esempio n. 3
0
 private void StartSite()
 {
     try
     {
         var procId = IISProcessManager.ExecuteProcess(
             App.IISExpressConfig.IISExpressAddress, "/site:\"" + SiteName + "\"");
         ProcessId = procId.ToString();
     }
     catch (Exception)
     {
         Status = SiteStatus.Error;
         throw new InvalidOperationException("Could not start the process!");
     }
     Status = SiteStatus.Running;
 }
Esempio n. 4
0
 private void StopSite()
 {
     try
     {
         IISProcessManager.ExecuteProcess("taskkill", "/pid "
                                          + ProcessId);
         ProcessId = NOT_FOUND;
     }
     catch (Exception)
     {
         Status = SiteStatus.Error;
         throw new InvalidOperationException("Could not start the process!");
     }
     Status = SiteStatus.Stopped;
 }
Esempio n. 5
0
        public void RefreshSiteList()
        {
            var iisSites = IISConfigReader.ReadXmlFromConfig(App.IISExpressConfig);

            IISProcessManager.AssignProcessIds(iisSites);
            Sites.Clear();
            foreach (var site in iisSites)
            {
                Sites.Add(site);
            }
            Sites.ResetBindings();
            _eventAggregator.Publish(new BalloonNotificationEvent
            {
                Title   = "Refresh",
                Message = "List of sites was refreshsed"
            });
        }