internal void RefreshCounters(bool isDCInLocalSite) { ADProviderPerf.AddDCInstance(this.DnsName); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCLocalSite, UpdateType.Update, (uint)Convert.ToUInt16(isDCInLocalSite)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateReachability, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsReachableByTCPConnection)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateSynchronized, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsSynchronized)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateGCCapable, UpdateType.Update, (uint)Convert.ToUInt16(this.IsGC)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateIsPdc, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsPDC)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateSaclRight, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsSACLRightAvailable)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateCriticalData, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsCriticalDataAvailable)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateNetlogon, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsNetlogonAllowed)); ADProviderPerf.UpdateDCCounter(this.DnsName, Counter.DCStateOsversion, UpdateType.Update, (uint)Convert.ToUInt16(this.SuitabilityResult.IsOSVersionSuitable)); }
// Token: 0x06001978 RID: 6520 RVA: 0x0006BF38 File Offset: 0x0006A138 private void DDLExpansionHandler(DirectoryException de) { PropertyValidationError propertyValidationError = this.CheckForDDLMisconfiguration(de); if (propertyValidationError != null) { ADProviderPerf.UpdateProcessCounter(Counter.ProcessRateCriticalValidationFailures, UpdateType.Update, 1U); Globals.LogEvent(DirectoryEventLogConstants.Tuple_DynamicDistributionGroupFilterError, base.Id.ToString(), new object[] { base.Id.ToDNString(), base.OriginatingServer, propertyValidationError.Description }); throw new DataValidationException(propertyValidationError, de); } }
// Token: 0x06000925 RID: 2341 RVA: 0x000285E4 File Offset: 0x000267E4 public IAsyncResult BeginGetObject(DirectoryCacheRequest cacheRequest, AsyncCallback callback, object asyncState) { this.stopwatch = Stopwatch.StartNew(); return(this.Invoke(delegate { ArgumentValidator.ThrowIfNull("cacheRequest", cacheRequest); if (cacheRequest.ObjectType == ObjectType.ADRawEntry && cacheRequest.Properties == null) { throw new ArgumentException("properties cannot be null when request object type is ADRawEntry"); } MSExchangeDirectoryCacheServiceCounters.NumberOfCacheReadRequests.Increment(); GetObjectContext getObjectContext = new GetObjectContext(); getObjectContext.ResultState = ADCacheResultState.NotFound; LazyAsyncResult lazyAsyncResult = new LazyAsyncResult(getObjectContext, asyncState, callback); ExTraceGlobals.WCFServiceEndpointTracer.TraceDebug <DirectoryCacheRequest>((long)this.GetHashCode(), "Begin GetObject. Request {0}", cacheRequest); MSExchangeDirectoryCacheServiceCounters.CacheHitRatioBase.Increment(); ObjectTuple objectTuple = null; foreach (Tuple <string, KeyType> tuple in cacheRequest.Keys) { CacheEntry cacheEntry = null; foreach (KeyType keyType in DirectoryCacheService.AllSupportedKeyTypes) { if ((keyType & tuple.Item2) != KeyType.None) { string composedKey = this.GetComposedKey(cacheRequest.ForestOrPartitionFqdn, tuple.Item1, keyType); string text = (string)CacheManager.Instance.KeyTable.Get(composedKey, null); if (text != null) { cacheEntry = (CacheEntry)CacheManager.Instance.ADObjectCache.Get(text, null); if (cacheEntry != null && cacheEntry[keyType].Contains(composedKey.ToLower())) { break; } if (cacheEntry != null) { if (ExTraceGlobals.WCFServiceEndpointTracer.IsTraceEnabled(TraceType.DebugTrace)) { string keyValues = string.Empty; cacheEntry[keyType].ForEach(delegate(string keyVal) { keyValues += keyVal; keyValues += ","; }); ExTraceGlobals.WCFServiceEndpointTracer.TraceDebug <string, string>((long)this.GetHashCode(), "the key {0} does not match the cacheEntry's one {1}", composedKey, keyValues); } cacheEntry = null; } } } } if (cacheEntry != null) { if (cacheEntry.Invalid) { break; } foreach (ObjectTuple objectTuple2 in cacheEntry.SimpleADObjectList) { if (objectTuple2.ObjType == cacheRequest.ObjectType) { objectTuple = objectTuple2; break; } } if (objectTuple == null) { break; } if (cacheRequest.Properties != null) { foreach (string key in cacheRequest.Properties) { if (!objectTuple.ADObject.Properties.ContainsKey(key)) { objectTuple = null; getObjectContext.ResultState = ADCacheResultState.PropertiesMissing; ADProviderPerf.UpdateDirectoryADRawCachePropertiesMismatchRate(true); break; } } } if (objectTuple == null) { break; } getObjectContext.Object = objectTuple.ADObject; getObjectContext.ResultState = ADCacheResultState.Succeed; if (cacheRequest.Properties != null) { ADProviderPerf.UpdateDirectoryADRawCachePropertiesMismatchRate(false); break; } break; } } ExTraceGlobals.WCFServiceEndpointTracer.TraceDebug <string, string>((long)this.GetHashCode(), "Begin GetObject. Request {0}. Was Cache {1}", cacheRequest.RequestId, (getObjectContext.Object != null) ? "HIT" : "MISS"); ADProviderPerf.UpdateDirectoryCacheHitRatio(null != getObjectContext.Object, cacheRequest.ObjectType); this.stopwatch.Stop(); getObjectContext.BeginOperationLatency = this.stopwatch.ElapsedMilliseconds; this.stopwatch.Restart(); callback(lazyAsyncResult); return lazyAsyncResult; })); }