private void ValidateParameters()
 {
     if (base.Fields.IsModified("FolderToReadEmailsFrom"))
     {
         this.mailboxFolder = ManageInboxRule.ResolveMailboxFolder(this.FolderToReadEmailsFrom, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADUser>), new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <MailboxFolder>), base.TenantGlobalCatalogSession, base.SessionSettings, this.DataObject, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
 }
Exemple #2
0
 private void PrepareDataObjectFromParameters(InboxRule inboxRule)
 {
     if (base.Fields.IsModified(InboxRuleSchema.From))
     {
         inboxRule.From = ManageInboxRule.ResolveRecipients(this.From, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.ExceptIfFrom))
     {
         inboxRule.ExceptIfFrom = ManageInboxRule.ResolveRecipients(this.ExceptIfFrom, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.HasClassification))
     {
         inboxRule.HasClassification = ManageInboxRule.ResolveMessageClassifications(this.HasClassification, this.ConfigurationSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.ExceptIfHasClassification))
     {
         inboxRule.ExceptIfHasClassification = ManageInboxRule.ResolveMessageClassifications(this.ExceptIfHasClassification, this.ConfigurationSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.SentTo))
     {
         inboxRule.SentTo = ManageInboxRule.ResolveRecipients(this.SentTo, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.ExceptIfSentTo))
     {
         inboxRule.ExceptIfSentTo = ManageInboxRule.ResolveRecipients(this.ExceptIfSentTo, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.CopyToFolder))
     {
         inboxRule.CopyToFolder = ManageInboxRule.ResolveMailboxFolder(this.CopyToFolder, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADUser>), new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <MailboxFolder>), base.TenantGlobalCatalogSession, base.SessionSettings, this.adUser, (base.ExchangeRunspaceConfig == null) ? null : base.ExchangeRunspaceConfig.SecurityAccessToken, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.ForwardAsAttachmentTo))
     {
         inboxRule.ForwardAsAttachmentTo = ManageInboxRule.ResolveRecipients(this.ForwardAsAttachmentTo, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.ForwardTo))
     {
         inboxRule.ForwardTo = ManageInboxRule.ResolveRecipients(this.ForwardTo, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.MoveToFolder))
     {
         inboxRule.MoveToFolder = ManageInboxRule.ResolveMailboxFolder(this.MoveToFolder, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADUser>), new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <MailboxFolder>), base.TenantGlobalCatalogSession, base.SessionSettings, this.adUser, (base.ExchangeRunspaceConfig == null) ? null : base.ExchangeRunspaceConfig.SecurityAccessToken, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.RedirectTo))
     {
         inboxRule.RedirectTo = ManageInboxRule.ResolveRecipients(this.RedirectTo, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <ADRecipient>), base.TenantGlobalCatalogSession, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.FromSubscription))
     {
         inboxRule.FromSubscription = ManageInboxRule.ResolveSubscriptions(this.FromSubscription, this.adUser, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
     if (base.Fields.IsModified(InboxRuleSchema.ExceptIfFromSubscription))
     {
         inboxRule.ExceptIfFromSubscription = ManageInboxRule.ResolveSubscriptions(this.ExceptIfFromSubscription, this.adUser, new ManageInboxRule.ThrowTerminatingErrorDelegate(base.WriteError));
     }
 }