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