private static void AddScopesFromReaderToGroups(LowLevelDictionaryWithIEnumerable <RuntimeAssemblyName, ScopeDefinitionGroup> groups, MetadataReader reader)
 {
     foreach (ScopeDefinitionHandle scopeDefinitionHandle in reader.ScopeDefinitions)
     {
         RuntimeAssemblyName  defName = scopeDefinitionHandle.ToRuntimeAssemblyName(reader);
         ScopeDefinitionGroup scopeDefinitionGroup;
         if (groups.TryGetValue(defName, out scopeDefinitionGroup))
         {
             scopeDefinitionGroup.AddOverflowScope(new QScopeDefinition(reader, scopeDefinitionHandle));
         }
         else
         {
             scopeDefinitionGroup = new ScopeDefinitionGroup(new QScopeDefinition(reader, scopeDefinitionHandle));
             groups.Add(defName, scopeDefinitionGroup);
         }
     }
 }
Пример #2
0
        private void AddScopesFromReaderToGroups(LowLevelDictionaryWithIEnumerable <string, ScopeDefinitionGroup> groups, MetadataReader reader)
        {
            foreach (ScopeDefinitionHandle scopeDefinitionHandle in reader.ScopeDefinitions)
            {
                AssemblyName defName     = this.CreateAssemblyNameFromMetadata(reader, scopeDefinitionHandle);
                string       defFullName = defName.FullName;

                ScopeDefinitionGroup scopeDefinitionGroup;
                if (groups.TryGetValue(defFullName, out scopeDefinitionGroup))
                {
                    scopeDefinitionGroup.AddOverflowScope(new QScopeDefinition(reader, scopeDefinitionHandle));
                }
                else
                {
                    scopeDefinitionGroup = new ScopeDefinitionGroup(new QScopeDefinition(reader, scopeDefinitionHandle));
                    groups.Add(defFullName, scopeDefinitionGroup);
                }
            }
        }
        private void AddScopesFromReaderToGroups(LowLevelDictionaryWithIEnumerable<string, ScopeDefinitionGroup> groups, MetadataReader reader)
        {
            foreach (ScopeDefinitionHandle scopeDefinitionHandle in reader.ScopeDefinitions)
            {
                AssemblyName defName = this.CreateAssemblyNameFromMetadata(reader, scopeDefinitionHandle);
                string defFullName = defName.FullName;

                ScopeDefinitionGroup scopeDefinitionGroup;
                if (groups.TryGetValue(defFullName, out scopeDefinitionGroup))
                {
                    scopeDefinitionGroup.AddOverflowScope(new QScopeDefinition(reader, scopeDefinitionHandle));
                }
                else
                {
                    scopeDefinitionGroup = new ScopeDefinitionGroup(new QScopeDefinition(reader, scopeDefinitionHandle));
                    groups.Add(defFullName, scopeDefinitionGroup);
                }
            }
        }