1 instantiation of CodeGenerationConstructorInfo
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
CodeGenerationConstructorInfo.cs (1)
46
var info = new
CodeGenerationConstructorInfo
(isPrimaryConstructor, isUnsafe, typeName, statements, baseConstructorArguments, thisConstructorArguments);
26 references to CodeGenerationConstructorInfo
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
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)
CodeGenerationConstructorSymbol.cs (7)
45
CodeGenerationConstructorInfo
.Attach(result,
46
CodeGenerationConstructorInfo
.GetIsPrimaryConstructor(this),
47
CodeGenerationConstructorInfo
.GetIsUnsafe(this),
48
CodeGenerationConstructorInfo
.GetTypeName(this),
49
CodeGenerationConstructorInfo
.GetStatements(this),
50
CodeGenerationConstructorInfo
.GetBaseConstructorArgumentsOpt(this),
51
CodeGenerationConstructorInfo
.GetThisConstructorArgumentsOpt(this));
CodeGenerationSymbolFactory.cs (1)
135
CodeGenerationConstructorInfo
.Attach(result, isPrimaryConstructor, modifiers.IsUnsafe, typeName, statements, baseConstructorArguments, thisConstructorArguments);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
ConstructorGenerator.cs (7)
58
identifier:
CodeGenerationConstructorInfo
.GetTypeName(constructor).ToIdentifierToken(),
91
var thisArguments =
CodeGenerationConstructorInfo
.GetThisConstructorArgumentsOpt(constructor);
93
var arguments = !thisArguments.IsDefault ? thisArguments :
CodeGenerationConstructorInfo
.GetBaseConstructorArgumentsOpt(constructor);
94
var kind =
CodeGenerationConstructorInfo
.GetThisConstructorArgumentsOpt(constructor) != null
109
var statements =
CodeGenerationConstructorInfo
.GetStatements(constructor) == null
111
: StatementGenerator.GenerateStatements(
CodeGenerationConstructorInfo
.GetStatements(constructor));
129
if (
CodeGenerationConstructorInfo
.GetIsUnsafe(constructor))
NamedTypeGenerator.cs (1)
109
var primaryConstructor = members.OfType<IMethodSymbol>().FirstOrDefault(m =>
CodeGenerationConstructorInfo
.GetIsPrimaryConstructor(m));