64 references to GeneratedNameKind
Microsoft.CodeAnalysis.CSharp (64)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (11)
77case GeneratedNameKind.AwaiterField: 93case GeneratedNameKind.HoistedLocalField: 94case GeneratedNameKind.HoistedSynthesizedLocalField: 95case GeneratedNameKind.DisplayClassLocalOrField: 206if (!GeneratedNameParser.TryParseGeneratedName(name, out var generatedKind, out _, out var closeBracketOffset)) 211if (generatedKind is not (GeneratedNameKind.LambdaDisplayClass or GeneratedNameKind.LambdaMethod or GeneratedNameKind.LocalFunction or GeneratedNameKind.DisplayClassLocalOrField)) 219isDisplayClass = generatedKind == GeneratedNameKind.LambdaDisplayClass; 220isDisplayClassParentField = generatedKind == GeneratedNameKind.DisplayClassLocalOrField;
Symbols\Synthesized\GeneratedNameKind.cs (5)
70internal static bool IsTypeName(this GeneratedNameKind kind) 71=> kind is GeneratedNameKind.LambdaDisplayClass 72or GeneratedNameKind.StateMachineType 73or GeneratedNameKind.DynamicCallSiteContainerType 74or GeneratedNameKind.DelegateCacheContainerType
Symbols\Synthesized\GeneratedNameParser.cs (11)
20internal static GeneratedNameKind GetKind(string name) 21=> TryParseGeneratedName(name, out var kind, out _, out _) ? kind : GeneratedNameKind.None; 30out GeneratedNameKind kind, 52kind = (GeneratedNameKind)c; 58kind = GeneratedNameKind.None; 89internal static bool TryParseSourceMethodNameFromGeneratedName(string generatedName, GeneratedNameKind requiredKind, [NotNullWhen(true)] out string? methodName) 91if (!TryParseGeneratedName(generatedName, out var kind, out int openBracketOffset, out int closeBracketOffset)) 121if (!TryParseGeneratedName(generatedName, out var kind, out _, out int closeBracketOffset) || kind != GeneratedNameKind.LocalFunction) 179Debug.Assert((char)GeneratedNameKind.PrimaryConstructorParameter == 'P');
Symbols\Synthesized\GeneratedNames.cs (35)
23Debug.Assert((char)GeneratedNameKind.AutoPropertyBackingField == 'k'); 29Debug.Assert((char)GeneratedNameKind.PrimaryConstructorParameter == 'P'); 39Debug.Assert((char)GeneratedNameKind.IteratorFinallyMethod == 'm'); 45return MakeMethodScopedSynthesizedName(GeneratedNameKind.LambdaDisplayClass, methodOrdinal, generation); 54return MakeMethodScopedSynthesizedName(GeneratedNameKind.LambdaDisplayClass, methodOrdinal, generation, suffix: "DisplayClass", entityOrdinal: closureOrdinal, entityGeneration: closureGeneration); 83return MakeMethodScopedSynthesizedName(GeneratedNameKind.StateMachineType, methodOrdinal, generation, methodName); 88Debug.Assert((char)GeneratedNameKind.BaseMethodWrapper == 'n'); 101return MakeMethodScopedSynthesizedName(GeneratedNameKind.LambdaMethod, methodOrdinal, methodGeneration, methodName, entityOrdinal: lambdaOrdinal, entityGeneration: lambdaGeneration); 109return MakeMethodScopedSynthesizedName(GeneratedNameKind.LambdaCacheField, methodOrdinal, generation, entityOrdinal: lambdaOrdinal, entityGeneration: lambdaGeneration); 119return MakeMethodScopedSynthesizedName(GeneratedNameKind.LocalFunction, methodOrdinal, methodGeneration, methodName, localFunctionName, GeneratedNameConstants.LocalFunctionNameTerminator, lambdaOrdinal, lambdaGeneration); 123GeneratedNameKind kind, 229builder.Append((char)GeneratedNameKind.DisplayClassLocalOrField); 233builder.Append((char)GeneratedNameKind.HoistedLocalField); 237builder.Append((char)GeneratedNameKind.HoistedSynthesizedLocalField); 248Debug.Assert((char)GeneratedNameKind.AwaiterField == 'u'); 254Debug.Assert((char)GeneratedNameKind.LambdaCacheField == '9'); 278Debug.Assert((char)GeneratedNameKind.DisplayClassLocalOrField == '8'); 285Debug.Assert((char)GeneratedNameKind.FixedBufferField == 'e'); 292Debug.Assert((char)GeneratedNameKind.StateMachineStateField == '1'); 298Debug.Assert((char)GeneratedNameKind.AsyncIteratorPromiseOfValueOrEndBackingField == 'v'); 304Debug.Assert((char)GeneratedNameKind.CombinedTokensField == 'x'); 310Debug.Assert((char)GeneratedNameKind.IteratorCurrentBackingField == '2'); 316Debug.Assert((char)GeneratedNameKind.DisposeModeField == 'w'); 322Debug.Assert((char)GeneratedNameKind.IteratorCurrentThreadIdField == 'l'); 328Debug.Assert((char)GeneratedNameKind.StateMachineStateIdField == 'I'); 334Debug.Assert((char)GeneratedNameKind.ThisProxyField == '4'); 345Debug.Assert((char)GeneratedNameKind.StateMachineParameterProxyField == '3'); 351return MakeMethodScopedSynthesizedName(GeneratedNameKind.DynamicCallSiteContainerType, methodOrdinal, generation, 358Debug.Assert((char)GeneratedNameKind.DynamicCallSiteField == 'p'); 461Debug.Assert((char)GeneratedNameKind.InlineArrayType == 'y'); 470Debug.Assert((char)GeneratedNameKind.ReadOnlyListType == 'z'); 486Debug.Assert((char)GeneratedNameKind.AsyncBuilderField == 't'); 492const char NameKind = (char)GeneratedNameKind.DelegateCacheContainerType; 526Debug.Assert((char)GeneratedNameKind.ReusableHoistedLocalField == '7'); 552sb.Append((char)GeneratedNameKind.FileType);
Symbols\TypeSymbolExtensions.cs (2)
2269case GeneratedNameKind.LambdaDisplayClass: 2270case GeneratedNameKind.StateMachineType: