bool ISharedCache.TryGet <T>(string key, out T value, IRoutingDiagnostics diagnostics) { bool result; try { Stopwatch stopwatch = new Stopwatch(); string text; bool flag; try { stopwatch.Start(); flag = this.client.TryGet <T>(key, out value, out text); } finally { stopwatch.Stop(); diagnostics.AddSharedCacheLatency(TimeSpan.FromMilliseconds((double)stopwatch.ElapsedMilliseconds)); } diagnostics.AddDiagnosticText(text); result = flag; } catch (CacheClientException innerException) { throw new SharedCacheException("SharedCacheClient.TryGet(T) failed", innerException); } return(result); }