Esempio n. 1
0
 public static bool SiteApplicationExists(this ICakeContext context, string server, ApplicationSettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(WebsiteManager
                .Using(context.Environment, context.Log, manager)
                .ApplicationExists(settings));
     }
 }
Esempio n. 2
0
 public static bool SiteVirtualDirectoryExists(this ICakeContext context, string server, VirtualDirectorySettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(WebsiteManager
                .Using(context.Environment, context.Log, manager)
                .VirtualDirectoryExists(settings));
     }
 }
Esempio n. 3
0
 public static void RemoveSiteApplication(this ICakeContext context, string server, ApplicationSettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         WebsiteManager
         .Using(context.Environment, context.Log, manager)
         .RemoveApplication(settings);
     }
 }
Esempio n. 4
0
 public static void RemoveBinding(this ICakeContext context, string server, string siteName, BindingSettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         WebsiteManager
         .Using(context.Environment, context.Log, manager)
         .RemoveBinding(siteName, settings);
     }
 }
Esempio n. 5
0
 public static void RemoveSiteVirtualDirectory(this ICakeContext context, string server, VirtualDirectorySettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         WebsiteManager
         .Using(context.Environment, context.Log, manager)
         .RemoveVirtualDirectory(settings);
     }
 }
Esempio n. 6
0
 public static bool StartSite(this ICakeContext context, string server, string name)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(WebsiteManager
                .Using(context.Environment, context.Log, manager)
                .Start(name));
     }
 }
Esempio n. 7
0
        public static void AddSiteApplication(this ICakeContext context, string server, ApplicationSettings settings)
        {
            using (ServerManager manager = BaseManager.Connect(server))
            {
                settings.ComputerName = server;

                WebsiteManager
                .Using(context.Environment, context.Log, manager)
                .AddApplication(settings);
            }
        }
Esempio n. 8
0
        public static void AddSiteVirtualDirectory(this ICakeContext context, string server, VirtualDirectorySettings settings)
        {
            using (ServerManager manager = BaseManager.Connect(server))
            {
                settings.ComputerName = server;

                WebsiteManager
                .Using(context.Environment, context.Log, manager)
                .AddVirtualDirectory(settings);
            }
        }
Esempio n. 9
0
        public static void CreateWebsite(this ICakeContext context, string server, WebsiteSettings settings)
        {
            using (ServerManager manager = BaseManager.Connect(server))
            {
                settings.ComputerName = server;

                WebsiteManager
                .Using(context.Environment, context.Log, manager)
                .Create(settings);
            }
        }
Esempio n. 10
0
        public static bool RestartSite(this ICakeContext context, string server, string name)
        {
            using (ServerManager manager = BaseManager.Connect(server))
            {
                WebsiteManager webManager = WebsiteManager.Using(context.Environment, context.Log, manager);

                if (webManager.Stop(name))
                {
                    return(webManager.Start(name));
                }
                else
                {
                    return(false);
                }
            }
        }