src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (42)
59RuntimeType rt = (RuntimeType)typeof(TEnum);
100internal static string? GetName(RuntimeType enumType, ulong uint64Value)
223RuntimeType rt = (RuntimeType)typeof(TEnum);
256internal static string[] GetNamesNoCopy(RuntimeType enumType)
292Array values = GetValuesAsUnderlyingTypeNoCopy((RuntimeType)typeof(TEnum));
339internal static Array GetValuesAsUnderlyingType(RuntimeType enumType)
369internal static Array GetValuesAsUnderlyingTypeNoCopy(RuntimeType enumType)
474RuntimeType rt = (RuntimeType)typeof(TEnum);
492internal static bool IsDefinedPrimitive<TStorage>(RuntimeType enumType, TStorage value)
723RuntimeType rt = ValidateRuntimeType(enumType);
774static bool TryParseRareTypes(RuntimeType rt, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out long result)
891RuntimeType rt = (RuntimeType)typeof(TEnum);
915RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TUnderlying result)
973RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TUnderlying result)
1043private static bool TryParseByName<TStorage>(RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TStorage result)
1357RuntimeType enumType = (RuntimeType)GetType();
1374static string HandleRareTypes(RuntimeType enumType, ref byte rawData) =>
1405RuntimeType enumType = (RuntimeType)GetType();
1425static string HandleRareTypes(RuntimeType enumType, char formatChar, ref byte rawData) =>
1452private static string ToString<TUnderlying, TStorage>(RuntimeType enumType, ref byte rawData)
1464private static string ToStringInlined<TUnderlying, TStorage>(RuntimeType enumType, ref byte rawData)
1481private static string ToString<TUnderlying, TStorage>(RuntimeType enumType, char format, ref byte rawData)
1494private static string ToStringInlined<TUnderlying, TStorage>(RuntimeType enumType, char format, ref byte rawData)
1630RuntimeType rtType = ValidateRuntimeType(enumType);
1690RuntimeType enumType = (RuntimeType)GetType();
1750RuntimeType rt = (RuntimeType)typeof(TEnum);
1809RuntimeType rt = (RuntimeType)typeof(TEnum);
1857private static bool TryFormatPrimitiveDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten)
1892private static bool TryFormatPrimitiveNonDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format)
2126private static RuntimeType ValidateRuntimeType(Type enumType)
2130RuntimeType? rt = enumType as RuntimeType;
2148throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeCustomAttributeData.cs (62)
33internal static IList<CustomAttributeData> GetCustomAttributesInternal(RuntimeType target)
43PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas);
57PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas);
71PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas);
145PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas);
164internal static CustomAttributeEncoding TypeToCustomAttributeEncoding(RuntimeType type)
274m_ctorParams[i] = new CustomAttributeCtorParameter(new CustomAttributeType((RuntimeType)parameters[i].ParameterType));
293new CustomAttributeType((RuntimeType)fi.FieldType));
301new CustomAttributeType((RuntimeType)pi.PropertyType));
773RuntimeType argumentType = (RuntimeType)namedArgument.Type.Resolve(module, default).ToType();
881public CustomAttributeType(RuntimeType parameterType)
891parameterType = (RuntimeType)parameterType.GetElementType()!;
899encodedEnumType = RuntimeCustomAttributeData.TypeToCustomAttributeEncoding((RuntimeType)Enum.GetUnderlyingType(parameterType));
918internal static bool IsDefined(RuntimeType type, RuntimeType? caType, bool inherit)
938type = (type.BaseType as RuntimeType)!;
949type = (type.BaseType as RuntimeType)!;
955internal static bool IsDefined(RuntimeMethodInfo method, RuntimeType caType, bool inherit)
990internal static bool IsDefined(RuntimeConstructorInfo ctor, RuntimeType caType)
1004internal static bool IsDefined(RuntimePropertyInfo property, RuntimeType caType)
1018internal static bool IsDefined(RuntimeEventInfo e, RuntimeType caType)
1032internal static bool IsDefined(RuntimeFieldInfo field, RuntimeType caType)
1047internal static bool IsDefined(RuntimeParameterInfo parameter, RuntimeType caType)
1062internal static bool IsDefined(RuntimeAssembly assembly, RuntimeType caType)
1075internal static bool IsDefined(RuntimeModule module, RuntimeType caType)
1089internal static object[] GetCustomAttributes(RuntimeType type, RuntimeType caType, bool inherit)
1098type = (type.GetGenericTypeDefinition() as RuntimeType)!;
1131type = (type.BaseType as RuntimeType)!;
1132} while (type != (RuntimeType)typeof(object) && type != null);
1142internal static object[] GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, bool inherit)
1192internal static object[] GetCustomAttributes(RuntimeConstructorInfo ctor, RuntimeType caType)
1206internal static object[] GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
1220internal static object[] GetCustomAttributes(RuntimeEventInfo e, RuntimeType caType)
1234internal static object[] GetCustomAttributes(RuntimeFieldInfo field, RuntimeType caType)
1250internal static object[] GetCustomAttributes(RuntimeParameterInfo parameter, RuntimeType caType)
1266internal static object[] GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
1281internal static object[] GetCustomAttributes(RuntimeModule module, RuntimeType caType)
1301int pcaCount, RuntimeType attributeFilterType)
1319private static bool MatchesTypeFilter(RuntimeType attributeType, RuntimeType attributeFilterType)
1323for (RuntimeType? type = attributeType; type != null; type = (RuntimeType?)type.BaseType)
1336RuntimeType attributeType, bool mustBeInheritable, ref ListBuilder<object> derivedAttributes)
1371internal static AttributeUsageAttribute GetAttributeUsage(RuntimeType decoratedAttribute)
1411internal static object[] CreateAttributeArrayHelper(RuntimeType caType, int elementCount)
1460private static readonly HashSet<RuntimeType> s_pca = CreatePseudoCustomAttributeHashSet();
1464private static HashSet<RuntimeType> CreatePseudoCustomAttributeHashSet()
1482HashSet<RuntimeType> set = new HashSet<RuntimeType>(pcas.Length);
1483foreach (RuntimeType runtimeType in pcas)
1496internal static void GetCustomAttributes(RuntimeType type, RuntimeType caType, ref ListBuilder<Attribute> pcas)
1518internal static bool IsDefined(RuntimeType type, RuntimeType? caType)
1540internal static void GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, ref ListBuilder<Attribute> pcas)
1563internal static bool IsDefined(RuntimeMethodInfo method, RuntimeType? caType)
1586internal static void GetCustomAttributes(RuntimeParameterInfo parameter, RuntimeType caType, ref ListBuilder<Attribute> pcas)
1619internal static bool IsDefined(RuntimeParameterInfo parameter, RuntimeType? caType)
1648internal static void GetCustomAttributes(RuntimeFieldInfo field, RuntimeType caType, ref ListBuilder<Attribute> pcas)
1680internal static bool IsDefined(RuntimeFieldInfo field, RuntimeType? caType)