116 references to IsConstructor
Microsoft.CodeAnalysis.CSharp (12)
Compiler\MethodCompiler.cs (1)
2064
if (reportNullableDiagnostics && method.
IsConstructor
() && method.IsImplicitlyDeclared && nullableInitialState is object)
FlowAnalysis\NullableWalker.cs (7)
640
if ((_symbol as MethodSymbol)?.
IsConstructor
() != true || _useConstructorExitWarnings)
671
if (method.
IsConstructor
())
835
if (method.
IsConstructor
())
1534
Debug.Assert(method.
IsConstructor
());
2270
&& constructor.
IsConstructor
()
2807
if (method.
IsConstructor
() && method.IsStatic == backingField.IsStatic)
2974
else if (methodSymbol.
IsConstructor
())
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
311
Debug.Assert(_factory.CurrentFunction.
IsConstructor
());
Symbols\MemberSymbolExtensions.cs (1)
638
return methodSymbol.
IsConstructor
()
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2258
(method1.
IsConstructor
() ? method1.ContainingType.Name : method1.Name);
Symbols\Source\SourceMemberMethodSymbol.cs (1)
1028
Debug.Assert(!this.
IsConstructor
()); // Constructors should use IsNullableEnabledForConstructorsAndInitializers() instead.
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (51)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (51)
574
m.GlobalNamespace.GetTypeMember("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
577
m.GlobalNamespace.GetTypeMember("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
1060
m.GlobalNamespace.GetTypeMember("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
1063
m.GlobalNamespace.GetTypeMember("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
6916
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
6943
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
6949
foreach (var m in compilation.GetTypeByMetadataName("S2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
6978
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7006
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7040
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7073
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7079
foreach (var m in compilation.GetTypeByMetadataName("S2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7106
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7141
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7175
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7249
foreach (var m in compilation.GetTypeByMetadataName("I2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7255
foreach (var m in compilation.GetTypeByMetadataName("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7261
foreach (var m in compilation.GetTypeByMetadataName("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
7267
foreach (var m in compilation.GetTypeByMetadataName("I5").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
8685
m.GlobalNamespace.GetTypeMember("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
8690
m.GlobalNamespace.GetTypeMember("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
9276
m.GlobalNamespace.GetTypeMember("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
9281
m.GlobalNamespace.GetTypeMember("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single(),
18459
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18479
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18506
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18512
foreach (var m in compilation.GetTypeByMetadataName("S2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18537
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18543
foreach (var m in compilation.GetTypeByMetadataName("S2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18572
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18600
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18628
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18655
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18688
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18694
foreach (var m in compilation.GetTypeByMetadataName("S2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18724
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18730
foreach (var m in compilation.GetTypeByMetadataName("S2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18757
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18782
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18817
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18850
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18891
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18923
foreach (var m in compilation.GetTypeByMetadataName("S1").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
18997
foreach (var m in compilation.GetTypeByMetadataName("I2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19003
foreach (var m in compilation.GetTypeByMetadataName("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19009
foreach (var m in compilation.GetTypeByMetadataName("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19015
foreach (var m in compilation.GetTypeByMetadataName("I5").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19072
foreach (var m in compilation.GetTypeByMetadataName("I2").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19078
foreach (var m in compilation.GetTypeByMetadataName("C3").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19084
foreach (var m in compilation.GetTypeByMetadataName("C4").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
19090
foreach (var m in compilation.GetTypeByMetadataName("I5").GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (53)
Symbols\StaticAbstractMembersInInterfacesTests.cs (53)
15977
Assert.Equal(1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
16039
Assert.Equal(1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
16109
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
16522
Assert.Same(c2M01, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single());
16590
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
19768
Assert.Equal(isChecked ? 2 : 1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
19849
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
19941
Assert.Equal(matchingOp is null ? 1 : 2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
20039
Assert.Equal(isChecked ? 2 : 1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
20122
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
20214
Assert.Equal(matchingOp is null ? 1 : 2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
20303
Assert.Equal(matchingOp is null ? 1 : 2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
20393
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
20467
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
20550
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
20630
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
21426
Assert.Same(c2M01, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single());
21537
Assert.Same(c2M01, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single());
21671
Assert.Same(c2M01, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single());
21758
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
21818
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
21921
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
22508
Assert.Equal(Accessibility.Private, c1.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single().DeclaredAccessibility);
22658
Assert.Equal(Accessibility.Private, c1.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single().DeclaredAccessibility);
23398
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
23494
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
23584
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
23684
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
24022
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
24117
Assert.Equal(1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
24175
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
24279
Assert.Equal(1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
24469
Assert.Equal(1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
24527
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
24631
Assert.Equal(1, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
25135
Assert.Equal(2, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
25175
Assert.Equal(2, c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
25245
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
26176
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
26271
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
26371
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
26702
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
26819
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
27093
Assert.Equal(2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
27692
Assert.Equal(2, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
27807
Assert.Equal(2, c4.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
27910
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
29123
Assert.Equal(isChecked ? 4 : 2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
29250
Assert.Equal(isChecked ? 4 : 2, c.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Count());
29357
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
29884
Assert.Same(c2M01, c2.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single());
29982
Assert.Empty(c3.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()));
30320
Assert.Equal(Accessibility.Private, c1.GetMembers().OfType<MethodSymbol>().Where(m => !m.
IsConstructor
()).Single().DeclaredAccessibility);