4 instantiations of TypeName
System.Private.CoreLib (4)
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (4)
217TypeName result = new(fullName, assemblyName, declaringType: declaringType); 220result = new(fullName: null, assemblyName, elementOrGenericType: result, declaringType, genericArgs); 230result = new(fullName: null, assemblyName, elementOrGenericType: result, rankOrModifier: parsedModifier); 277declaringType = new(fullTypeName, assemblyName, declaringType: declaringType, nestedNameLength: fullNameLength);
53 references to TypeName
System.Private.CoreLib (53)
src\Internal\VersionResilientHashCode.CoreCLR.cs (2)
29public static int TypeHashCode(TypeName type) 71private static int GenericInstanceHashCode(int hashcode, ReadOnlySpan<TypeName> instantiation)
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeNameResolver.cs (6)
34private Type? Resolve(TypeName typeName) 68private Type? GetSimpleType(TypeName typeName) 72TypeName current = typeName; 85nestedTypeNames[--nestingDepth] = TypeName.Unescape(current.Name); 102private Type? GetGenericType(TypeName typeName) 108ReadOnlySpan<TypeName> genericArgs = typeName.GetGenericArguments();
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TypeMapLazyDictionary.cs (3)
160TypeName parsedSource = TypeNameParser.Parse(sourceTypeBuffer.Buffer, throwOnError: true)!; 346private static int ComputeHashCode(TypeName key) 404TypeName parsedSourceTypeName,
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (22)
35private readonly TypeName? _elementOrGenericType; 36private readonly TypeName? _declaringType; 38private readonly List<TypeName>? _genericArguments; 46TypeName? elementOrGenericType = default, 47TypeName? declaringType = default, 49List<TypeName>? genericTypeArguments = default, 133/// Returns assembly name which contains this type, or null if this <see cref="TypeName"/> was not 146public TypeName DeclaringType 210foreach (TypeName genericArg in GetGenericArguments()) 376TypeName rootTypeName = this; 414/// Represents the total number of <see cref="TypeName"/> instances that are used to describe 420/// as the total number of <see cref="TypeName"/> instances that would be created if 421/// you were to totally deconstruct this instance and visit each intermediate <see cref="TypeName"/> 428/// involves inspecting 8 <see cref="TypeName"/> instances total: 441/// <exception cref="OverflowException">The total number of <see cref="TypeName"/> instances that are used to describe 459foreach (TypeName genericArgument in GetGenericArguments()) 479public TypeName GetElementType() 496public TypeName GetGenericTypeDefinition() 514public static TypeName Parse(ReadOnlySpan<char> typeName, TypeNameParseOptions? options = default) 524public static bool TryParse(ReadOnlySpan<char> typeName, [NotNullWhen(true)] out TypeName? result, TypeNameParseOptions? options = default) 565/// If this <see cref="TypeName"/> represents a constructed generic type, returns an array 574ReadOnlySpan<TypeName> GetGenericArguments() => CollectionsMarshal.AsSpan(_genericArguments);
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (10)
31internal static TypeName? Parse(ReadOnlySpan<char> typeName, bool throwOnError, TypeNameParseOptions? options = default) 46TypeName? parsedName = parser.ParseNextTypeName(allowFullyQualifiedName: true, ref recursiveDepth); 70private TypeName? ParseNextTypeName(bool allowFullyQualifiedName, ref int recursiveDepth) 90List<TypeName>? genericArgs = null; 108TypeName? genericArg = ParseNextTypeName(allowFullyQualifiedName: doubleBrackets, ref recursiveDepth); 123genericArgs = new List<TypeName>(2); 216TypeName? declaringType = GetDeclaringType(fullName, nestedNameLengths, assemblyName); 217TypeName result = new(fullName, assemblyName, declaringType: declaringType); 262private static TypeName? GetDeclaringType(string fullTypeName, List<int>? nestedNameLengths, AssemblyNameInfo? assemblyName) 271TypeName? declaringType = null;
src\System\Reflection\TypeNameResolver.CoreCLR.cs (10)
63TypeName? parsed = TypeNameParser.Parse(typeName, throwOnError); 87TypeName? parsed = TypeNameParser.Parse(typeName, throwOnError, new() { IsAssemblyGetType = true }); 118TypeName parsed = TypeName.Parse(typeName); 153TypeName? parsed = TypeNameParser.Parse(typeName, throwOnError); 201private Type? GetType(string escapedTypeName, ReadOnlySpan<string> nestedTypeNames, TypeName parsedName) 283return GetTypeFromDefaultAssemblies(TypeName.Unescape(escapedTypeName), nestedTypeNames, parsedName); 291type = runtimeAssembly.GetTypeCore(TypeName.Unescape(escapedTypeName), useReflectionForNestedTypes ? default : nestedTypeNames, 334nestedTypeNames[i], (i > 0) ? nestedTypeNames[i - 1] : TypeName.Unescape(escapedTypeName)), 344private Type? GetTypeFromDefaultAssemblies(string typeName, ReadOnlySpan<string> nestedTypeNames, TypeName parsedName)