public void Delete(bool recursive)
 {
     if (PhysicalDirectory.Exists)
     {
         PhysicalDirectory.Delete(recursive);
     }
 }
Beispiel #2
0
 public override void Stop()
 {
     _server.Stop();
     if (RemoveSiteWhenStop)
     {
         PhysicalDirectory.Delete(true);
     }
 }
Beispiel #3
0
        public override void Stop()
        {
            using (var server = new WebServerIIS(_settings))
            {
                var app = server.DefaultWebSite.Applications.FirstOrDefault(a => a.Path == "/" + VirtualPath);
                if (app != null)
                {
                    server.DefaultWebSite.Applications.Remove(app);
                    server.ServerManager.CommitChanges();
                }
                server.Stop();
            }

            if (RemoveSiteWhenStop)
            {
                PhysicalDirectory.Delete(true);
            }
        }