1 instantiation of CodeGenerationConstructorInfo
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
46
var info = new
CodeGenerationConstructorInfo
(isPrimaryConstructor, isUnsafe, typeName, statements, baseConstructorArguments, thisConstructorArguments);
26 references to CodeGenerationConstructorInfo
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
131
CodeGenerationConstructorInfo
.Attach(result, isPrimaryConstructor, modifiers.IsUnsafe, typeName, statements, baseConstructorArguments, thisConstructorArguments);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (10)
12
private static readonly ConditionalWeakTable<IMethodSymbol,
CodeGenerationConstructorInfo
> s_constructorToInfoMap = new();
46
var
info = new CodeGenerationConstructorInfo(isPrimaryConstructor, isUnsafe, typeName, statements, baseConstructorArguments, thisConstructorArguments);
50
private static
CodeGenerationConstructorInfo
? GetInfo(IMethodSymbol method)
52
s_constructorToInfoMap.TryGetValue(method, out
var
info);
74
private static ImmutableArray<SyntaxNode> GetThisConstructorArgumentsOpt(
CodeGenerationConstructorInfo
? info)
77
private static ImmutableArray<SyntaxNode> GetBaseConstructorArgumentsOpt(
CodeGenerationConstructorInfo
? info)
80
private static ImmutableArray<SyntaxNode> GetStatements(
CodeGenerationConstructorInfo
? info)
83
private static string GetTypeName(
CodeGenerationConstructorInfo
? info, IMethodSymbol constructor)
86
private static bool GetIsUnsafe(
CodeGenerationConstructorInfo
? info)
89
private static bool GetIsPrimaryConstructor(
CodeGenerationConstructorInfo
? info)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorSymbol.cs (7)
33
CodeGenerationConstructorInfo
.Attach(result,
34
CodeGenerationConstructorInfo
.GetIsPrimaryConstructor(this),
35
CodeGenerationConstructorInfo
.GetIsUnsafe(this),
36
CodeGenerationConstructorInfo
.GetTypeName(this),
37
CodeGenerationConstructorInfo
.GetStatements(this),
38
CodeGenerationConstructorInfo
.GetBaseConstructorArgumentsOpt(this),
39
CodeGenerationConstructorInfo
.GetThisConstructorArgumentsOpt(this));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (7)
59
identifier:
CodeGenerationConstructorInfo
.GetTypeName(constructor).ToIdentifierToken(),
92
var thisArguments =
CodeGenerationConstructorInfo
.GetThisConstructorArgumentsOpt(constructor);
94
var arguments = !thisArguments.IsDefault ? thisArguments :
CodeGenerationConstructorInfo
.GetBaseConstructorArgumentsOpt(constructor);
95
var kind =
CodeGenerationConstructorInfo
.GetThisConstructorArgumentsOpt(constructor) != null
110
var statements =
CodeGenerationConstructorInfo
.GetStatements(constructor) == null
112
: StatementGenerator.GenerateStatements(
CodeGenerationConstructorInfo
.GetStatements(constructor));
130
if (
CodeGenerationConstructorInfo
.GetIsUnsafe(constructor))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
114
var primaryConstructor = members.OfType<IMethodSymbol>().FirstOrDefault(m =>
CodeGenerationConstructorInfo
.GetIsPrimaryConstructor(m));