42 references to WellKnownType
ILLink.RoslynAnalyzer (42)
COMAnalyzer.cs (2)
99
if (typeSymbol.IsTypeOf(
WellKnownType
.System_Array))
104
else if (typeSymbol.IsTypeOf(
WellKnownType
.System_String) ||
ITypeSymbolExtensions.cs (9)
34
if (type.IsTypeOf(
WellKnownType
.System_Reflection_IReflect))
42
if (baseType.IsTypeOf(
WellKnownType
.System_Type))
47
if (iface.IsTypeOf(
WellKnownType
.System_Reflection_IReflect))
67
public static bool IsTypeOf(this ITypeSymbol symbol,
WellKnownType
wellKnownType)
72
public static
WellKnownType
? TryGetWellKnownType(this ITypeSymbol symbol)
76
SpecialType.System_String =>
WellKnownType
.System_String,
77
SpecialType.System_Nullable_T =>
WellKnownType
.System_Nullable_T,
78
SpecialType.System_Array =>
WellKnownType
.System_Array,
79
SpecialType.System_Object =>
WellKnownType
.System_Object,
src\tools\illink\src\ILLink.Shared\TrimAnalysis\NullableSystemTypeValue.cs (1)
21
Debug.Assert(nullableType.IsTypeOf(
WellKnownType
.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\NullableValueWithDynamicallyAccessedMembers.cs (1)
23
Debug.Assert(nullableType.IsTypeOf(
WellKnownType
.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RuntimeTypeHandleForNullableSystemTypeValue.cs (1)
21
Debug.Assert(nullableType.IsTypeOf(
WellKnownType
.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RuntimeTypeHandleForNullableValueWithDynamicallyAccessedMembers.cs (1)
21
Debug.Assert(nullableType.IsTypeOf(
WellKnownType
.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TypeSystemProxy\WellKnownType.cs (24)
28
public static (string Namespace, string Name) GetNamespaceAndName(this
WellKnownType
type)
32
WellKnownType
.System_String => ("System", "String"),
33
WellKnownType
.System_Nullable_T => ("System", "Nullable`1"),
34
WellKnownType
.System_Type => ("System", "Type"),
35
WellKnownType
.System_Reflection_IReflect => ("System.Reflection", "IReflect"),
36
WellKnownType
.System_Array => ("System", "Array"),
37
WellKnownType
.System_Object => ("System", "Object"),
38
WellKnownType
.System_Attribute => ("System", "Attribute"),
39
WellKnownType
.System_NotSupportedException => ("System", "NotSupportedException"),
40
WellKnownType
.System_Runtime_CompilerServices_DisablePrivateReflectionAttribute => ("System.Runtime.CompilerServices", "DisablePrivateReflectionAttribute"),
41
WellKnownType
.System_Void => ("System", "Void"),
45
public static string GetNamespace(this
WellKnownType
type) => GetNamespaceAndName(type).Namespace;
46
public static string GetName(this
WellKnownType
type) => GetNamespaceAndName(type).Name;
47
public static
WellKnownType
? GetWellKnownType(string @namespace, string name)
53
"String" =>
WellKnownType
.System_String,
54
"Nullable`1" =>
WellKnownType
.System_Nullable_T,
55
"Type" =>
WellKnownType
.System_Type,
56
"Array" =>
WellKnownType
.System_Array,
57
"Attribute" =>
WellKnownType
.System_Attribute,
58
"Object" =>
WellKnownType
.System_Object,
59
"NotSupportedException" =>
WellKnownType
.System_NotSupportedException,
60
"Void" =>
WellKnownType
.System_Void,
65
"IReflect" =>
WellKnownType
.System_Reflection_IReflect,
70
"DisablePrivateReflectionAttribute" =>
WellKnownType
.System_Runtime_CompilerServices_DisablePrivateReflectionAttribute,
TrimAnalysis\HandleCallAction.cs (1)
257
if (type.IsTypeOf(
WellKnownType
.System_Type))
TrimAnalysis\ParameterProxy.cs (1)
61
public bool IsTypeOf(
WellKnownType
type) => ParameterType.IsTypeOf(type);
TrimAnalysis\TypeProxy.cs (1)
37
public bool IsTypeOf(
WellKnownType
wellKnownType) => Type.IsTypeOf(wellKnownType);