private MinimalCorlib(ICompilation compilation) { this.Compilation = compilation; this.typeDefinitions = new CorlibTypeDefinition[KnownTypeReference.KnownTypeCodeCount]; this.rootNamespace = new CorlibNamespace(this, null, string.Empty, string.Empty); for (int i = 0; i < KnownTypeReference.KnownTypeCodeCount; i++) { if (KnownTypeReference.Get((KnownTypeCode)i) != null) { typeDefinitions[i] = new CorlibTypeDefinition(this, (KnownTypeCode)i); } } }
private MinimalCorlib(ICompilation compilation, IEnumerable <KnownTypeReference> types) { this.Compilation = compilation; this.typeDefinitions = types.Select(ktr => new CorlibTypeDefinition(this, ktr.KnownTypeCode)).ToArray(); this.rootNamespace = new CorlibNamespace(this, null, string.Empty, string.Empty); }