4 instantiations of TypeName
System.Reflection.Metadata (4)
System\Reflection\Metadata\TypeNameParser.cs (4)
187TypeName result = new(fullName, assemblyName, declaringType: declaringType); 190result = new(fullName: null, assemblyName, elementOrGenericType: result, declaringType, genericArgs); 197result = new(fullName: null, assemblyName, elementOrGenericType: result, rankOrModifier: (sbyte)parsedModifier); 242declaringType = new(fullTypeName, assemblyName, declaringType: declaringType, nestedNameLength: fullNameLength);
126 references to TypeName
System.Reflection.Metadata (33)
System\Reflection\Metadata\TypeName.cs (20)
35private readonly TypeName? _elementOrGenericType; 36private readonly TypeName? _declaringType; 40private readonly ImmutableArray<TypeName> _genericArguments; 46TypeName? elementOrGenericType = default, 47TypeName? declaringType = default, 51ImmutableArray<TypeName>.Builder? genericTypeArguments = default, 67? ImmutableArray<TypeName>.Empty 82/// Returns assembly name which contains this type, or null if this <see cref="TypeName"/> was not 95public TypeName DeclaringType 256/// Represents the total number of <see cref="TypeName"/> instances that are used to describe 262/// as the total number of <see cref="TypeName"/> instances that would be created if 263/// you were to totally deconstruct this instance and visit each intermediate <see cref="TypeName"/> 270/// involves inspecting 8 <see cref="TypeName"/> instances total: 300foreach (TypeName genericArgument in GetGenericArguments()) 315public TypeName GetElementType() 332public TypeName GetGenericTypeDefinition() 350public static TypeName Parse(ReadOnlySpan<char> typeName, TypeNameParseOptions? options = default) 360public static bool TryParse(ReadOnlySpan<char> typeName, [NotNullWhen(true)] out TypeName? result, TypeNameParseOptions? options = default) 382/// If this <see cref="TypeName"/> represents a constructed generic type, returns an array 393ImmutableArray<TypeName> GetGenericArguments() => _genericArguments;
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); 68private TypeName? ParseNextTypeName(bool allowFullyQualifiedName, ref int recursiveDepth) 88ImmutableArray<TypeName>.Builder? genericArgs = null; 104TypeName? genericArg = ParseNextTypeName(allowFullyQualifiedName: doubleBrackets, ref recursiveDepth); 121genericArgs = ImmutableArray.CreateBuilder<TypeName>(2); 186TypeName? declaringType = GetDeclaringType(fullName, nestedNameLengths, assemblyName); 187TypeName result = new(fullName, assemblyName, declaringType: declaringType); 229private static TypeName? GetDeclaringType(string fullTypeName, List<int>? nestedNameLengths, AssemblyNameInfo? assemblyName) 236TypeName? declaringType = null;
System\Reflection\Metadata\TypeNameParserHelpers.cs (2)
22internal static string GetGenericTypeFullName(ReadOnlySpan<char> fullTypeName, ReadOnlySpan<TypeName> genericArgs) 30foreach (TypeName genericArg in genericArgs)
System\Reflection\Metadata\TypeNameParserOptions.cs (1)
11/// Limits the maximum value of <seealso cref="TypeName.GetNodeCount">node count</seealso> that parser can handle.
System.Resources.Extensions (48)
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArrayOfClassesRecord.cs (2)
12private TypeName? _elementTypeName; 27public override TypeName ElementTypeName => _elementTypeName ??= MemberTypeInfo.GetElementTypeName();
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArrayRecord.cs (1)
51public abstract TypeName ElementTypeName { get; }
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArraySingleObjectRecord.cs (3)
19private static TypeName? s_elementTypeName; 25public override TypeName ElementTypeName 26=> s_elementTypeName ??= TypeName.Parse(typeof(object).FullName.AsSpan()).WithCoreLibAssemblyName();
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArraySinglePrimitiveRecord.cs (3)
27private static TypeName? s_elementTypeName; 37public override TypeName ElementTypeName 38=> s_elementTypeName ??= TypeName.Parse(typeof(T).FullName.AsSpan()).WithAssemblyName(typeof(T).GetAssemblyNameIncludingTypeForwards());
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ArraySingleStringRecord.cs (3)
19private static TypeName? s_elementTypeName; 25public override TypeName ElementTypeName 26=> s_elementTypeName ??= TypeName.Parse(typeof(string).FullName.AsSpan()).WithCoreLibAssemblyName();
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\BinaryArrayRecord.cs (2)
29private TypeName? _elementTypeName; 43public override TypeName ElementTypeName
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ClassInfo.cs (2)
22private TypeName? _typeName; 33internal TypeName TypeName
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ClassRecord.cs (1)
27public TypeName TypeName => ClassInfo.TypeName;
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\ClassTypeInfo.cs (2)
20internal ClassTypeInfo(TypeName typeName) => TypeName = typeName; 22internal TypeName TypeName { get; }
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\MemberTypeInfo.cs (12)
155TypeName typeName = (TypeName)additionalInfo!; 189TypeName typeName = (TypeName)additionalInfo!; 210internal TypeName GetElementTypeName() 217return TypeName.Parse(typeof(string).FullName.AsSpan()).WithCoreLibAssemblyName(); 219return TypeName.Parse(typeof(string[]).FullName.AsSpan()).WithCoreLibAssemblyName(); 221return TypeName.Parse(typeof(object).FullName.AsSpan()).WithCoreLibAssemblyName(); 223return TypeName.Parse(typeof(object[]).FullName.AsSpan()).WithCoreLibAssemblyName(); 246? TypeName.Parse($"{name}[], {TypeNameExtensions.CoreLibAssemblyName}".AsSpan()) 247: TypeName.Parse(name.AsSpan()).WithCoreLibAssemblyName(); 250return (TypeName)additionalInfo!;
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\RectangularOrCustomOffsetArrayRecord.cs (2)
18private TypeName? _elementTypeName; 46public override TypeName ElementTypeName
src\libraries\System.Runtime.Serialization.BinaryFormat\src\System\Runtime\Serialization\BinaryFormat\Utils\TypeNameExtensions.cs (12)
16internal static TypeName ParseNonSystemClassRecordTypeName(this string rawName, BinaryLibraryRecord libraryRecord, PayloadOptions payloadOptions) 22TypeName.TryParse(assemblyQualifiedName.AsSpan(), out TypeName? typeName, payloadOptions.TypeNameParseOptions); 42internal static TypeName ParseSystemRecordTypeName(this string rawName, PayloadOptions payloadOptions) 47TypeName.TryParse(assemblyQualifiedName.AsSpan(), out TypeName? typeName, payloadOptions.TypeNameParseOptions); 53internal static TypeName WithCoreLibAssemblyName(this TypeName systemType) 56internal static TypeName WithAssemblyName(this TypeName typeName, string assemblyName) 65TypeName result = TypeName.Parse(assemblyQualifiedName.AsSpan());
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.ITypeResolver.cs (1)
21Type GetType(TypeName typeName);
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (2)
38Type ITypeResolver.GetType(TypeName typeName) 88private static Type? GetSimplyNamedTypeFromAssembly(Assembly assembly, TypeName typeName)
System.Runtime.Serialization.BinaryFormat (45)
System\Runtime\Serialization\BinaryFormat\ArrayOfClassesRecord.cs (2)
12private TypeName? _elementTypeName; 27public override TypeName ElementTypeName => _elementTypeName ??= MemberTypeInfo.GetElementTypeName();
System\Runtime\Serialization\BinaryFormat\ArrayRecord.cs (1)
51public abstract TypeName ElementTypeName { get; }
System\Runtime\Serialization\BinaryFormat\ArraySingleObjectRecord.cs (3)
19private static TypeName? s_elementTypeName; 25public override TypeName ElementTypeName 26=> s_elementTypeName ??= TypeName.Parse(typeof(object).FullName.AsSpan()).WithCoreLibAssemblyName();
System\Runtime\Serialization\BinaryFormat\ArraySinglePrimitiveRecord.cs (3)
27private static TypeName? s_elementTypeName; 37public override TypeName ElementTypeName 38=> s_elementTypeName ??= TypeName.Parse(typeof(T).FullName.AsSpan()).WithAssemblyName(typeof(T).GetAssemblyNameIncludingTypeForwards());
System\Runtime\Serialization\BinaryFormat\ArraySingleStringRecord.cs (3)
19private static TypeName? s_elementTypeName; 25public override TypeName ElementTypeName 26=> s_elementTypeName ??= TypeName.Parse(typeof(string).FullName.AsSpan()).WithCoreLibAssemblyName();
System\Runtime\Serialization\BinaryFormat\BinaryArrayRecord.cs (2)
29private TypeName? _elementTypeName; 43public override TypeName ElementTypeName
System\Runtime\Serialization\BinaryFormat\ClassInfo.cs (2)
22private TypeName? _typeName; 33internal TypeName TypeName
System\Runtime\Serialization\BinaryFormat\ClassRecord.cs (1)
27public TypeName TypeName => ClassInfo.TypeName;
System\Runtime\Serialization\BinaryFormat\ClassTypeInfo.cs (2)
20internal ClassTypeInfo(TypeName typeName) => TypeName = typeName; 22internal TypeName TypeName { get; }
System\Runtime\Serialization\BinaryFormat\MemberTypeInfo.cs (12)
155TypeName typeName = (TypeName)additionalInfo!; 189TypeName typeName = (TypeName)additionalInfo!; 210internal TypeName GetElementTypeName() 217return TypeName.Parse(typeof(string).FullName.AsSpan()).WithCoreLibAssemblyName(); 219return TypeName.Parse(typeof(string[]).FullName.AsSpan()).WithCoreLibAssemblyName(); 221return TypeName.Parse(typeof(object).FullName.AsSpan()).WithCoreLibAssemblyName(); 223return TypeName.Parse(typeof(object[]).FullName.AsSpan()).WithCoreLibAssemblyName(); 246? TypeName.Parse($"{name}[], {TypeNameExtensions.CoreLibAssemblyName}".AsSpan()) 247: TypeName.Parse(name.AsSpan()).WithCoreLibAssemblyName(); 250return (TypeName)additionalInfo!;
System\Runtime\Serialization\BinaryFormat\RectangularOrCustomOffsetArrayRecord.cs (2)
18private TypeName? _elementTypeName; 46public override TypeName ElementTypeName
System\Runtime\Serialization\BinaryFormat\Utils\TypeNameExtensions.cs (12)
16internal static TypeName ParseNonSystemClassRecordTypeName(this string rawName, BinaryLibraryRecord libraryRecord, PayloadOptions payloadOptions) 22TypeName.TryParse(assemblyQualifiedName.AsSpan(), out TypeName? typeName, payloadOptions.TypeNameParseOptions); 42internal static TypeName ParseSystemRecordTypeName(this string rawName, PayloadOptions payloadOptions) 47TypeName.TryParse(assemblyQualifiedName.AsSpan(), out TypeName? typeName, payloadOptions.TypeNameParseOptions); 53internal static TypeName WithCoreLibAssemblyName(this TypeName systemType) 56internal static TypeName WithAssemblyName(this TypeName typeName, string assemblyName) 65TypeName result = TypeName.Parse(assemblyQualifiedName.AsSpan());