public static void Merge(UnusedCssExtension extension, SessionResult source) { var url = extension.Connection.Url.ToString().ToLowerInvariant(); var crossBrowserPageBucket = UsageDataByLocation.GetOrAdd(url, location => new SessionResult(extension)); var connectionSiteBucket = UsageDataByConnectionAndLocation.GetOrAdd(extension.Connection, conn => new ConcurrentDictionary<string, SessionResult>()); var connectionPageBucket = connectionSiteBucket.GetOrAdd(url, location => new SessionResult(extension)); var projectBucket = UsageDataByProject.GetOrAdd(extension.Connection.Project.UniqueName, proj => new SessionResult(extension)); crossBrowserPageBucket.Merge(source); connectionPageBucket.Merge(source); projectBucket.Merge(source); OnUsageDataUpdated(); }
public static void Merge(UnusedCssExtension extension, SessionResult source) { var url = extension.Connection.Url.ToString().ToLowerInvariant(); var crossBrowserPageBucket = UsageDataByLocation.GetOrAdd(url, location => new SessionResult(extension)); var connectionSiteBucket = UsageDataByConnectionAndLocation.GetOrAdd(extension.Connection, conn => new ConcurrentDictionary <string, SessionResult>()); var connectionPageBucket = connectionSiteBucket.GetOrAdd(url, location => new SessionResult(extension)); var projectBucket = UsageDataByProject.GetOrAdd(extension.Connection.Project.UniqueName, proj => new SessionResult(extension)); crossBrowserPageBucket.Merge(source); connectionPageBucket.Merge(source); projectBucket.Merge(source); OnUsageDataUpdated(); }
public void Merge(SessionResult source) { RawUsageData.UnionWith(source.RawUsageData); Resync(); }