protected override void InternalProcessRecord() { if (this.AlwaysDeleteOutlookRulesBlob.IsPresent) { InboxRuleDataProvider inboxRuleDataProvider = (InboxRuleDataProvider)base.DataSession; inboxRuleDataProvider.SetAlwaysDeleteOutlookRulesBlob(new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError)); } else if (!this.Force.IsPresent) { InboxRuleDataProvider inboxRuleDataProvider = (InboxRuleDataProvider)base.DataSession; inboxRuleDataProvider.ConfirmDeleteOutlookBlob = (() => base.ShouldContinue(Strings.WarningInboxRuleOutlookBlobExists)); } if (this.DataObject.FlaggedForAction != null) { InboxRuleDataProvider.CheckFlaggedAction(this.DataObject.FlaggedForAction, InboxRuleSchema.FlaggedForAction.Name, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError)); } if (this.DataObject.ExceptIfFlaggedForAction != null) { InboxRuleDataProvider.CheckFlaggedAction(this.DataObject.ExceptIfFlaggedForAction, InboxRuleSchema.ExceptIfFlaggedForAction.Name, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError)); } if (this.DataObject.SendTextMessageNotificationTo.Count > 0) { SmsSqmDataPointHelper.AddNotificationConfigDataPoint(SmsSqmSession.Instance, this.adUser.Id, this.adUser.LegacyExchangeDN, SMSNotificationType.Email); } ManageInboxRule.ProcessRecord(new Action(base.InternalProcessRecord), new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError), this.Identity); }
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); } }
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); }