1 instantiation of SynthesizedPrimaryConstructor
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3423var ctor = new SynthesizedPrimaryConstructor(this, syntax);
194 references to SynthesizedPrimaryConstructor
Microsoft.CodeAnalysis.CSharp (53)
Binder\Binder.CapturedParametersFinder.cs (3)
19private readonly SynthesizedPrimaryConstructor _primaryConstructor; 23private CapturedParametersFinder(SynthesizedPrimaryConstructor primaryConstructor, HashSet<string> namesToCheck, ArrayBuilder<ParameterSymbol> captured) 30public static IReadOnlyDictionary<ParameterSymbol, FieldSymbol> GetCapturedParameters(SynthesizedPrimaryConstructor primaryConstructor)
Binder\Binder.ValueChecks.cs (1)
939parameterSymbol.ContainingSymbol is SynthesizedPrimaryConstructor primaryConstructor &&
Binder\Binder_Expressions.cs (5)
1914var primaryCtor = parameter.ContainingSymbol as SynthesizedPrimaryConstructor; 2033private bool IsInDeclaringTypeInstanceMember(SynthesizedPrimaryConstructor primaryCtor) 4278if (constructor is SynthesizedPrimaryConstructor primaryConstructor && primaryConstructor.GetCapturedParameters().Any()) 4399constructor is not SynthesizedPrimaryConstructor &&
Binder\Binder_Operators.cs (1)
2606if (parameterSymbol.ContainingSymbol is SynthesizedPrimaryConstructor primaryConstructor &&
Binder\Binder_Symbols.cs (1)
1488if (colorColorValueReceiver is BoundParameter { ParameterSymbol: { ContainingSymbol: SynthesizedPrimaryConstructor primaryConstructor } parameter } &&
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1227var primaryConstructor = type.PrimaryConstructor;
Binder\BinderFactory.cs (1)
140internal InMethodBinder GetPrimaryConstructorInMethodBinder(SynthesizedPrimaryConstructor constructor)
Compilation\MethodBodySemanticModel.cs (1)
262if (MemberSymbol is SynthesizedPrimaryConstructor primaryCtor &&
Compilation\SyntaxTreeSemanticModel.cs (6)
180case TypeDeclarationSyntax { ParameterList: { }, PrimaryConstructorBaseTypeIfClass: { } } typeDeclaration when TryGetSynthesizedPrimaryConstructor(typeDeclaration) is SynthesizedPrimaryConstructor: 1089SynthesizedPrimaryConstructor symbol = TryGetSynthesizedPrimaryConstructor((TypeDeclarationSyntax)node); 1250private SynthesizedPrimaryConstructor TryGetSynthesizedPrimaryConstructor(TypeDeclarationSyntax node) 1253var symbol = (type as SourceMemberContainerTypeSymbol)?.PrimaryConstructor; 2428case TypeDeclarationSyntax typeDeclaration when TryGetSynthesizedPrimaryConstructor(typeDeclaration) is SynthesizedPrimaryConstructor ctor: 2495when typeDeclaration.PrimaryConstructorBaseTypeIfClass == declaredNode && TryGetSynthesizedPrimaryConstructor(typeDeclaration) is SynthesizedPrimaryConstructor ctor:
Compiler\MethodCompiler.cs (4)
1085methodSymbol is SynthesizedPrimaryConstructor || 1268if (methodSymbol is SynthesizedPrimaryConstructor primaryCtor) 1671isPrimaryConstructor: method is SynthesizedPrimaryConstructor); 1790if (method is SynthesizedPrimaryConstructor primaryCtor && method.ContainingType.IsStructType())
FlowAnalysis\DataFlowsOutWalker.cs (1)
234param.ContainingSymbol is SynthesizedPrimaryConstructor); // Primary constructor parameter can be used in other initializers and methods
FlowAnalysis\DefiniteAssignment.cs (4)
342(not SynthesizedPrimaryConstructor): 668!(captured is ParameterSymbol { ContainingSymbol: SynthesizedPrimaryConstructor primaryConstructor } parameter && 725if (symbol is ParameterSymbol { ContainingSymbol: SynthesizedPrimaryConstructor } parameter) 1819if (!parameter.IsThis && parameter.RefKind != RefKind.Out && parameter.ContainingSymbol is SynthesizedPrimaryConstructor primaryCtor)
FlowAnalysis\NullableWalker.cs (2)
2077if (symbol is ParameterSymbol { ContainingSymbol: SynthesizedPrimaryConstructor primaryConstructor } parameter && 2702if (methodSymbol is SynthesizedPrimaryConstructor)
FlowAnalysis\ReadWriteWalker.cs (1)
90Debug.Assert(!ignoreThisParameter || m is SynthesizedPrimaryConstructor);
Lowering\ClosureConversion\ClosureConversion.cs (2)
784_currentMethod is not SynthesizedPrimaryConstructor) 794Debug.Assert(_currentMethod is not SynthesizedPrimaryConstructor primaryConstructor ||
Lowering\LocalRewriter\LocalRewriter.cs (1)
276if (node.ParameterSymbol.ContainingSymbol is SynthesizedPrimaryConstructor primaryCtor &&
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
390return expression is BoundParameter { ParameterSymbol: { ContainingSymbol: SynthesizedPrimaryConstructor primaryCtor } parameter } &&
Symbols\Source\SourceMemberContainerSymbol.cs (13)
1025internal readonly SynthesizedPrimaryConstructor? PrimaryConstructor; 1034SynthesizedPrimaryConstructor? primaryConstructor, 2747public SynthesizedPrimaryConstructor? PrimaryConstructor; 2807public readonly SynthesizedPrimaryConstructor? PrimaryConstructor; 2823SynthesizedPrimaryConstructor? primaryConstructor, 3196internal SynthesizedPrimaryConstructor? PrimaryConstructor 3213SynthesizedPrimaryConstructor? primaryConstructor; 3283SynthesizedPrimaryConstructor? primaryConstructor; 3423var ctor = new SynthesizedPrimaryConstructor(this, syntax); 3909var ctor = declaredMembersAndInitializers.PrimaryConstructor; 3959var ctor = declaredMembersAndInitializers.PrimaryConstructor; 4017void addDeconstruct(SynthesizedPrimaryConstructor ctor, ImmutableArray<Symbol> positionalMembers) 4538!(SynthesizedRecordCopyCtor.HasCopyConstructorSignature(method) && method is not SynthesizedPrimaryConstructor))
Symbols\Source\SourceMemberMethodSymbol.cs (1)
766if (this is SynthesizedPrimaryConstructor primaryConstructor)
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (2)
15private readonly SynthesizedPrimaryConstructor _ctor; 20SynthesizedPrimaryConstructor ctor,
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
94return parameter.ContainingSymbol is SynthesizedPrimaryConstructor &&
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (140)
Semantics\PrimaryConstructorTests.cs (105)
520Assert.IsType<SynthesizedPrimaryConstructor>(ctor); 632if (ctor is SynthesizedPrimaryConstructor) 688Assert.IsType<SynthesizedPrimaryConstructor>(ctor); 714Assert.IsType<SynthesizedPrimaryConstructor>(c.InstanceConstructors[0]); 1870Assert.Empty(((SynthesizedPrimaryConstructor)symbol.GetSymbol().ContainingSymbol).GetCapturedParameters()); 5476var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5596var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5678var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5746var cConstructor = c.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5780var dConstructor = d.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5821var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5856var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5895var cConstructor = c.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5928var dConstructor = d.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 5973var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 6017var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 6057var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 6093var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 6147var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 7222var capturedParameters = comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters(); 7692Assert.Empty(((CSharpCompilation)verifier.Compilation).GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 8872Assert.Empty(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 8932Assert.Equal(1, comp.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 8933Assert.Empty(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 8985Assert.Empty(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 8986Assert.Equal(1, comp.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 8987Assert.Equal(1, comp.GetTypeByMetadataName("C3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 8988Assert.Equal(2, comp.GetTypeByMetadataName("C4").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 9007Assert.Equal(1, comp.GetTypeByMetadataName("C3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 9034Assert.Equal(2, comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 9136Assert.Equal(1, comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 9179Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9214Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9257Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9295Assert.NotEmpty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9326Assert.NotEmpty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9366Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9402Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9438Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9477Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9516Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9552Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9588Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9627Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9666Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9705Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9741Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9777Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9817Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9864Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9908Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9948Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9991Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10038Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10080Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10125Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10160Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10190Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10225Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10255Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10290Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10321Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10357Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10388Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10431Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10470Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10509Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10549Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10592Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10782Assert.Equal(isStatic, comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().IsEmpty()); 10826Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10827Assert.Empty(comp.GetTypeByMetadataName("S2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10828Assert.NotEmpty(comp.GetTypeByMetadataName("S3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10900Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10936Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10979Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11027Assert.Equal("System.String P1", comp1.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Single().Key.ToTestDisplayString()); 11028Assert.Equal("System.Int32 p2", comp1.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Single().Key.ToTestDisplayString()); 11029Assert.Equal(2, comp1.GetTypeByMetadataName("C3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 11059Assert.Empty(comp2.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11060Assert.Empty(comp2.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11100Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11144Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11190Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 13602Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 13798Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 13999Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 14225Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 14536Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 15102Assert.Single(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 15398Assert.Empty(comp.GetTypeByMetadataName("C").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters());
Semantics\RecordStructTests.cs (2)
3206var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single();
Semantics\RecordTests.cs (33)
9985var b1Ctor = comp.GetTypeByMetadataName("B1")!.GetMembersUnordered().OfType<SynthesizedPrimaryConstructor>().Single(); 22101Assert.Empty(((SynthesizedPrimaryConstructor)symbol.GetSymbol().ContainingSymbol).GetCapturedParameters()); 28159var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28273var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28412var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28483var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28567var cConstructor = c.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28614var dConstructor = d.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28668var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28716var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28767var cConstructor = c.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28813var dConstructor = d.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28871var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28929var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 28978var eConstructor = e.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 29027var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single(); 29096var constructor = cMember.GetMembers(".ctor").OfType<SynthesizedPrimaryConstructor>().Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\RecordTests.cs (1)
123if (ctor is SynthesizedPrimaryConstructor)