Пример #1
0
 public void Add(ScopeEntry scopeEntry)
 {
     scopes.Add(scopeEntry);
 }
Пример #2
0
        private void RecordScopeMapping(ReachableContext reachableContext)
        {
            foreach (var scope in reachableContext.ReachableTypes.GroupBy(g => g.Scope, g => g.Module.Assembly))
            {
                var assm = scope.Distinct().ToList();
                if (assm.Count > 1)
                {
                    DLog.Warning(DContext.CompilerCodeGenerator, "More than one assembly for scope {0}", scope.Key.Name);
                    // let's not risk a wrong mapping.
                    continue;
                }

                var filename = assemblyToFilename(assm.First());

                if (filename != null)
                {
                    var scopeEntry = new ScopeEntry(scope.Key.Name, filename, File.GetLastWriteTimeUtc(filename),
                                                    Hash.HashFileMD5(filename));
                    mapFile.Add(scopeEntry);
                }
            }
        }
Пример #3
0
 public void Add(ScopeEntry scopeEntry)
 {
     scopes.Add(scopeEntry);
 }