示例#1
0
 protected override void InternalProcessRecord()
 {
     if (this.FromMessageId != null)
     {
         if (!base.HasErrors)
         {
             this.WriteResult(this.DataObject);
         }
     }
     else
     {
         InboxRuleDataProvider inboxRuleDataProvider = (InboxRuleDataProvider)base.DataSession;
         if (this.AlwaysDeleteOutlookRulesBlob.IsPresent)
         {
             inboxRuleDataProvider.SetAlwaysDeleteOutlookRulesBlob(new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
         }
         else if (!inboxRuleDataProvider.IsAlwaysDeleteOutlookRulesBlob())
         {
             if (!inboxRuleDataProvider.HandleOutlookBlob(this.Force, () => base.ShouldContinue(Strings.WarningInboxRuleOutlookBlobExists)))
             {
                 return;
             }
         }
         ManageInboxRule.ProcessRecord(new Action(base.InternalProcessRecord), new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError), this.Name);
     }
     if (this.DataObject.SendTextMessageNotificationTo.Count > 0)
     {
         SmsSqmDataPointHelper.AddNotificationConfigDataPoint(SmsSqmSession.Instance, this.adUser.Id, this.adUser.LegacyExchangeDN, SMSNotificationType.Email);
     }
 }
示例#2
0
        protected override void InternalProcessRecord()
        {
            InboxRuleDataProvider inboxRuleDataProvider = (InboxRuleDataProvider)base.DataSession;

            if (this.AlwaysDeleteOutlookRulesBlob.IsPresent)
            {
                inboxRuleDataProvider.SetAlwaysDeleteOutlookRulesBlob(new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
            }
            else if (!inboxRuleDataProvider.IsAlwaysDeleteOutlookRulesBlob() && !inboxRuleDataProvider.HandleOutlookBlob(this.Force, () => base.ShouldContinue(Strings.WarningInboxRuleOutlookBlobExists)))
            {
                return;
            }
            ManageInboxRule.ProcessRecord(new Action(base.InternalProcessRecord), new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError), this.Identity);
        }