コード例 #1
0
        private void SetRuleWithoutPriorityChange(ADRuleStorageManager storedRules)
        {
            TransportRule     transportRule     = (TransportRule)TransportRuleParser.Instance.GetRule(this.DataObject.Xml);
            HygieneFilterRule hygieneFilterRule = this.CreateTaskRuleFromInternalRule(transportRule, -1);

            this.UpdateRuleFromParameters(hygieneFilterRule);
            this.ValidateRuleEsnCompatibility(hygieneFilterRule);
            transportRule       = hygieneFilterRule.ToInternalRule();
            this.DataObject.Xml = TransportRuleSerializer.Instance.SaveRuleToString(transportRule);
            if (base.Fields.IsModified("Name") && !storedRules.CanRename((ADObjectId)this.DataObject.Identity, ((ADObjectId)this.DataObject.Identity).Name, transportRule.Name))
            {
                base.WriteError(new ArgumentException(Strings.RuleNameAlreadyExist, "Name"), ErrorCategory.InvalidArgument, this.Name);
            }
            base.InternalProcessRecord();
        }