// Token: 0x060001D4 RID: 468 RVA: 0x00006D20 File Offset: 0x00004F20 private AnchorDataProvider(AnchorContext anchorContext, AnchorADProvider activeDirectoryProvider, MailboxSession mailboxSession, AnchorFolder folder, bool ownSession) { AnchorUtil.ThrowOnNullArgument(anchorContext, "anchorContext"); AnchorUtil.ThrowOnNullArgument(activeDirectoryProvider, "activeDirectoryProvider"); AnchorUtil.ThrowOnNullArgument(mailboxSession, "mailboxSession"); AnchorUtil.ThrowOnNullArgument(folder, "folder"); this.anchorContext = anchorContext; this.activeDirectoryProvider = activeDirectoryProvider; this.MailboxSession = mailboxSession; this.folder = folder; this.ownSession = ownSession; }
// Token: 0x0600006F RID: 111 RVA: 0x000039F4 File Offset: 0x00001BF4 public IEnumerable <BatchCreatorScheduler.MigrationMailbox> GetMailboxes(IAnchorADProvider adProvider) { if (this.LastRefreshed + this.Context.Config.GetConfig <TimeSpan>("MigrationMailboxRefreshInterval") < DateTime.UtcNow) { this.Context.Logger.Log(MigrationEventType.Information, "refreshing migration mailboxes", new object[0]); ADUser[] array = AnchorADProvider.GetRootOrgProvider(this.Context).GetOrganizationMailboxesByCapability(OrganizationCapability.Migration).ToArray <ADUser>(); Dictionary <Guid, BatchCreatorScheduler.MigrationMailbox> dictionary = new Dictionary <Guid, BatchCreatorScheduler.MigrationMailbox>(array.Length); foreach (ADUser aduser in array) { DateTime lastRefreshed = DateTime.MinValue; BatchCreatorScheduler.MigrationMailbox migrationMailbox; if (this.MigrationMailboxes.TryGetValue(aduser.ExchangeGuid, out migrationMailbox)) { lastRefreshed = migrationMailbox.LastRefreshed; } dictionary[aduser.ExchangeGuid] = new BatchCreatorScheduler.MigrationMailbox(aduser, lastRefreshed); } this.MigrationMailboxes = dictionary; this.LastRefreshed = DateTime.UtcNow; } return(from x in this.MigrationMailboxes.Values orderby x.LastRefreshed, x.User.ExchangeGuid select x); }
// Token: 0x060001EA RID: 490 RVA: 0x00007478 File Offset: 0x00005678 private static AnchorDataProvider CreateProviderForMailboxSession(AnchorContext context, AnchorADProvider activeDirectoryProvider, string folderName, Func <ExchangePrincipal, MailboxSession> mailboxSessionCreator) { AnchorUtil.ThrowOnNullArgument(mailboxSessionCreator, "mailboxSessionCreator"); AnchorDataProvider result; using (DisposeGuard disposeGuard = default(DisposeGuard)) { ExchangePrincipal mailboxOwner = activeDirectoryProvider.GetMailboxOwner(AnchorDataProvider.GetMailboxFilter(context.AnchorCapability)); MailboxSession disposable = mailboxSessionCreator(mailboxOwner); disposeGuard.Add <MailboxSession>(disposable); AnchorFolder disposable2 = AnchorFolder.GetFolder(context, disposable, folderName); disposeGuard.Add <AnchorFolder>(disposable2); AnchorDataProvider anchorDataProvider = new AnchorDataProvider(context, activeDirectoryProvider, disposable, disposable2, true); disposeGuard.Success(); result = anchorDataProvider; } return(result); }
// Token: 0x060001DF RID: 479 RVA: 0x00006E88 File Offset: 0x00005088 public static AnchorDataProvider CreateProviderForMigrationMailboxFolder(AnchorContext context, AnchorADProvider activeDirectoryProvider, string folderName) { AnchorUtil.ThrowOnNullArgument(context, "context"); AnchorUtil.ThrowOnNullArgument(activeDirectoryProvider, "activeDirectoryProvider"); AnchorUtil.ThrowOnNullArgument(folderName, "folderName"); return(AnchorDataProvider.CreateProviderForMailboxSession(context, activeDirectoryProvider, folderName, new Func <ExchangePrincipal, MailboxSession>(AnchorDataProvider.OpenMailboxSession))); }