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)); } }
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); } }