118 references to IsPartialDefinition
Microsoft.CodeAnalysis.CSharp (13)
Symbols\MemberSymbolExtensions.cs (1)
812
or SourcePropertySymbol {
IsPartialDefinition
: true }
Symbols\PublicModel\PropertySymbol.cs (1)
117
bool IPropertySymbol.IsPartialDefinition => (_underlying as SourcePropertySymbol)?.
IsPartialDefinition
?? false;
Symbols\Source\SourceMemberContainerSymbol.cs (5)
4050
property.
IsPartialDefinition
? ErrorCode.ERR_PartialPropertyMissingImplementation : ErrorCode.ERR_PartialPropertyMissingDefinition,
4137
else if (currentProperty.
IsPartialDefinition
&&
4138
(prevProperty.
IsPartialDefinition
|| (prevProperty.OtherPartOfPartial is SourcePropertySymbol otherDefinition && (object)otherDefinition != currentProperty)))
4158
var implementationAccessor = currentProperty.
IsPartialDefinition
? prevAccessor : currentAccessor;
4261
if (part1.
IsPartialDefinition
)
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
819
public sealed override MethodSymbol? PartialImplementationPart => _property is SourcePropertySymbol {
IsPartialDefinition
: true, OtherPartOfPartial: { } other }
827
internal bool IsPartialDefinition => _property is SourcePropertySymbol {
IsPartialDefinition
: true };
Symbols\Source\SourcePropertySymbol.cs (4)
716
if (
IsPartialDefinition
&& OtherPartOfPartial is { } implementation)
729
Debug.Assert(this.
IsPartialDefinition
);
835
internal SourcePropertySymbol? SourcePartialImplementationPart =>
IsPartialDefinition
? OtherPartOfPartial : null;
842
Debug.Assert(definition.
IsPartialDefinition
);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (94)
FieldKeywordTests.cs (94)
8510
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8511
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8584
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8585
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8586
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
8587
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
8588
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8679
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
8680
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
8752
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8753
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8815
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8816
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8869
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8870
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8947
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8948
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8949
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8950
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
9022
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
9023
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
9024
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
9025
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
9037
Assert.Equal(property.IsPartial, property.
IsPartialDefinition
);
9049
Assert.Equal(property.
IsPartialDefinition
, !otherPart.
IsPartialDefinition
);
9122
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9123
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9198
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9199
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9200
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9201
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9202
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9203
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9275
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9276
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9277
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9278
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9279
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "Q2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9280
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "Q3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9398
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9399
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9400
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9401
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9402
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9403
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9404
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9405
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "Q1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9406
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "Q2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9407
Assert.True(actualProperties[9] is SourcePropertySymbol { Name: "Q3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9408
Assert.True(actualProperties[10] is SourcePropertySymbol { Name: "Q4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9409
Assert.True(actualProperties[11] is SourcePropertySymbol { Name: "Q5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9410
Assert.True(actualProperties[12] is SourcePropertySymbol { Name: "Q6",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9411
Assert.True(actualProperties[13] is SourcePropertySymbol { Name: "Q7",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9483
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9484
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9485
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9552
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9553
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9554
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9555
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9556
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9681
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9682
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9683
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9684
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9685
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9686
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9687
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9688
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P6",
IsPartialDefinition
: false, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9689
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: false, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9690
Assert.True(actualProperties[9] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: false, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9691
Assert.True(actualProperties[10] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9692
Assert.True(actualProperties[11] is SourcePropertySymbol { Name: "P6",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9972
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9973
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9974
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9975
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10049
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10050
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
10051
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10052
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
10123
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
10124
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10125
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
10126
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
10127
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "Q2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10128
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "Q3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
10211
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10212
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10213
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10278
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10279
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10280
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\PartialPropertiesTests.cs (11)
47
Assert.True(prop.
IsPartialDefinition
);
368
Assert.True(prop.
IsPartialDefinition
);
405
Assert.True(prop.
IsPartialDefinition
);
409
Assert.True(duplicateProp.
IsPartialDefinition
);
924
Assert.True(propDefinition.
IsPartialDefinition
);
998
Assert.True(propDefinition.
IsPartialDefinition
);
1084
Assert.True(propDefinition.
IsPartialDefinition
);
1456
Assert.True(p1Def.
IsPartialDefinition
);
1679
Assert.True(p1.
IsPartialDefinition
);
1683
Assert.True(p2.
IsPartialDefinition
);
1687
Assert.True(p3.
IsPartialDefinition
);