public void Remove(RemoveDirectoryCacheRequest cacheRequest) { ArgumentValidator.ThrowIfNull("cacheRequest", cacheRequest); int retryCount = 0; long apiTime = 0L; Stopwatch stopwatch = Stopwatch.StartNew(); ExchangeDirectoryCacheProvider.proxyPool.CallServiceWithRetry(delegate(IPooledServiceProxy <IDirectoryCacheClient> proxy) { Stopwatch stopwatch2 = Stopwatch.StartNew(); try { retryCount++; this.IsNewProxyObject = string.IsNullOrEmpty(proxy.Tag); CacheResponseContext cacheResponseContext = proxy.Client.RemoveObject(cacheRequest); proxy.Tag = DateTime.UtcNow.ToString(); CachePerformanceTracker.AddPerfData(Operation.WCFBeginOperation, cacheResponseContext.BeginOperationLatency); CachePerformanceTracker.AddPerfData(Operation.WCFEndOperation, cacheResponseContext.EndOperationLatency); } finally { stopwatch2.Stop(); CachePerformanceTracker.AddPerfData(Operation.WCFRemoveOperation, stopwatch2.ElapsedMilliseconds); apiTime = stopwatch2.ElapsedMilliseconds; } }, string.Format("Removing {0} object from cache", cacheRequest.ObjectType), 3); stopwatch.Stop(); CachePerformanceTracker.AddPerfData(Operation.WCFProxyObjectCreation, stopwatch.ElapsedMilliseconds - apiTime); this.RetryCount = retryCount; }
// Token: 0x06000929 RID: 2345 RVA: 0x00028C10 File Offset: 0x00026E10 public IAsyncResult BeginRemoveObject(RemoveDirectoryCacheRequest cacheRequest, AsyncCallback callback, object asyncState) { this.stopwatch = Stopwatch.StartNew(); return(this.Invoke(delegate { ArgumentValidator.ThrowIfNull("cacheRequest", cacheRequest); CacheResponseContext cacheResponseContext = new CacheResponseContext(); LazyAsyncResult lazyAsyncResult = new LazyAsyncResult(cacheResponseContext, asyncState, callback); MSExchangeDirectoryCacheServiceCounters.NumberOfCacheRemovalRequests.Increment(); this.InternalRemoveObject(cacheRequest.ForestOrPartitionFqdn, cacheRequest.Key); this.stopwatch.Stop(); cacheResponseContext.BeginOperationLatency = this.stopwatch.ElapsedMilliseconds; this.stopwatch.Restart(); callback(lazyAsyncResult); return lazyAsyncResult; })); }