1 instantiation of EnumInfo
System.Private.CoreLib (1)
src\System\Enum.CoreCLR.cs (1)
120
return new
EnumInfo
<TStorage>(hasFlagsAttribute, values, names!);
21 references to EnumInfo
System.Private.CoreLib (21)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (11)
163
private static string? GetName<TStorage>(
EnumInfo
<TStorage> enumInfo, TStorage value)
167
/// <summary>Look up the name for the specified underlying value using the cached <see cref="
EnumInfo
{TStorage}"/> for the associated enum.</summary>
169
/// <param name="enumInfo">The cached <see cref="
EnumInfo
{TStorage}"/> for the enum type.</param>
173
private static unsafe string? GetNameInlined<TStorage>(
EnumInfo
<TStorage> enumInfo, TStorage value)
495
EnumInfo
<TStorage> enumInfo = GetEnumInfo<TStorage>(enumType, getNames: false);
1049
EnumInfo
<TStorage> enumInfo = GetEnumInfo<TStorage>(enumType);
1471
EnumInfo
<TStorage> enumInfo = GetEnumInfo<TStorage>(enumType);
1505
EnumInfo
<TStorage> enumInfo = GetEnumInfo<TStorage>(enumType);
1862
EnumInfo
<TStorage> enumInfo = GetEnumInfo<TStorage>(enumType);
1928
private static string? FormatFlagNames<TStorage>(
EnumInfo
<TStorage> enumInfo, TStorage resultValue)
1961
private static bool TryFormatFlagNames<TStorage>(
EnumInfo
<TStorage> enumInfo, TStorage resultValue, Span<char> destination, out int charsWritten, ref bool isDestinationTooSmall)
src\System\Enum.CoreCLR.cs (10)
79
private static
EnumInfo
<TStorage> GetEnumInfo<TStorage>(RuntimeType enumType, bool getNames = true)
87
return enumType.FindCacheEntry<
EnumInfo
<TStorage>>() is {} info && (!getNames || info.Names is not null) ?
92
static
EnumInfo
<TStorage> InitializeEnumInfo(RuntimeType enumType, bool getNames)
98
? enumType.ReplaceCacheEntry(
EnumInfo
<TStorage>.Create(enumType, getNames: true))
99
: enumType.GetOrCreateCacheEntry<
EnumInfo
<TStorage>>();
103
internal sealed partial class EnumInfo<TStorage> : RuntimeType.IGenericCacheEntry<
EnumInfo
<TStorage>>
105
public static
EnumInfo
<TStorage> Create(RuntimeType type, bool getNames)
123
public static
EnumInfo
<TStorage> Create(RuntimeType type) => Create(type, getNames: false);
128
public static ref
EnumInfo
<TStorage>? GetStorageRef(RuntimeType.CompositeCacheEntry compositeEntry)
129
=> ref Unsafe.As<RuntimeType.IGenericCacheEntry?,
EnumInfo
<TStorage>?>(ref compositeEntry._enumInfo);