118 references to IsPartialDefinition
Microsoft.CodeAnalysis.CSharp (13)
Symbols\MemberSymbolExtensions.cs (1)
811
or SourcePropertySymbol {
IsPartialDefinition
: true }
Symbols\PublicModel\PropertySymbol.cs (1)
117
bool IPropertySymbol.IsPartialDefinition => (_underlying as SourcePropertySymbol)?.
IsPartialDefinition
?? false;
Symbols\Source\SourceMemberContainerSymbol.cs (5)
4104
property.
IsPartialDefinition
? ErrorCode.ERR_PartialPropertyMissingImplementation : ErrorCode.ERR_PartialPropertyMissingDefinition,
4191
else if (currentProperty.
IsPartialDefinition
&&
4192
(prevProperty.
IsPartialDefinition
|| (prevProperty.OtherPartOfPartial is SourcePropertySymbol otherDefinition && (object)otherDefinition != currentProperty)))
4212
var implementationAccessor = currentProperty.
IsPartialDefinition
? prevAccessor : currentAccessor;
4315
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)
8385
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8386
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8459
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8460
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8461
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
8462
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
8463
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8554
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
8555
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
8627
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8628
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8690
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8691
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
8744
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8745
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8822
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8823
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8824
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8825
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { HasInitializer: true } });
8897
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
8898
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
8899
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
8900
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { HasInitializer: true } });
8912
Assert.Equal(property.IsPartial, property.
IsPartialDefinition
);
8924
Assert.Equal(property.
IsPartialDefinition
, !otherPart.
IsPartialDefinition
);
8997
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
8998
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9073
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9074
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9075
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9076
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9077
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9078
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9150
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9151
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9152
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9153
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9154
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "Q2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9155
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "Q3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9273
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9274
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9275
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9276
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9277
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9278
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9279
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9280
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "Q1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9281
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "Q2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9282
Assert.True(actualProperties[9] is SourcePropertySymbol { Name: "Q3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9283
Assert.True(actualProperties[10] is SourcePropertySymbol { Name: "Q4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9284
Assert.True(actualProperties[11] is SourcePropertySymbol { Name: "Q5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9285
Assert.True(actualProperties[12] is SourcePropertySymbol { Name: "Q6",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9286
Assert.True(actualProperties[13] is SourcePropertySymbol { Name: "Q7",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
9358
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9359
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9360
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: { } });
9427
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9428
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9429
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9430
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9431
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9556
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9557
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9558
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9559
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9560
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9561
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9562
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9563
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P6",
IsPartialDefinition
: false, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9564
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: false, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9565
Assert.True(actualProperties[9] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: false, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9566
Assert.True(actualProperties[10] is SourcePropertySymbol { Name: "P5",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9567
Assert.True(actualProperties[11] is SourcePropertySymbol { Name: "P6",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9847
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9848
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9849
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9850
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9924
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9925
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9926
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
9927
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: true, BackingField: { } });
9998
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
9999
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10000
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
10001
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: false, BackingField: null });
10002
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "Q2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10003
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "Q3",
IsPartialDefinition
: true, IsAutoProperty: true, UsesFieldKeyword: false, BackingField: { } });
10086
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10087
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10088
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10153
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10154
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2",
IsPartialDefinition
: true, IsAutoProperty: false, UsesFieldKeyword: true, BackingField: { } });
10155
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
);