// 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: 0x0600003F RID: 63 RVA: 0x00003328 File Offset: 0x00001528 private IList <MailboxId> GetMigrationMailboxes(IAnchorADProvider adProvider) { List <MailboxId> list = new List <MailboxId>(); IEnumerable <BatchCreatorScheduler.MigrationMailbox> mailboxes = this.MailboxCache.GetMailboxes(adProvider); foreach (BatchCreatorScheduler.MigrationMailbox migrationMailbox in mailboxes) { string mailboxServerFqdn = adProvider.GetMailboxServerFqdn(migrationMailbox.User, false); using (new ServerSettingsContext(mailboxServerFqdn, null, null).Activate()) { if (!base.Context.Config.GetConfig <bool>("IsEnabled")) { base.Context.Logger.Log(MigrationEventType.Verbose, "Migration mailbox located {0} is disabled via config", new object[] { mailboxServerFqdn }); migrationMailbox.SetFailure(new BatchCreatorScheduler.ServerNotEnabledException(mailboxServerFqdn)); continue; } } list.Add(new MailboxId(migrationMailbox.User.ExchangeGuid)); } return(list); }
public ADSessionProxy(IAnchorADProvider anchorAdProvider) { this.anchorAdProvider = anchorAdProvider; }
internal AnchorEmailMessageItem(AnchorContext context, IAnchorADProvider adProvider, MessageItem message) { this.context = context; this.ADProvider = adProvider; this.Message = message; }