Exemple #1
0
        /// <summary>
        /// Creates a new instance of the <see cref="WebFarmManager" /> class.
        /// </summary>
        /// <param name="environment">The environment.</param>
        /// <param name="log">The log.</param>
        /// <param name="server">The <see cref="ServerManager" /> to connect to.</param>
        /// <returns>a new instance of the <see cref="WebFarmManager" />.</returns>
        public static WebFarmManager Using(ICakeEnvironment environment, ICakeLog log, ServerManager server)
        {
            WebFarmManager manager = new WebFarmManager(environment, log);

            manager.SetServer(server);

            return(manager);
        }
Exemple #2
0
            public static WebFarmManager Using(ICakeEnvironment environment, ICakeLog log, ServerManager server)
            {
                WebFarmManager manager = new WebFarmManager(environment, log);
            
                manager.SetServer(server);

                return manager;
            }
 public static bool DeleteWebFarm(this ICakeContext context, string server, string name)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(WebFarmManager
                .Using(context.Environment, context.Log, manager)
                .Delete(name));
     }
 }
 public static void CreateWebFarm(this ICakeContext context, string server, WebFarmSettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         WebFarmManager
         .Using(context.Environment, context.Log, manager)
         .Create(settings);
     }
 }
 public static string GetServerState(this ICakeContext context, string server, string farm, string address)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(WebFarmManager
                .Using(context.Environment, context.Log, manager)
                .GetServerState(farm, address));
     }
 }
 public static void SetServerUnavailable(this ICakeContext context, string server, string farm, string address)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         WebFarmManager
         .Using(context.Environment, context.Log, manager)
         .SetServerUnavailable(farm, address);
     }
 }
 public static bool AddServer(this ICakeContext context, string server, string farm, WebFarmServerSettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(WebFarmManager
                .Using(context.Environment, context.Log, manager)
                .AddServer(farm, settings));
     }
 }