Пример #1
0
        public void Add(Period period, string filePath, string developerName, CommitBlobBlame commitBlobBlame)
        {
            var periodId = period.Id;

            if (!map.ContainsKey(periodId))
            {
                map[periodId] = new BlameSnapshot();
            }

            map[periodId].Add(period, filePath, developerName, commitBlobBlame);
        }
Пример #2
0
        public void Add(Period period, string filePath, string developerName, CommitBlobBlame commitBlobBlame)
        {
            if (!_map.ContainsKey(filePath))
            {
                _map[filePath] = new Dictionary <string, FileBlame>();
                Trie.Add(commitBlobBlame.Path); // we build the Trie using the actual file paths. (filePath variable contains canonical path here.)
                _canonicalToActualPathMapper[commitBlobBlame.CanonicalPath] = commitBlobBlame.Path;
            }

            if (!_map[filePath].ContainsKey(developerName))
            {
                _map[filePath][developerName] = new FileBlame()
                {
                    FileName = filePath,
                    Period   = period,
                    NormalizedDeveloperName = developerName
                };
            }

            _map[filePath][developerName].TotalAuditedLines += commitBlobBlame.AuditedLines;
        }