126 references to CorLibrary
Microsoft.CodeAnalysis.CSharp (51)
Binder\Binder_Symbols.cs (2)
1877if (container is object && container != Compilation.Assembly && container != Compilation.Assembly.CorLibrary) 2491return (containingAssembly == containingAssembly.CorLibrary) ?
Binder\Semantics\Conversions\Conversions.cs (1)
25: base(binder.Compilation.Assembly.CorLibrary, currentRecursionDepth, includeNullability, otherNullabilityOpt)
Compilation\CSharpCompilation.cs (4)
1557result = new MissingMetadataTypeSymbol.TopLevel(Assembly.CorLibrary.Modules[0], ref emittedName, specialType); 3480var corAssembly = Assembly.CorLibrary as Symbols.Metadata.PE.PEAssemblySymbol; 3803if (!FunctionPointerTypeSymbol.IsCallingConventionModifier(internalType) || @this.Assembly.CorLibrary != internalType.ContainingAssembly) 4513return sustainedLowLatency != null && sustainedLowLatency.ContainingAssembly == Assembly.CorLibrary;
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
136var corLibrary = compilation.SourceAssembly.CorLibrary;
Emitter\Model\PEModuleBuilder.cs (2)
136get { return SourceModule.ContainingSourceAssembly.CorLibrary; } 190if ((object)assembly != (object)assembly.CorLibrary &&
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
273var conversions = new TypeConversions(_factory.CurrentFunction.ContainingAssembly.CorLibrary);
Symbols\AbstractTypeMap.cs (1)
390dynamicEraser = new DynamicTypeEraser(owner.ContainingAssembly.CorLibrary.GetSpecialType(SpecialType.System_Object));
Symbols\AliasSymbol.cs (1)
237var corLibrary = this.ContainingAssembly.CorLibrary;
Symbols\AssemblySymbol.cs (9)
90IAssemblySymbolInternal IAssemblySymbolInternal.CorLibrary => CorLibrary; 464return CorLibrary is not null && 569return CorLibrary.GetDeclaredSpecialType(type); 889if (CorLibrary != (object)this && 890!CorLibrary.IsMissing && 893NamedTypeSymbol? corLibCandidate = GetTopLevelTypeByMetadataName(CorLibrary, ref metadataName, assemblyOpt); 923if (skipCorLibrary && assembly == (object)CorLibrary) 987return (object)type.ContainingAssembly == CorLibrary; 1032return CorLibrary.GetDeclaredSpecialTypeMember(member);
Symbols\Compilation_UsedAssemblies.cs (2)
216if (SourceAssembly.CorLibrary is object) 219AddUsedAssembly(SourceAssembly.CorLibrary);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
211specifierType = compilation.Assembly.CorLibrary.LookupDeclaredTopLevelMetadataType(ref metadataName); 213Debug.Assert(specifierType is null || ReferenceEquals(specifierType.ContainingAssembly, compilation.Assembly.CorLibrary)); 217specifierType = new MissingMetadataTypeSymbol.TopLevel(compilation.Assembly.CorLibrary.Modules[0], ref metadataName, new CSDiagnosticInfo(ErrorCode.ERR_TypeNotFound, typeName));
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
209return (object?)modifierType.ContainingAssembly == modifierType.ContainingAssembly?.CorLibrary
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
255string corlibName = ContainingAssembly.CorLibrary.Name;
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
662var bounds = this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited, currentCompilation: null,
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
84Debug.Assert(ReferenceEquals(this.CorLibrary, this)); 113return ReferenceEquals(this.CorLibrary, this) && _cachedSpecialTypes < (int)SpecialType.Count;
Symbols\MissingMetadataTypeSymbol.cs (1)
293if ((Arity == 0 || MangleName) && (object)containingAssembly != null && ReferenceEquals(containingAssembly, containingAssembly.CorLibrary) && _containingModule.Ordinal == 0)
Symbols\ModuleSymbol.cs (1)
263if ((object)assembly != assembly.CorLibrary)
Symbols\ReducedExtensionMethodSymbol.cs (2)
51var conversions = new TypeConversions(method.ContainingAssembly.CorLibrary); 130var conversions = new TypeConversions(containingAssembly.CorLibrary);
Symbols\ReferenceManager.cs (2)
162AssemblySymbol corLibrary = candidateAssembly.CorLibrary; 546var corLibrary = sourceAssembly.CorLibrary;
Symbols\Source\SourceAssemblySymbol.cs (1)
1879if ((object)this.CorLibrary != (object)this)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2177var conversions = new TypeConversions(this.ContainingAssembly.CorLibrary);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
115var corLibrary = this.ContainingAssembly.CorLibrary; 161var corLibrary = this.ContainingAssembly.CorLibrary; 481else if (baseSpecialType == SpecialType.System_Array && this.ContainingAssembly.CorLibrary == this.ContainingAssembly)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
951var corLibrary = compilation.SourceAssembly.CorLibrary;
Symbols\Source\SourcePropertySymbolBase.cs (2)
1463var conversions = new TypeConversions(this.ContainingAssembly.CorLibrary); 1492var conversions = new TypeConversions(this.ContainingAssembly.CorLibrary);
Symbols\Source\SourceTypeParameterSymbol.cs (4)
261var args = new ConstraintsHelper.CheckConstraintsArgsBoxed(DeclaringCompilation, new TypeConversions(ContainingAssembly.CorLibrary), _locations[0], diagnostics); 582return this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited: false, this.DeclaringCompilation, diagnostics); 717return this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited: false, this.DeclaringCompilation, diagnostics); 966return this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited: true, this.DeclaringCompilation, diagnostics);
Symbols\Symbol.cs (1)
931if (dependency is object && dependency.CorLibrary == dependency)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\DestructorTests.cs (1)
586var mscorlib = module.ContainingAssembly.CorLibrary;
Emit\CompilationEmitTests.cs (1)
5043Assert.NotSame(comp.Assembly.CorLibrary, comp.Assembly);
Emit\InAttributeModifierTests.cs (1)
4422Assert.Same(assembly, assembly.CorLibrary);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_Security.cs (1)
51NamedTypeSymbol hostProtectionAttr = sourceAssembly.CorLibrary.LookupDeclaredTopLevelMetadataType(ref emittedName);
Attributes\WellKnownAttributesTestBase.cs (1)
82return peAssembly.CorLibrary.GlobalNamespace.GetMember<NamespaceSymbol>("System");
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
MissingAssemblyTests.cs (1)
527var expectedMissingAssemblyIdentity = comp.Assembly.CorLibrary.Identity;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (13)
Semantics\DelegateTypeTests.cs (1)
12291var conversions = new TypeConversions(comp.SourceAssembly.CorLibrary);
Semantics\NativeIntegerTests.cs (6)
780var corLibA = comp.Assembly.CorLibrary; 794var corLibB = comp.Assembly.CorLibrary; 861var corLibA = comp.Assembly.CorLibrary; 904var corLibB = comp.Assembly.CorLibrary; 976var corLibA = comp.Assembly.CorLibrary; 1021var corLibB = comp.Assembly.CorLibrary;
Semantics\RefFieldTests.cs (4)
25858Assert.Equal(assemblyIdentity, module.ContainingAssembly.CorLibrary.Identity); 25925Assert.Equal(assemblyIdentityHigherVersion, module.ContainingAssembly.CorLibrary.Identity); 25928module = module.ContainingAssembly.CorLibrary.Modules[0]; 25989Assert.Equal(assemblyIdentity, module.ContainingAssembly.CorLibrary.Identity);
Semantics\StructConstructorTests.cs (2)
3222var corLibA = comp.Assembly.CorLibrary; 3240var corLibB = comp.Assembly.CorLibrary;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (54)
Compilation\ReferenceManagerTests.cs (14)
1844Assert.NotSame(cPublic.Assembly.CorLibrary, cInternal.Assembly.CorLibrary); 1845Assert.NotSame(cAll.Assembly.CorLibrary, cInternal.Assembly.CorLibrary); 1846Assert.NotSame(cAll.Assembly.CorLibrary, cPublic.Assembly.CorLibrary); 1848Assert.Same(cPublic.Assembly.CorLibrary, cPublic2.Assembly.CorLibrary); 1849Assert.Same(cInternal.Assembly.CorLibrary, cInternal2.Assembly.CorLibrary); 1850Assert.Same(cAll.Assembly.CorLibrary, cAll2.Assembly.CorLibrary); 2157Assert.Same(assembly1.CorLibrary, assembly1); 2158Assert.Same(assembly2.CorLibrary, assembly2);
Symbols\AssemblyAndNamespaceTests.cs (2)
386Assert.Equal(objectType, comp.Assembly.CorLibrary.GetSpecialType(SpecialType.System_Object)); 439Assert.Equal(taskType, comp.Assembly.CorLibrary.GetTypeByMetadataName("System.Threading.Tasks.Task"));
Symbols\CorLibrary\CorTypes.cs (1)
158Assert.Same(c1.Assembly, c1.Assembly.CorLibrary);
Symbols\CovariantReturnTests.cs (7)
462var coreLibrary = comp.GetMetadataReference(comp.Assembly.CorLibrary); 467var originalCorLib = comp.Assembly.CorLibrary; 468var newCorLib = result.Assembly.CorLibrary; 484var coreLibrary = comp.GetMetadataReference(comp.Assembly.CorLibrary); 503var coreLibrary = comp.GetMetadataReference(comp.Assembly.CorLibrary); 519var originalCorLib = comp.Assembly.CorLibrary; 520var newCorLib = result.Assembly.CorLibrary;
Symbols\DefaultInterfaceImplementationTests.cs (7)
49426Assert.False(compilation1.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49437Assert.True(compilation1.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49471Assert.Same(compilation1.Assembly, compilation1.Assembly.CorLibrary); 49480Assert.True(compilation2.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49587Assert.Same(compilation1.Assembly, compilation1.Assembly.CorLibrary); 49596Assert.False(compilation2.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49737Assert.False(compilation1.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation);
Symbols\FunctionPointerTypeSymbolTests.cs (2)
1965Assert.NotSame(testConvention!.ContainingAssembly.CorLibrary, mainComp.Assembly.CorLibrary);
Symbols\Metadata\PE\DynamicTransformsTests.cs (3)
47_objectType = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Object); 48_intType = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Int32); 373var nullableStruct = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Nullable_T).Construct(structType);
Symbols\Metadata\PE\LoadInAttributeModifier.cs (8)
388.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 541.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 1401.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 1657.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 1869.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 2112.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 2368.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity)) 2580.Single(assembly => !assembly.Identity.Equals(module.ContainingAssembly.CorLibrary.Identity))
Symbols\Retargeting\NoPia.cs (4)
295Assert.Same(assemblies[2], LocalTypes1.Assembly.CorLibrary); 296Assert.Same(assemblies[2], LocalTypes2.Assembly.CorLibrary); 2672Assert.NotSame(compilation1.SourceAssembly.CorLibrary, compilation2.SourceAssembly.CorLibrary);
Symbols\Retargeting\RetargetingTests.cs (6)
44retargetingAssembly.SetCorLibrary(sourceAssembly.CorLibrary); 115retargetingAssembly.SetCorLibrary(sourceAssembly.CorLibrary); 148retargetingAssembly.SetCorLibrary(sourceAssembly.CorLibrary); 182retargetingAssembly.SetCorLibrary(sourceAssembly.CorLibrary); 218retargetingAssembly.SetCorLibrary(sourceAssembly.CorLibrary); 673retargetingAssembly.SetCorLibrary(sourceAssembly.CorLibrary);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
MetadataTestHelpers.cs (1)
23return module.ContainingAssembly.CorLibrary;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
2875retargetingAssembly.SetCorLibrary(comp.Assembly.CorLibrary);