コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: UsageRegistry.cs プロジェクト: waodng/VSIX
        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();
        }
コード例 #3
0
 public void Merge(SessionResult source)
 {
     RawUsageData.UnionWith(source.RawUsageData);
     Resync();
 }
コード例 #4
0
 public void Merge(SessionResult source)
 {
     RawUsageData.UnionWith(source.RawUsageData);
     Resync();
 }