public override bool Execute()
        {
            bool flag;

            try
            {
                RuleSet ruleSet = RuleLoader.LoadRuleFromFile(this.PolicyFileName, this.PolicyName);
                if ((this.databaseName != string.Empty) && (this.serverName != string.Empty))
                {
                    RuleLoader.DeployRuleSet(ruleSet, this.serverName, this.databaseName, base.Log, this.deploy);
                }
                else
                {
                    RuleLoader.DeployRuleSet(ruleSet, string.Empty, string.Empty, base.Log, this.deploy);
                }
                flag = true;
            }
            catch
            {
                throw;
            }
            base.Log.LogMessage("", new object[] { });
            return(flag);
        }
示例#2
0
 public override bool Execute()
 {
     RuleLoader.UnDeployRuleSet(this.policyName, this.serverName, this.databaseName, base.Log);
     base.Log.LogMessage("", new object[] { });
     return(true);
 }