示例#1
0
 internal MultiValuedProperty <SmtpAddress> GetUpdatedNotificationEmails(MultiValuedProperty <SmtpAddress> originalEmails)
 {
     return(MigrationObjectTaskBase <TIdentityParameter> .GetUpdatedNotificationEmails(this, base.TenantGlobalCatalogSession, originalEmails));
 }
示例#2
0
        protected override void InternalProcessRecord()
        {
            MigrationBatchDataProvider batchProvider = (MigrationBatchDataProvider)base.DataSession;
            bool flag         = batchProvider.MigrationSession.Config.IsSupported(MigrationFeature.PAW);
            bool flag2        = false;
            bool updateEmails = false;
            bool flag3        = false;
            bool flag4        = false;

            if (flag && this.ReportInterval != null)
            {
                this.DataObject.ReportInterval = new TimeSpan?(this.ReportInterval.Value);
                flag2 = true;
            }
            if (base.Fields.IsModified("NotificationEmails"))
            {
                MultiValuedProperty <SmtpAddress> updatedNotificationEmails = MigrationObjectTaskBase <MigrationBatchIdParameter> .GetUpdatedNotificationEmails(this, base.TenantGlobalCatalogSession, this.NotificationEmails);

                if (updatedNotificationEmails != null && updatedNotificationEmails.Count != 0)
                {
                    this.DataObject.NotificationEmails = updatedNotificationEmails;
                    flag2        = true;
                    updateEmails = true;
                }
            }
            if (base.Fields.IsModified("AllowUnknownColumnsInCsv"))
            {
                this.DataObject.AllowUnknownColumnsInCsv = this.AllowUnknownColumnsInCsv;
                flag2 = true;
            }
            if (this.CSVData != null)
            {
                this.InternalProcessCsv(batchProvider);
                flag2 = true;
            }
            if (this.AllowIncrementalSyncs != null)
            {
                if (!this.AllowIncrementalSyncs.Value)
                {
                    this.DataObject.BatchFlags |= MigrationBatchFlags.AutoStop;
                }
                else
                {
                    this.DataObject.BatchFlags &= ~MigrationBatchFlags.AutoStop;
                }
                flag2 = true;
            }
            if (base.IsFieldSet("UseAdvancedValidation"))
            {
                if (this.UseAdvancedValidation)
                {
                    this.DataObject.BatchFlags |= MigrationBatchFlags.UseAdvancedValidation;
                }
                else
                {
                    this.DataObject.BatchFlags &= ~MigrationBatchFlags.UseAdvancedValidation;
                }
                flag2 = true;
            }
            if (this.AutoRetryCount != null)
            {
                this.DataObject.AutoRetryCount = this.AutoRetryCount;
                flag2 = true;
            }
            if (base.IsFieldSet("BadItemLimit") && !this.BadItemLimit.Equals(this.DataObject.BadItemLimit))
            {
                this.DataObject.BadItemLimit = this.BadItemLimit;
                flag3 = true;
                flag2 = true;
            }
            if (base.IsFieldSet("LargeItemLimit") && !this.LargeItemLimit.Equals(this.DataObject.LargeItemLimit))
            {
                this.DataObject.LargeItemLimit = this.LargeItemLimit;
                flag3 = true;
                flag2 = true;
            }
            if (base.IsFieldSet("StartAfter"))
            {
                this.DataObject.StartAfter    = this.StartAfter;
                this.DataObject.StartAfterUTC = (DateTime?)MigrationHelper.GetUniversalDateTime((ExDateTime?)this.StartAfter);
                flag3 = true;
                flag2 = true;
                flag4 = true;
            }
            if (base.IsFieldSet("CompleteAfter"))
            {
                DateTime?completeAfterUTC = (DateTime?)MigrationHelper.GetUniversalDateTime((ExDateTime?)this.CompleteAfter);
                this.DataObject.CompleteAfter    = this.CompleteAfter;
                this.DataObject.CompleteAfterUTC = completeAfterUTC;
                flag3 = true;
                flag2 = true;
                flag4 = true;
            }
            if (base.IsFieldSet("SourcePublicFolderDatabase"))
            {
                this.DataObject.SourcePublicFolderDatabase = this.SourcePublicFolderDatabase.RawIdentity;
                flag2 = true;
                flag4 = true;
                flag3 = true;
            }
            if (flag3)
            {
                this.DataObject.SubscriptionSettingsModified = (DateTime)ExDateTime.UtcNow;
            }
            if (flag2)
            {
                MigrationHelper.RunUpdateOperation(delegate
                {
                    batchProvider.MigrationJob.UpdateJob(batchProvider.MailboxProvider, updateEmails, this.DataObject);
                });
                batchProvider.MigrationJob.ReportData.Append(Strings.MigrationReportJobModifiedByUser(base.ExecutingUserIdentityName));
                this.changed = true;
                if (flag4)
                {
                    MigrationObjectTaskBase <MigrationBatchIdParameter> .RegisterMigrationBatch(this, batchProvider.MailboxSession, base.CurrentOrganizationId, false, false);
                }
            }
            base.InternalProcessRecord();
        }