// Token: 0x060004A0 RID: 1184 RVA: 0x0001A93C File Offset: 0x00018B3C public static void UpdateProcessTimeSearchPercentileCounter(uint value) { if (Globals.InstanceType == InstanceType.NotInitialized) { Globals.InitializeUnknownPerfCounterInstance(); } ADProviderPerf.perProcessPercentileADLatency.AddValue((long)((ulong)value)); uint value2 = (uint)ADProviderPerf.perProcessPercentileADLatency.PercentileQuery(90.0); ADProviderPerf.UpdateProcessCounter(Counter.ProcessTimeSearchNinetiethPercentile, UpdateType.Add, value2); ADProviderPerf.UpdateProcessCounter(Counter.ProcessTimeSearchNinetiethPercentileBase, UpdateType.Add, 1U); value2 = (uint)ADProviderPerf.perProcessPercentileADLatency.PercentileQuery(95.0); ADProviderPerf.UpdateProcessCounter(Counter.ProcessTimeSearchNinetyFifthPercentile, UpdateType.Add, value2); ADProviderPerf.UpdateProcessCounter(Counter.ProcessTimeSearchNinetyFifthPercentileBase, UpdateType.Add, 1U); value2 = (uint)ADProviderPerf.perProcessPercentileADLatency.PercentileQuery(99.0); ADProviderPerf.UpdateProcessCounter(Counter.ProcessTimeSearchNinetyNinethPercentile, UpdateType.Add, value2); ADProviderPerf.UpdateProcessCounter(Counter.ProcessTimeSearchNinetyNinethPercentileBase, UpdateType.Add, 1U); }
private ADRawEntry[] GetNextResultCollection() { this.vlvRequestControl.ContextId = base.Cookie; DirectoryControl directoryControl; SearchResultEntryCollection nextResultCollection = base.GetNextResultCollection(typeof(VlvResponseControl), out directoryControl); ADProviderPerf.UpdateProcessCounter(Counter.ProcessRateVlv, UpdateType.Add, 1U); ADProviderPerf.UpdateDCCounter(base.PreferredServerName, Counter.DCRateVlv, UpdateType.Add, 1U); base.Cookie = null; if (directoryControl != null) { VlvResponseControl vlvResponseControl = (VlvResponseControl)directoryControl; base.Cookie = vlvResponseControl.ContextId; this.estimatedRowCount = vlvResponseControl.ContentCount; this.currentRow = vlvResponseControl.TargetPosition; } if (nextResultCollection == null) { return(null); } return(base.Session.ObjectsFromEntries <ADRawEntry>(nextResultCollection, base.PreferredServerName, this.properties, ADVirtualListView.dummyADRawEntry)); }
protected override SearchResultEntryCollection GetNextResultCollection() { this.pageResultRequestControl.Cookie = base.Cookie; this.pageResultRequestControl.PageSize = base.PageSize; if (base.PagesReturned > 0) { ADProviderPerf.UpdateProcessCounter(Counter.ProcessRatePaged, UpdateType.Add, 1U); ADProviderPerf.UpdateDCCounter(base.PreferredServerName, Counter.DCRatePaged, UpdateType.Add, 1U); } DirectoryControl directoryControl; SearchResultEntryCollection nextResultCollection = base.GetNextResultCollection(typeof(PageResultResponseControl), out directoryControl); base.Cookie = ((directoryControl == null) ? null : ((PageResultResponseControl)directoryControl).Cookie); if (base.Cookie == null || base.Cookie.Length == 0 || nextResultCollection == null) { base.RetrievedAllData = new bool?(true); } else { base.RetrievedAllData = new bool?(false); } return(nextResultCollection); }
// Token: 0x060006F4 RID: 1780 RVA: 0x00025650 File Offset: 0x00023850 protected override SearchResultEntryCollection GetNextResultCollection() { if (base.Session.NetworkCredential == null) { this.vlvRequestControl.ContextId = base.Cookie; } this.vlvRequestControl.Offset = this.offSet; if (this.searchForward) { this.vlvRequestControl.BeforeCount = 0; this.vlvRequestControl.AfterCount = (this.includeBookmarkObject ? (base.PageSize - 1) : base.PageSize); } else { this.vlvRequestControl.BeforeCount = (this.includeBookmarkObject ? (base.PageSize - 1) : base.PageSize); this.vlvRequestControl.AfterCount = 0; } DirectoryControl directoryControl = null; SearchResultEntryCollection searchResultEntryCollection = null; try { searchResultEntryCollection = base.GetNextResultCollection(typeof(VlvResponseControl), out directoryControl); } catch (ADInvalidHandleCookieException ex) { if (this.vlvRequestControl.ContextId == null || this.vlvRequestControl.ContextId.Length == 0) { throw; } ExTraceGlobals.ADFindTracer.TraceDebug <string>((long)this.GetHashCode(), "ADVlvPagedReader::GetNextResultCollection encounter an exception \"{0}\". Clear the cookie and try again.", ex.Message); this.vlvRequestControl.ContextId = null; searchResultEntryCollection = base.GetNextResultCollection(typeof(VlvResponseControl), out directoryControl); } ADProviderPerf.UpdateProcessCounter(Counter.ProcessRateVlv, UpdateType.Add, 1U); ADProviderPerf.UpdateDCCounter(base.PreferredServerName, Counter.DCRateVlv, UpdateType.Add, 1U); base.Cookie = ((directoryControl == null) ? null : ((VlvResponseControl)directoryControl).ContextId); if (!this.searchForward) { base.RetrievedAllData = new bool?(true); } if (directoryControl == null || searchResultEntryCollection.Count == 0) { base.RetrievedAllData = new bool?(true); } else { this.totalCount = ((VlvResponseControl)directoryControl).ContentCount; if (this.searchForward && base.PagesReturned == 0) { this.offSet = ((VlvResponseControl)directoryControl).TargetPosition; if (!this.includeBookmarkObject) { this.offSet++; } } if (!this.searchForward) { this.offSet = ((VlvResponseControl)directoryControl).TargetPosition - searchResultEntryCollection.Count + 1; } this.firstEntry = (string)searchResultEntryCollection[0].Attributes[ADRecipientSchema.DisplayName.LdapDisplayName].GetValues(typeof(string))[0]; this.lastEntry = (string)searchResultEntryCollection[searchResultEntryCollection.Count - 1].Attributes[ADRecipientSchema.DisplayName.LdapDisplayName].GetValues(typeof(string))[0]; if (string.Compare(this.firstEntry, this.lastEntry, new CultureInfo(base.Lcid), CompareOptions.OrdinalIgnoreCase) == 0) { base.RetrievedAllData = new bool?(true); } if (this.searchForward) { this.vlvRequestControl.Target = Encoding.UTF8.GetBytes(this.lastEntry); } else { this.vlvRequestControl.Target = Encoding.UTF8.GetBytes(this.firstEntry); } } return(searchResultEntryCollection); }
// Token: 0x060003B5 RID: 949 RVA: 0x00015440 File Offset: 0x00013640 internal static ADObject CreateAndInitializeRecipientObject <TRecipientObject>(ADPropertyBag propertyBag, ADRawEntry dummyObject, IRecipientSession recipientSession) where TRecipientObject : IConfigurable, new() { ArgumentValidator.ThrowIfNull("propertyBag", propertyBag); ArgumentValidator.ThrowIfNull("dummyObject", dummyObject); MultiValuedProperty <string> multiValuedProperty = (MultiValuedProperty <string>)propertyBag[ADObjectSchema.ObjectClass]; ADObject adobject; if (dummyObject is OWAMiniRecipient) { adobject = new OWAMiniRecipient(); } else if (dummyObject is ActiveSyncMiniRecipient) { adobject = new ActiveSyncMiniRecipient(); } else if (dummyObject is StorageMiniRecipient) { adobject = new StorageMiniRecipient(); } else if (dummyObject is TransportMiniRecipient) { adobject = new TransportMiniRecipient(); } else if (dummyObject is LoadBalancingMiniRecipient) { adobject = new LoadBalancingMiniRecipient(); } else if (dummyObject is MiniRecipientWithTokenGroups) { adobject = new MiniRecipientWithTokenGroups(); } else if (dummyObject is FrontEndMiniRecipient) { adobject = new FrontEndMiniRecipient(); } else if (dummyObject is MiniRecipient) { adobject = new MiniRecipient(); } else if (dummyObject is RemovedMailbox) { adobject = new RemovedMailbox(); } else if (dummyObject is DeletedRecipient) { adobject = new DeletedRecipient(); } else if (multiValuedProperty.Contains(ADComputerRecipient.MostDerivedClass)) { adobject = new ADComputerRecipient(); } else if (multiValuedProperty.Contains(ADUser.MostDerivedClass)) { adobject = new ADUser(); } else if (multiValuedProperty.Contains(ADContact.MostDerivedClass)) { adobject = new ADContact(); } else if (multiValuedProperty.Contains(ADGroup.MostDerivedClass)) { adobject = new ADGroup(); } else if (multiValuedProperty.Contains(ADDynamicGroup.MostDerivedClass)) { adobject = new ADDynamicGroup(); } else if (multiValuedProperty.Contains(ADPublicFolder.MostDerivedClass)) { adobject = new ADPublicFolder(); } else if (multiValuedProperty.Contains(ADSystemAttendantMailbox.MostDerivedClass)) { adobject = new ADSystemAttendantMailbox(); } else if (multiValuedProperty.Contains(ADSystemMailbox.MostDerivedClass)) { adobject = new ADSystemMailbox(); } else if (multiValuedProperty.Contains(ADPublicDatabase.MostDerivedClass)) { adobject = new ADPublicDatabase(); } else { if (!multiValuedProperty.Contains(ADMicrosoftExchangeRecipient.MostDerivedClass)) { string objectClass = string.Empty; foreach (string text in multiValuedProperty) { objectClass = text; } ObjectValidationError error = new ObjectValidationError(DirectoryStrings.UnsupportedObjectClass(objectClass), (ADObjectId)propertyBag[ADObjectSchema.Id], string.Empty); ADProviderPerf.UpdateProcessCounter(Counter.ProcessRateCriticalValidationFailures, UpdateType.Update, 1U); Globals.LogEvent(DirectoryEventLogConstants.Tuple_DSC_EVENT_VALIDATION_FAILED_FCO_MODE_RECIPIENT, ((ADObjectId)propertyBag[ADObjectSchema.Id]).ToString(), new object[] { ((ADObjectId)propertyBag[ADObjectSchema.Id]).ToDNString() }); throw new DataValidationException(error); } adobject = new ADMicrosoftExchangeRecipient(); } adobject.m_Session = recipientSession; adobject.propertyBag = propertyBag; adobject.Initialize(); adobject.ResetChangeTracking(true); if (recipientSession != null) { adobject.SetIsReadOnly(recipientSession.ReadOnly); } ExTraceGlobals.ADReadDetailsTracer.TraceDebug <string, RecipientType>((long)((recipientSession != null) ? recipientSession.GetHashCode() : 0), "ADRecipientObjectSession::CreateObject - Got {0} as {1}", adobject.DistinguishedName, (RecipientType)adobject[ADRecipientSchema.RecipientType]); return(adobject); }