31 references to ClosureKind
Microsoft.CodeAnalysis.CSharp (31)
Lowering\ClosureConversion\ClosureConversion.cs (18)
413ClosureKind closureKind; 424closureKind = ClosureKind.General; 431closureKind = ClosureKind.ThisOnly; 445closureKind = ClosureKind.Singleton; 453closureKind = ClosureKind.Static; 1014ClosureKind closureKind, 1054if (closureKind == ClosureKind.Singleton) 1059else if (closureKind == ClosureKind.Static) 1421ClosureKind closureKind; 1439private DebugId GetLambdaId(SyntaxNode syntax, ClosureKind closureKind, int closureOrdinal, ImmutableArray<DebugId> structClosureIds, RuntimeRudeEdit? closureRudeEdit) 1472Debug.Assert(closureKind == ClosureKind.Singleton); 1513out ClosureKind closureKind, 1570if (closureKind == ClosureKind.Static || closureKind == ClosureKind.Singleton) 1633ClosureKind closureKind; 1672var shouldCacheForStaticMethod = closureKind == ClosureKind.Singleton && 1705(closureKind == ClosureKind.General) ? -1 : topLevelMethodId.Ordinal, 1710var cacheField = new SynthesizedLambdaCacheFieldSymbol(translatedLambdaContainer, cacheVariableType, cacheVariableName, _topLevelMethod, isReadOnly: false, isStatic: closureKind == ClosureKind.Singleton);
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (13)
28ClosureKind closureKind, 57case ClosureKind.Singleton: // all type parameters on method (except the top level method's) 58case ClosureKind.General: // only lambda's type parameters on method (rest on class) 67case ClosureKind.ThisOnly: // all type parameters on method 68case ClosureKind.Static: 157private static DeclarationModifiers MakeDeclarationModifiers(ClosureKind closureKind, MethodSymbol originalMethod) 159var mods = closureKind == ClosureKind.ThisOnly ? DeclarationModifiers.Private : DeclarationModifiers.Internal; 161if (closureKind == ClosureKind.Static) 179private static string MakeName(string topLevelMethodName, string localFunctionName, DebugId topLevelMethodId, ClosureKind closureKind, DebugId lambdaId) 184(closureKind == ClosureKind.General) ? -1 : topLevelMethodId.Ordinal, 190private static string MakeName(string topLevelMethodName, DebugId topLevelMethodId, ClosureKind closureKind, DebugId lambdaId) 197(closureKind == ClosureKind.General) ? -1 : topLevelMethodId.Ordinal, 235public ClosureKind ClosureKind { get; }