// Token: 0x06000F19 RID: 3865 RVA: 0x0005A248 File Offset: 0x00058448 public static void SyncAndWaitForCompletion(Guid mailboxGuid, OrganizationId organizationId, IXSOFactory xsoFactory, IPublicFolderMailboxLoggerBase logger, ISplitOperationState splitOperationState) { ExchangePrincipal contentMailboxPrincipal; if (!PublicFolderSession.TryGetPublicFolderMailboxPrincipal(organizationId, mailboxGuid, false, out contentMailboxPrincipal)) { throw new ObjectNotFoundException(ServerStrings.PublicFolderMailboxNotFound); } PublicFolderSyncJobState publicFolderSyncJobState = PublicFolderSyncJobRpc.StartSyncHierarchy(contentMailboxPrincipal, true); int num = 0; while (publicFolderSyncJobState.JobStatus != PublicFolderSyncJobState.Status.Completed && publicFolderSyncJobState.LastError == null && (double)num++ < PublicFolderSplitConfig.Instance.TimeoutForSynchronousOperation.TotalMilliseconds / PublicFolderSplitConfig.Instance.QuerySyncStatusInterval.TotalMilliseconds) { Thread.Sleep(PublicFolderSplitConfig.Instance.QuerySyncStatusInterval.Milliseconds); publicFolderSyncJobState = PublicFolderSyncJobRpc.QueryStatusSyncHierarchy(contentMailboxPrincipal); } bool flag; if (publicFolderSyncJobState.JobStatus != PublicFolderSyncJobState.Status.Completed || PublicFolderSplitHelper.IsSyncRequired(mailboxGuid, organizationId, out flag, xsoFactory, logger)) { splitOperationState.Error = new SyncInProgressException(organizationId.OrganizationalUnit.Name, mailboxGuid.ToString()); return; } if (PublicFolderSplitHelper.HasSyncFailure(publicFolderSyncJobState)) { splitOperationState.Error = publicFolderSyncJobState.LastError; } }
// Token: 0x06000F5F RID: 3935 RVA: 0x0005B8C8 File Offset: 0x00059AC8 private void SyncAndReturn(Guid mailboxGuid) { this.splitOperationState.PartialStep = true; ExchangePrincipal contentMailboxPrincipal; if (!PublicFolderSession.TryGetPublicFolderMailboxPrincipal(base.CurrentPublicFolderSession.OrganizationId, mailboxGuid, false, out contentMailboxPrincipal)) { throw new ObjectNotFoundException(ServerStrings.PublicFolderMailboxNotFound); } PublicFolderSyncJobState publicFolderSyncJobState = PublicFolderSyncJobRpc.StartSyncHierarchy(contentMailboxPrincipal, false); if (PublicFolderSplitHelper.HasSyncFailure(publicFolderSyncJobState)) { this.splitOperationState.Error = publicFolderSyncJobState.LastError; return; } if ((int)this.splitOperationState.PartialStepCount > PrepareTargetMailboxOperation.PartialStepIterationLimit) { this.splitOperationState.Error = new PartialStepsOverLimitException("Long running sync operation", PrepareTargetMailboxOperation.PartialStepIterationLimit); } }