Exemplo n.º 1
0
 public void Dispose()
 {
     if (iisProcess != null)
     {
         iisProcess.Dispose();
         iisProcess = null;
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     if (iisProcess != null)
     {
         iisProcess.Dispose();
         iisProcess = null;
     }
 }
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo 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"
            });
        }