public CallTreeData(ISymbolServerArtifactRetriever symbolServerArtifactRetriever, ISourceServerAuthorizationInformationProvider sourceServerInformationProvider, EtwDeserializer deserializer, StackViewerModel model) { this.symbolServerArtifactRetriever = symbolServerArtifactRetriever; this.sourceServerInformationProvider = sourceServerInformationProvider; this.deserializer = deserializer; this.model = model; }
private bool Equals(StackViewerModel other) { return(string.Equals(this.Filename, other.Filename) && string.Equals(this.Pid, other.Pid) && string.Equals(this.StackType, other.StackType) && string.Equals(this.Start, other.Start) && string.Equals(this.End, other.End) && string.Equals(this.GroupPats, other.GroupPats) && string.Equals(this.IncPats, other.IncPats) && string.Equals(this.ExcPats, other.ExcPats) && string.Equals(this.FoldPats, other.FoldPats) && string.Equals(this.FoldPct, other.FoldPct)); }
public async ValueTask <ICallTreeData> GetCallTreeAsync(StackViewerModel model) { await this.EnsureInitialized(); lock (this.callTreeDataCache) { if (!this.callTreeDataCache.TryGetValue(model, out var value)) { value = new CallTreeData(this.symbolServerArtifactRetriever, this.sourceServerAuthorizationInformationProvider, this.deserializer, model); this.callTreeDataCache.Add(model, value); } return(value); } }
public IDeserializedData GetData(StackViewerModel model) { lock (this.cache) { if (!this.cache.TryGetValue(model.Filename, out IDeserializedData data)) { var cacheEntryOptions = new MemoryCacheEntryOptions().SetPriority(CacheItemPriority.NeverRemove).RegisterPostEvictionCallback(callback: EvictionCallback, state: this).SetSlidingExpiration(this.cacheExpirationTimeProvider.Expiration); data = new DeserializedData(model.Filename, model.LocationType, this.sourceServerAuthorizationInformationProvider, this.symbolServerArtifactRetriever, this.stackViewerSettings.Value.TemporaryDataFileDownloadLocation); this.cache.Set(model.Filename, data, cacheEntryOptions); CacheMonitorEventSource.Logger.CacheEntryAdded(Environment.MachineName, model.Filename); } return(data); } }
public StackViewerController(IDeserializedDataCache dataCache, StackViewerModel model) { this.dataCache = dataCache; this.model = model; }