public ADABRawEntry(ADABSession ownerSession, ABPropertyDefinitionCollection properties, ADRawEntry rawEntry) : base(ownerSession, properties) { if (rawEntry == null) { throw new ArgumentNullException("rawEntry"); } this.rawEntry = rawEntry; }
// Token: 0x0600036D RID: 877 RVA: 0x00013CC0 File Offset: 0x00011EC0 private ABSession GetAddressBookSession() { if (this.addressBookSession == null) { IABSessionSettings sessionSettings = ABDiscoveryManager.GetSessionSettings(this.user.ExchangePrincipal, new int?(this.lcid), new ConsistencyMode?(ConsistencyMode.IgnoreInvalid), GlobalSettings.SyncLog, this.user.ClientSecurityContextWrapper.ClientSecurityContext); this.addressBookSession = ADABSession.Create(sessionSettings); } return(this.addressBookSession); }
// Token: 0x06000951 RID: 2385 RVA: 0x00036BA3 File Offset: 0x00034DA3 public ADABGroup(ADABSession ownerSession, ADDynamicGroup dynamicGroup) : base(ownerSession) { if (dynamicGroup == null) { throw new ArgumentNullException("dynamicGroup"); } if (dynamicGroup.Id == null) { throw new ArgumentException("dynamicGroup.Id can't be null.", "dynamicGroup.Id"); } this.recipient = dynamicGroup; this.dynamicGroup = dynamicGroup; }
// Token: 0x06000950 RID: 2384 RVA: 0x00036B66 File Offset: 0x00034D66 public ADABGroup(ADABSession ownerSession, ADGroup activeDirectoryGroup) : base(ownerSession) { if (activeDirectoryGroup == null) { throw new ArgumentNullException("activeDirectoryGroup"); } if (activeDirectoryGroup.Id == null) { throw new ArgumentException("activeDirectoryGroup.Id can't be null.", "activeDirectoryGroup.Id"); } this.recipient = activeDirectoryGroup; this.activeDirectoryGroup = activeDirectoryGroup; }
public static ABSession Create(IABSessionSettings sessionSettings) { if (sessionSettings == null) { throw new ArgumentNullException("sessionSettings"); } ADABSession adabsession = null; bool flag = false; try { adabsession = new ADABSession(sessionSettings.Get <OrganizationId>("OrganizationId"), sessionSettings.Get <ADObjectId>("SearchRoot"), sessionSettings.Get <int>("Lcid"), sessionSettings.Get <ConsistencyMode>("ConsistencyMode"), sessionSettings.Get <ClientSecurityContext>("ClientSecurityContext")); flag = true; } finally { if (!flag && adabsession != null) { adabsession.Dispose(); adabsession = null; } } return(adabsession); }
public void Execute() { Command.CurrentCommand.ProtocolLogger.SetValue(ProtocolLoggerData.SearchQueryLength, this.searchQuery.Length); if (this.user.IsConsumerOrganizationUser) { AirSyncDiagnostics.TraceDebug(ExTraceGlobals.RequestsTracer, this, "GalSearch command not supported for consumer users"); return; } if (this.minRange >= GlobalSettings.MaxGALSearchResults) { AirSyncDiagnostics.TraceDebug(ExTraceGlobals.RequestsTracer, this, "GalSearch command min range specified is outside our configured maximum. No results will be returned"); return; } UnicodeCategory unicodeCategory = char.GetUnicodeCategory(this.searchQuery, 0); if (this.searchQuery.Length < GlobalSettings.MinGALSearchLength && unicodeCategory != UnicodeCategory.OtherLetter) { AirSyncDiagnostics.TraceDebug(ExTraceGlobals.RequestsTracer, this, "GalSearch search string is shorter than MinGALSearchLength. No results will be returned"); Command.CurrentCommand.ProtocolLogger.SetValueIfNotSet(ProtocolLoggerData.Error, "SearchStringTooShort"); return; } OperationRetryManagerResult operationRetryManagerResult = GalSearchProvider.retryManager.TryRun(delegate { IABSessionSettings sessionSettings = ABDiscoveryManager.GetSessionSettings(this.user.ExchangePrincipal, new int?(this.lcid), null, GlobalSettings.SyncLog, this.user.ClientSecurityContextWrapper.ClientSecurityContext); using (ABSession absession = ADABSession.Create(sessionSettings)) { this.addressBookObjects = absession.FindByANR(this.searchQuery, GlobalSettings.MaxGALSearchResults); } }); if (operationRetryManagerResult.Succeeded) { if (this.pictureOptions != null && this.user.Features.IsEnabled(EasFeature.HDPhotos) && this.user.Context.Request.Version >= 160) { this.photoRetriever = new AirSyncPhotoRetriever(this.user.Context); List <string> list = new List <string>(); int num = this.minRange; while (this.addressBookObjects != null && num <= this.maxRange && num < this.addressBookObjects.Count) { ABObject abobject = this.addressBookObjects[num]; if (abobject == null) { AirSyncDiagnostics.TraceDebug(ExTraceGlobals.RequestsTracer, this, "ABSession.FindByAnr returned null addresBookObject. Continue."); } else { ABContact abcontact = abobject as ABContact; if (abcontact == null) { AirSyncDiagnostics.TraceDebug(ExTraceGlobals.RequestsTracer, this, "ABSession.FindByAnr returned object that is not a \"ABContact\". Continue."); } else { list.Add(abcontact.EmailAddress); } } num++; } this.photoRetriever.BeginGetThumbnailPhotoFromMailbox(list, this.pictureOptions.PhotoSize); } return; } if (operationRetryManagerResult.Exception is ABSubscriptionDisabledException) { throw new AirSyncPermanentException(StatusCode.Sync_InvalidSyncKey, operationRetryManagerResult.Exception, false) { ErrorStringForProtocolLogger = "ABSubsDisabled" }; } if (operationRetryManagerResult.Exception is DataValidationException) { throw new AirSyncPermanentException(StatusCode.Sync_InvalidSyncKey, operationRetryManagerResult.Exception, false) { ErrorStringForProtocolLogger = "BadADDataInGalSearch" }; } if (operationRetryManagerResult.Exception is DataSourceOperationException) { throw new AirSyncPermanentException(StatusCode.Sync_InvalidSyncKey, operationRetryManagerResult.Exception, false) { ErrorStringForProtocolLogger = "BadADDataSource" }; } if (operationRetryManagerResult.Exception != null) { throw operationRetryManagerResult.Exception; } throw new InvalidOperationException("GalSearch failed with result code: " + operationRetryManagerResult.ResultCode); }