89 references to
System.Reflection.MetadataLoadContext (89)
System\Reflection\MetadataLoadContext.CoreAssembly.cs (1)
72
return coreTypes
[
coreType];
System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs (17)
90
if (ct
[
CoreType.String] == null ||
91
ct
[
CoreType.Boolean] == null ||
92
ct
[
CoreType.UnmanagedType] == null ||
93
ct
[
CoreType.VarEnum] == null ||
94
ct
[
CoreType.Type] == null ||
95
ct
[
CoreType.Int16] == null ||
96
ct
[
CoreType.Int32] == null)
112
CustomAttributeTypedArgument[] cats = { new CustomAttributeTypedArgument(ct
[
CoreType.UnmanagedType]!, (int)(ma.Value)) };
116
attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.ArraySubType), ct
[
CoreType.UnmanagedType], (int)ma.ArraySubType),
117
attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.IidParameterIndex), ct
[
CoreType.Int32], ma.IidParameterIndex),
118
attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.SafeArraySubType), ct
[
CoreType.VarEnum], (int)ma.SafeArraySubType),
119
attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.SizeConst), ct
[
CoreType.Int32], ma.SizeConst),
120
attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.SizeParamIndex), ct
[
CoreType.Int16], ma.SizeParamIndex),
125
cans.Add(attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.SafeArrayUserDefinedSubType), ct
[
CoreType.Type], ma.SafeArrayUserDefinedSubType));
130
cans.Add(attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.MarshalType), ct
[
CoreType.String], ma.MarshalType));
135
cans.Add(attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.MarshalTypeRef), ct
[
CoreType.Type], ma.MarshalTypeRef));
140
cans.Add(attributeType.ToCustomAttributeNamedArgument(nameof(MarshalAsAttribute.MarshalCookie), ct
[
CoreType.String], ma.MarshalCookie));
System\Reflection\TypeLoading\General\Assignability.cs (17)
45
if (toTypeInfo.IsConstructedGenericType && toTypeInfo.GetGenericTypeDefinition() == coreTypes
[
CoreType.NullableT])
103
if (toTypeInfo.Equals(coreTypes
[
CoreType.Object]))
106
if (toTypeInfo.Equals(coreTypes
[
CoreType.UIntPtr]))
125
if (toTypeInfo.Equals(coreTypes
[
CoreType.Object]))
128
if (toTypeInfo.Equals(coreTypes
[
CoreType.ValueType]))
162
if (toTypeInfo.Equals(coreTypes
[
CoreType.Object]) && fromTypeInfo.IsInterface)
258
if (t.Equals(coreTypes
[
CoreType.Byte]))
259
return coreTypes
[
CoreType.SByte] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.SByte"));
261
if (t.Equals(coreTypes
[
CoreType.UInt16]))
262
return coreTypes
[
CoreType.Int16] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.Int16"));
264
if (t.Equals(coreTypes
[
CoreType.UInt32]))
265
return coreTypes
[
CoreType.Int32] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.Int32"));
267
if (t.Equals(coreTypes
[
CoreType.UInt64]))
268
return coreTypes
[
CoreType.Int64] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.Int64"));
326
return t.IsClass && !t.Equals(coreTypes
[
CoreType.Object]) && !t.Equals(coreTypes
[
CoreType.ValueType]) && !t.Equals(coreTypes
[
CoreType.Enum]);
System\Reflection\TypeLoading\General\Ecma\EcmaDefaultValueProcessing.cs (9)
98
if (cats[0].ArgumentType != ct
[
CoreType.Int64])
114
if (cats[0].ArgumentType != ct
[
CoreType.Byte] ||
115
cats[1].ArgumentType != ct
[
CoreType.Byte])
121
if (cats[2].ArgumentType == ct
[
CoreType.Int32] && cats[3].ArgumentType == ct
[
CoreType.Int32] && cats[4].ArgumentType == ct
[
CoreType.Int32])
130
if (cats[2].ArgumentType == ct
[
CoreType.UInt32] && cats[3].ArgumentType == ct
[
CoreType.UInt32] && cats[4].ArgumentType == ct
[
CoreType.UInt32])
System\Reflection\TypeLoading\General\Ecma\EcmaHelpers.cs (12)
64
if (type == coreTypes
[
CoreType.Boolean]) return PrimitiveTypeCode.Boolean;
65
if (type == coreTypes
[
CoreType.Char]) return PrimitiveTypeCode.Char;
66
if (type == coreTypes
[
CoreType.Byte]) return PrimitiveTypeCode.Byte;
67
if (type == coreTypes
[
CoreType.Int16]) return PrimitiveTypeCode.Int16;
68
if (type == coreTypes
[
CoreType.Int32]) return PrimitiveTypeCode.Int32;
69
if (type == coreTypes
[
CoreType.Int64]) return PrimitiveTypeCode.Int64;
70
if (type == coreTypes
[
CoreType.IntPtr]) return PrimitiveTypeCode.IntPtr;
71
if (type == coreTypes
[
CoreType.SByte]) return PrimitiveTypeCode.SByte;
72
if (type == coreTypes
[
CoreType.UInt16]) return PrimitiveTypeCode.UInt16;
73
if (type == coreTypes
[
CoreType.UInt32]) return PrimitiveTypeCode.UInt32;
74
if (type == coreTypes
[
CoreType.UInt64]) return PrimitiveTypeCode.UInt64;
75
if (type == coreTypes
[
CoreType.UIntPtr]) return PrimitiveTypeCode.UIntPtr;
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.DllImport.cs (14)
21
if (ct
[
CoreType.String] == null ||
22
ct
[
CoreType.Boolean] == null ||
23
ct
[
CoreType.DllImportAttribute] == null ||
24
ct
[
CoreType.CharSet] == null ||
25
ct
[
CoreType.CallingConvention] == null)
39
CustomAttributeTypedArgument[] cats = { new CustomAttributeTypedArgument(ct
[
CoreType.String]!, dia.Value) };
42
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.EntryPoint), ct
[
CoreType.String], dia.EntryPoint),
43
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.CharSet), ct
[
CoreType.CharSet], (int)dia.CharSet),
44
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.CallingConvention), ct
[
CoreType.CallingConvention], (int)dia.CallingConvention),
45
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.ExactSpelling), ct
[
CoreType.Boolean], dia.ExactSpelling),
46
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.PreserveSig), ct
[
CoreType.Boolean], dia.PreserveSig),
47
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.SetLastError), ct
[
CoreType.Boolean], dia.SetLastError),
48
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.BestFitMapping), ct
[
CoreType.Boolean], dia.BestFitMapping),
49
attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.ThrowOnUnmappableChar), ct
[
CoreType.Boolean], dia.ThrowOnUnmappableChar),
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (16)
188
if (t == ct
[
CoreType.Boolean])
190
if (t == ct
[
CoreType.Char])
192
if (t == ct
[
CoreType.SByte])
194
if (t == ct
[
CoreType.Byte])
196
if (t == ct
[
CoreType.Int16])
198
if (t == ct
[
CoreType.UInt16])
200
if (t == ct
[
CoreType.Int32])
202
if (t == ct
[
CoreType.UInt32])
204
if (t == ct
[
CoreType.Int64])
206
if (t == ct
[
CoreType.UInt64])
208
if (t == ct
[
CoreType.Single])
210
if (t == ct
[
CoreType.Double])
212
if (t == ct
[
CoreType.String])
214
if (t == ct
[
CoreType.DateTime])
216
if (t == ct
[
CoreType.Decimal])
218
if (t == ct
[
CoreType.DBNull])
System\Reflection\TypeLoading\Types\RoType.TypeClassification.cs (3)
54
Type? enumType = coreTypes
[
CoreType.Enum];
55
Type? valueType = coreTypes
[
CoreType.ValueType];
76
if (this == coreTypes
[
primitiveType])