7 instantiations of TypeName
System.Reflection.Metadata (7)
System\Reflection\Metadata\TypeName.cs (3)
608return new TypeName(fullName: _fullName, 673return new TypeName(fullName: null, AssemblyName, elementOrGenericType: this, declaringType: _declaringType, genericTypeArguments: typeArguments); 677=> new TypeName(
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);
335 references to TypeName
ILCompiler.TypeSystem (16)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\CustomAttributeTypeNameParser.cs (16)
26if (!TypeName.TryParse(name.AsSpan(), out TypeName parsed, s_typeNameParseOptions)) 43if (!TypeName.TryParse(name.AsSpan(), out TypeName parsed, s_typeNameParseOptions)) 69static bool IsFullyQualified(TypeName typeName) 83foreach (var typeArgument in typeName.GetGenericArguments()) 106internal TypeDesc Resolve(TypeName typeName) 138private TypeDesc GetSimpleType(TypeName typeName) 140TypeName topLevelTypeName = typeName; 183private TypeDesc GetSimpleTypeFromModule(TypeName typeName, ModuleDesc module) 190return ((MetadataType)type).GetNestedType(System.Text.Encoding.UTF8.GetBytes(TypeName.Unescape(typeName.Name))); 195string fullName = TypeName.Unescape(typeName.FullName); 202System.Text.Encoding.UTF8.GetBytes(TypeName.Unescape(typeName.Namespace)), 203System.Text.Encoding.UTF8.GetBytes(TypeName.Unescape(typeName.Name)), throwIfNotFound: false); 206private TypeDesc GetGenericType(TypeName typeName) 212ImmutableArray<TypeName> typeArguments = typeName.GetGenericArguments();
illink (14)
Microsoft.Private.Windows.Core (68)
System\Private\Windows\BinaryFormat\ITypeResolver.cs (2)
16Type BindToType(TypeName typeName); 21bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type);
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (22)
17private static Dictionary<TypeName, Type>? s_knownTypes; 31public static bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type) 38{ TypeName.Parse(Types.ByteType), typeof(byte) }, 39{ TypeName.Parse(Types.SByteType), typeof(sbyte) }, 40{ TypeName.Parse(Types.Int16Type), typeof(short) }, 41{ TypeName.Parse(Types.UInt16Type), typeof(ushort) }, 42{ TypeName.Parse(Types.Int32Type), typeof(int) }, 43{ TypeName.Parse(Types.UInt32Type), typeof(uint) }, 44{ TypeName.Parse(Types.Int64Type), typeof(long) }, 45{ TypeName.Parse(Types.UInt64Type), typeof(ulong) }, 46{ TypeName.Parse(Types.DoubleType), typeof(double) }, 47{ TypeName.Parse(Types.SingleType), typeof(float) }, 48{ TypeName.Parse(Types.CharType), typeof(char) }, 49{ TypeName.Parse(Types.BooleanType), typeof(bool) }, 50{ TypeName.Parse(Types.StringType), typeof(string) }, 51{ TypeName.Parse(Types.DecimalType), typeof(decimal) }, 52{ TypeName.Parse(Types.DateTimeType), typeof(DateTime) }, 53{ TypeName.Parse(Types.TimeSpanType), typeof(TimeSpan) }, 54{ TypeName.Parse(Types.IntPtrType), typeof(IntPtr) }, 55{ TypeName.Parse(Types.UIntPtrType), typeof(UIntPtr) }, 56{ TypeName.Parse(Types.NotSupportedExceptionType), typeof(NotSupportedException) }, 167bool INrbfSerializer.TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type) => TryBindToType(typeName, out type);
System\Private\Windows\Nrbf\INrbfSerializer.cs (2)
34bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type); 47/// <see cref="TryBindToType(TypeName, out Type?)"/> and <see cref="TryGetObject(SerializationRecord, out object?)"/>
System\Private\Windows\Ole\Composition.cs (1)
193Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
719Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\DataRequest.cs (2)
28/// <see cref="TypeName"/>s read from the deserialized stream. 30public Func<TypeName, Type?>? Resolver { get; init; } = null;
System\Private\Windows\Ole\DataStore.cs (1)
199Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\IDataObjectInternal.cs (5)
96/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 103/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 112/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 122/// A user-provided function that maps <see cref="TypeName"/> to <see cref="Type"/>. 151Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\TypeBinder.cs (6)
43private readonly Func<TypeName, Type?>? _resolver; 46private Dictionary<FullyQualifiedTypeName, TypeName>? _cachedTypeNames; 87if (!_cachedTypeNames.TryGetValue(fullName, out TypeName? parsed)) 89parsed = TypeName.Parse(fullName.ToString()); 96public Type BindToType(TypeName typeName) => TryBindToType(typeName, out Type? type) 102public bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type)
System\Reflection\Metadata\TypeNameComparer.cs (6)
7/// Compares <see cref="TypeName"/>s. 9internal sealed class TypeNameComparer : IEqualityComparer<TypeName> 32public bool Equals(TypeName? x, TypeName? y) 47public int GetHashCode(TypeName obj) 63foreach (TypeName genericName in obj.GetGenericArguments())
System\TypeExtensions.cs (16)
12/// Helper methods for comparing <see cref="Type"/>s and <see cref="TypeName"/>s. 24TypeName typeName, 70ImmutableArray<TypeName> genericNames = typeName.GetGenericArguments(); 95/// <inheritdoc cref="Matches(Type, TypeName, TypeNameComparison)"/> 96internal static bool Matches(this TypeName x, TypeName y, TypeNameComparison comparison = TypeNameComparison.All) 130ImmutableArray<TypeName> genericNamesY = y.GetGenericArguments(); 131ImmutableArray<TypeName> genericNamesX = x.GetGenericArguments(); 217/// Convert <paramref name="type"/> to <see cref="TypeName"/>. Take into account type forwarding in order 218/// to create <see cref="TypeName"/> compatible with the type names serialized to the binary format.This 219/// method removes nullability wrapper from the top level type only because <see cref="TypeName"/> in the 222internal static TypeName ToTypeName(this Type type) 226return TypeName.Parse(type.AssemblyQualifiedName ?? type.FullName); 238/// Helper method that allows non-allocating conversion of a interpolated string to a <see cref="TypeName"/>. 240internal static TypeName ToTypeName(ref ValueStringBuilder builder) 244return TypeName.Parse(builder.AsSpan());
System\Types.cs (4)
49/// <inheritdoc cref="TypeName.Parse(ReadOnlySpan{char}, TypeNameParseOptions?)"/> 53/// <see cref="TypeName.Parse(ReadOnlySpan{char}, TypeNameParseOptions?)"/> 56public static TypeName ToTypeName(ref ValueStringBuilder builder) 60return TypeName.Parse(builder.AsSpan());
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\MyServices\ClipboardProxy.vb (2)
196''' <inheritdoc cref="Clipboard.TryGetData(Of T)(String, Func(Of TypeName, Type), ByRef T)" /> 197Public Function TryGetData(Of T)(format As String, resolver As Func(Of TypeName, Type), <Out> ByRef data As T) As Boolean
PresentationCore (18)
System\Windows\clipboard.cs (9)
301/// <see cref="TypeName"/> is allowed or throws a <see cref="NotSupportedException"/> if <see cref="TypeName"/> is not 325/// <see cref="TypeName"/> parameter can be matched according to the user requirements, for example, only namespace-qualified 365/// Avoid loading assemblies named in the <see cref="TypeName"/> argument of your <paramref name="resolver"/>. 371/// should be aware of <see cref="TypeName"/>s coming in with either .NET Framework assembly names or .NET ones. 379/// <see cref="TypeName.FullName"/> property. 443Func<TypeName, Type?> resolver, 461/// You must use the <see cref="TryGetData{T}(string, Func{TypeName, Type?}, out T)"/> with an explicit resolver. 475/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, out T)"/>
System\Windows\dataobject.cs (3)
142/// <inheritdoc cref="Clipboard.TryGetData{T}(string, Func{TypeName, Type}, out T)"/> 146Func<TypeName, Type?> resolver, 173Func<TypeName, Type?>? resolver,
System\Windows\DataObjectExtensions.cs (2)
56/// <inheritdoc cref="ITypedDataObject.TryGetData{T}(string, Func{Reflection.Metadata.TypeName, Type}, bool, out T)"/> 63Func<Reflection.Metadata.TypeName, Type?> resolver,
System\Windows\ITypedDataObject.cs (2)
41/// <inheritdoc cref="IDataObjectInternal.TryGetData{T}(string, Func{TypeName, Type}, bool, out T)" /> 45Func<TypeName, Type?> resolver,
System\Windows\Nrbf\WpfNrbfSerializer.cs (1)
24public static bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type)
System\Windows\Ole\DataObjectAdapter.cs (1)
44Func<TypeName, Type?> resolver,
System.Formats.Nrbf (61)
System\Formats\Nrbf\ArrayRectangularPrimitiveRecord.cs (2)
22private TypeName? _typeName; 35public override TypeName TypeName
System\Formats\Nrbf\ArraySingleObjectRecord.cs (1)
24public override TypeName TypeName
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (1)
36public override TypeName TypeName => TypeNameHelpers.GetPrimitiveSZArrayTypeName(TypeNameHelpers.GetPrimitiveType<T>());
System\Formats\Nrbf\ArraySingleStringRecord.cs (1)
25public override TypeName TypeName => TypeNameHelpers.GetPrimitiveSZArrayTypeName(TypeNameHelpers.StringPrimitiveType);
System\Formats\Nrbf\BinaryLibraryRecord.cs (2)
33public override TypeName TypeName => TypeName.Parse(nameof(BinaryLibraryRecord).AsSpan());
System\Formats\Nrbf\ClassInfo.cs (2)
23private TypeName? _typeName; 34internal TypeName TypeName
System\Formats\Nrbf\ClassRecord.cs (1)
23public override TypeName TypeName => ClassInfo.TypeName;
System\Formats\Nrbf\ClassTypeInfo.cs (2)
20internal ClassTypeInfo(TypeName typeName) => TypeName = typeName; 22internal TypeName TypeName { get; }
System\Formats\Nrbf\JaggedArrayRecord.cs (2)
26private TypeName? _typeName; 43public override TypeName TypeName => _typeName ??= _memberTypeInfo.GetArrayTypeName(ArrayInfo);
System\Formats\Nrbf\MemberReferenceRecord.cs (1)
34public override TypeName TypeName => GetReferencedRecord().TypeName;
System\Formats\Nrbf\MemberTypeInfo.cs (3)
113internal TypeName GetArrayTypeName(ArrayInfo arrayInfo) 117TypeName elementTypeName = binaryType switch 125BinaryType.SystemClass => (TypeName)additionalInfo!,
System\Formats\Nrbf\MessageEndRecord.cs (2)
27public override TypeName TypeName => TypeName.Parse(nameof(MessageEndRecord).AsSpan());
System\Formats\Nrbf\NrbfDecoder.cs (5)
389TypeName typeName = binaryType == BinaryType.SystemClass ? (TypeName)additionalInfo! : ((ClassTypeInfo)additionalInfo!).TypeName; 405TypeName typeName = binaryType == BinaryType.SystemClass ? (TypeName)additionalInfo! : ((ClassTypeInfo)additionalInfo!).TypeName; 439else if (binaryType == BinaryType.SystemClass && ((TypeName)additionalInfo!).IsArray)
System\Formats\Nrbf\NullsRecord.cs (2)
15public override TypeName TypeName => TypeName.Parse(GetType().Name.AsSpan());
System\Formats\Nrbf\PayloadOptions.cs (1)
19/// Gets or sets configuration options for parsing <see cref="TypeName"/> instances.
System\Formats\Nrbf\PrimitiveTypeRecordOfT.cs (1)
37public override TypeName TypeName => TypeNameHelpers.GetPrimitiveTypeName(TypeNameHelpers.GetPrimitiveType<T>());
System\Formats\Nrbf\RectangularArrayRecord.cs (2)
23private TypeName? _typeName; 41public override TypeName TypeName
System\Formats\Nrbf\SerializationRecord.cs (3)
44public abstract TypeName TypeName { get; } 63private static bool Matches(Type type, TypeName typeName) 123ImmutableArray<TypeName> genericNames = typeName.GetGenericArguments();
System\Formats\Nrbf\SerializedStreamHeaderRecord.cs (2)
27public override TypeName TypeName => TypeName.Parse(nameof(SerializedStreamHeaderRecord).AsSpan());
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (1)
31TypeName typeName = classInfo.TypeName;
System\Formats\Nrbf\SZArrayOfRecords.cs (2)
17private TypeName? _typeName; 32public override TypeName TypeName
System\Formats\Nrbf\Utils\TypeNameHelpers.cs (22)
20private static readonly TypeName?[] s_primitiveTypeNames = new TypeName?[(int)UIntPtrPrimitiveType + 1]; 21private static readonly TypeName?[] s_primitiveSZArrayTypeNames = new TypeName?[(int)UIntPtrPrimitiveType + 1]; 24internal static TypeName GetPrimitiveTypeName(PrimitiveType primitiveType) 26TypeName? typeName = s_primitiveTypeNames[(int)primitiveType]; 53s_primitiveTypeNames[(int)primitiveType] = typeName = TypeName.Parse(fullName.AsSpan()).WithCoreLibAssemblyName(); 58internal static TypeName GetPrimitiveSZArrayTypeName(PrimitiveType primitiveType) 60TypeName? typeName = s_primitiveSZArrayTypeNames[(int)primitiveType]; 110internal static TypeName ParseNonSystemClassRecordTypeName(this string rawName, BinaryLibraryRecord libraryRecord, PayloadOptions payloadOptions) 133TypeName.TryParse(assemblyQualifiedName.AsSpan(), out TypeName? typeName, payloadOptions.TypeNameParseOptions); 153internal static TypeName ParseSystemRecordTypeName(this string rawName, PayloadOptions payloadOptions) 157internal static TypeName WithCoreLibAssemblyName(this TypeName systemType) 160private static TypeName With(this TypeName typeName, AssemblyNameInfo assemblyName) 170TypeName newElementType = typeName.GetElementType().With(assemblyName); 178TypeName newGenericTypeDefinition = typeName.GetGenericTypeDefinition().With(assemblyName); 193private static TypeName ParseWithoutAssemblyName(string rawName, PayloadOptions payloadOptions) 195if (!TypeName.TryParse(rawName.AsSpan(), out TypeName? typeName, payloadOptions.TypeNameParseOptions)
System.Private.Windows.Core (69)
System\Private\Windows\BinaryFormat\ITypeResolver.cs (2)
16Type BindToType(TypeName typeName); 21bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type);
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (21)
17private static Dictionary<TypeName, Type>? s_knownTypes; 31public static bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type) 38{ TypeName.Parse(Types.ByteType), typeof(byte) }, 39{ TypeName.Parse(Types.SByteType), typeof(sbyte) }, 40{ TypeName.Parse(Types.Int16Type), typeof(short) }, 41{ TypeName.Parse(Types.UInt16Type), typeof(ushort) }, 42{ TypeName.Parse(Types.Int32Type), typeof(int) }, 43{ TypeName.Parse(Types.UInt32Type), typeof(uint) }, 44{ TypeName.Parse(Types.Int64Type), typeof(long) }, 45{ TypeName.Parse(Types.UInt64Type), typeof(ulong) }, 46{ TypeName.Parse(Types.DoubleType), typeof(double) }, 47{ TypeName.Parse(Types.SingleType), typeof(float) }, 48{ TypeName.Parse(Types.CharType), typeof(char) }, 49{ TypeName.Parse(Types.BooleanType), typeof(bool) }, 50{ TypeName.Parse(Types.StringType), typeof(string) }, 51{ TypeName.Parse(Types.DecimalType), typeof(decimal) }, 52{ TypeName.Parse(Types.DateTimeType), typeof(DateTime) }, 53{ TypeName.Parse(Types.TimeSpanType), typeof(TimeSpan) }, 54{ TypeName.Parse(Types.IntPtrType), typeof(IntPtr) }, 55{ TypeName.Parse(Types.UIntPtrType), typeof(UIntPtr) }, 56{ TypeName.Parse(Types.NotSupportedExceptionType), typeof(NotSupportedException) },
System\Private\Windows\Nrbf\INrbfSerializer.cs (2)
34bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type); 47/// <see cref="TryBindToType(TypeName, out Type?)"/> and <see cref="TryGetObject(SerializationRecord, out object?)"/>
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
586|| !TypeName.TryParse(assemblyQualifiedTypeName, out TypeName? typeName))
System\Private\Windows\Ole\Composition.cs (1)
193Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
719Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\DataRequest.cs (2)
28/// <see cref="TypeName"/>s read from the deserialized stream. 30public Func<TypeName, Type?>? Resolver { get; init; } = null;
System\Private\Windows\Ole\DataStore.cs (1)
199Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\IDataObjectInternal.cs (5)
96/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 103/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 112/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 122/// A user-provided function that maps <see cref="TypeName"/> to <see cref="Type"/>. 151Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\TypeBinder.cs (6)
43private readonly Func<TypeName, Type?>? _resolver; 46private Dictionary<FullyQualifiedTypeName, TypeName>? _cachedTypeNames; 87if (!_cachedTypeNames.TryGetValue(fullName, out TypeName? parsed)) 89parsed = TypeName.Parse(fullName.ToString()); 96public Type BindToType(TypeName typeName) => TryBindToType(typeName, out Type? type) 102public bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type)
System\Reflection\Metadata\TypeNameComparer.cs (6)
7/// Compares <see cref="TypeName"/>s. 9internal sealed class TypeNameComparer : IEqualityComparer<TypeName> 32public bool Equals(TypeName? x, TypeName? y) 47public int GetHashCode(TypeName obj) 63foreach (TypeName genericName in obj.GetGenericArguments())
System\TypeExtensions.cs (16)
12/// Helper methods for comparing <see cref="Type"/>s and <see cref="TypeName"/>s. 24TypeName typeName, 70ImmutableArray<TypeName> genericNames = typeName.GetGenericArguments(); 95/// <inheritdoc cref="Matches(Type, TypeName, TypeNameComparison)"/> 96internal static bool Matches(this TypeName x, TypeName y, TypeNameComparison comparison = TypeNameComparison.All) 130ImmutableArray<TypeName> genericNamesY = y.GetGenericArguments(); 131ImmutableArray<TypeName> genericNamesX = x.GetGenericArguments(); 217/// Convert <paramref name="type"/> to <see cref="TypeName"/>. Take into account type forwarding in order 218/// to create <see cref="TypeName"/> compatible with the type names serialized to the binary format.This 219/// method removes nullability wrapper from the top level type only because <see cref="TypeName"/> in the 222internal static TypeName ToTypeName(this Type type) 226return TypeName.Parse(type.AssemblyQualifiedName ?? type.FullName); 238/// Helper method that allows non-allocating conversion of a interpolated string to a <see cref="TypeName"/>. 240internal static TypeName ToTypeName(ref ValueStringBuilder builder) 244return TypeName.Parse(builder.AsSpan());
System\Types.cs (4)
49/// <inheritdoc cref="TypeName.Parse(ReadOnlySpan{char}, TypeNameParseOptions?)"/> 53/// <see cref="TypeName.Parse(ReadOnlySpan{char}, TypeNameParseOptions?)"/> 56public static TypeName ToTypeName(ref ValueStringBuilder builder) 60return TypeName.Parse(builder.AsSpan());
System.Reflection.Metadata (59)
System\Reflection\Metadata\TypeName.cs (47)
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 75TypeName? elementOrGenericType, 76TypeName? declaringType, 77ImmutableArray<TypeName> genericTypeArguments, 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 576ImmutableArray<TypeName> GetGenericArguments() => _genericArguments; 581/// Creates a new <see cref="TypeName" /> object that represents current simple name with provided assembly name. 586public TypeName WithAssemblyName(AssemblyNameInfo? assemblyName) 604TypeName? declaringType = IsNested 612genericTypeArguments: ImmutableArray<TypeName>.Empty, 617/// Creates a <see cref="TypeName" /> object representing a one-dimensional array 621/// A <see cref="TypeName" /> object representing a one-dimensional array 624public TypeName MakeSZArrayTypeName() => MakeElementTypeName(TypeNameParserHelpers.SZArray); 627/// Creates a <see cref="TypeName" /> object representing an array of the current type, 632/// A <see cref="TypeName" /> object representing an array of the current type, 636public TypeName MakeArrayTypeName(int rank) 642/// Creates a <see cref="TypeName" /> object that represents a pointer to the current type. 645/// A <see cref="TypeName" /> object that represents a pointer to the current type. 647public TypeName MakePointerTypeName() => MakeElementTypeName(TypeNameParserHelpers.Pointer); 650/// Creates a <see cref="TypeName" /> object that represents a managed reference to the current type. 653/// A <see cref="TypeName" /> object that represents a managed reference to the current type. 655public TypeName MakeByRefTypeName() => MakeElementTypeName(TypeNameParserHelpers.ByRef); 662/// A <see cref="TypeName" /> representing the constructed type name formed by using the elements 666public TypeName MakeGenericTypeName(ImmutableArray<TypeName> typeArguments) 676private TypeName MakeElementTypeName(int rankOrModifier) 682genericTypeArguments: ImmutableArray<TypeName>.Empty,
System\Reflection\Metadata\TypeNameParseOptions.cs (2)
11/// Limits the maximum value of <seealso cref="TypeName.GetNodeCount">node count</seealso> that parser can handle. 15/// Setting this to a large value can render <see cref="TypeName"/> susceptible to Denial of Service
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) 92ImmutableArray<TypeName>.Builder? genericArgs = null; 108TypeName? genericArg = ParseNextTypeName(allowFullyQualifiedName: doubleBrackets, ref recursiveDepth); 125genericArgs = ImmutableArray.CreateBuilder<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;
System.Resources.Extensions (3)
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.Windows.Forms (25)
System\Resources\ResXSerializationBinder.cs (4)
40if (_typeResolver is null || !TypeName.TryParse($"{typeName}, {assemblyName}".AsSpan(), out TypeName? parsed)) 83&& TypeName.TryParse(assemblyQualifiedTypeName.AsSpan(), out TypeName? parsed)
System\Windows\Forms\Nrbf\WinFormsNrbfSerializer.cs (2)
17private static Dictionary<TypeName, Type>? s_knownTypes; 22public static bool TryBindToType(TypeName typeName, [NotNullWhen(true)] out Type? type)
System\Windows\Forms\OLE\Clipboard.cs (9)
165/// <see cref="TypeName"/> is allowed or throws a <see cref="NotSupportedException"/> if <see cref="TypeName"/> is not 189/// <see cref="TypeName"/> parameter can be matched according to the user requirements, for example, only namespace-qualified 229/// Avoid loading assemblies named in the <see cref="TypeName"/> argument of your <paramref name="resolver"/>. 235/// should be aware of <see cref="TypeName"/>s coming in with either .NET Framework assembly names or .NET ones. 243/// <see cref="TypeName.FullName"/> property. 307Func<TypeName, Type?> resolver, 325/// You must use the <see cref="TryGetData{T}(string, Func{TypeName, Type?}, out T)"/> with an explicit resolver. 339/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, out T)"/>
System\Windows\Forms\OLE\DataObject.cs (5)
150/// <inheritdoc cref="Clipboard.TryGetData{T}(string, Func{TypeName, Type}, out T)"/> 154Func<TypeName, Type?> resolver, 183/// <inheritdoc cref="ITypedDataObject.TryGetData{T}(string, Func{TypeName, Type}, bool, out T)" /> 187Func<TypeName, Type?>? resolver, 265Func<TypeName, Type?>? resolver,
System\Windows\Forms\OLE\DataObjectAdapter.cs (1)
41Func<TypeName, Type?> resolver,
System\Windows\Forms\OLE\DataObjectExtensions.cs (2)
52/// <inheritdoc cref="ITypedDataObject.TryGetData{T}(string, Func{Reflection.Metadata.TypeName, Type}, bool, out T)"/> 59Func<Reflection.Metadata.TypeName, Type?> resolver,
System\Windows\Forms\OLE\ITypedDataObject.cs (2)
39/// <inheritdoc cref="IDataObjectInternal.TryGetData{T}(string, Func{TypeName, Type}, bool, out T)" /> 43Func<TypeName, Type?> resolver,