Example #1
0
 public static bool RuleExists(this ICakeContext context, string server, string name)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         return(RewriteManager
                .Using(context.Environment, context.Log, manager)
                .Exists(name));
     }
 }
Example #2
0
 public static void CreateRewriteRule(this ICakeContext context, string server, RewriteRuleSettings settings)
 {
     using (ServerManager manager = BaseManager.Connect(server))
     {
         RewriteManager
         .Using(context.Environment, context.Log, manager)
         .CreateRule(settings);
     }
 }