261 references to BackingField
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder_Expressions.cs (2)
1461
field = property.
BackingField
;
1469
field = property.
BackingField
;
Binder\Binder_Statements.cs (1)
1820
if (propertySymbol is SourcePropertySymbolBase {
BackingField
: { } } sourceProperty)
Compilation\InitializerSemanticModel.cs (1)
167
BoundFieldEqualsValue result = binder.BindFieldInitializer(property.
BackingField
, equalsValue, diagnostics);
Compilation\SyntaxTreeSemanticModel.cs (1)
1143
GetFieldOrPropertyInitializerBinder(propertySymbol.
BackingField
, defaultOuter(), propertyDecl.Initializer));
Compiler\MethodBodySynthesizer.cs (1)
187
var field = property.
BackingField
;
FlowAnalysis\AbstractFlowPass.cs (2)
573
var backingField = (access.PropertySymbol as SourcePropertySymbolBase)?.
BackingField
;
2274
var backingField = (property as SourcePropertySymbolBase)?.
BackingField
;
FlowAnalysis\DefiniteAssignment.cs (3)
1108
member = (propSymbol as SourcePropertySymbolBase)?.
BackingField
;
1440
var backingField = (property as SourcePropertySymbolBase)?.
BackingField
;
2732
var backingField = (property as SourcePropertySymbolBase)?.
BackingField
;
FlowAnalysis\NullableWalker.cs (5)
684
var shouldForcePropertyAnalysis = !constructorEnforcesRequiredMembers && member is not SourcePropertySymbolBase {
BackingField
: not null } && member.IsRequired();
1030
=> requiredMember is SourcePropertySymbolBase {
BackingField
: { } backingField } ? backingField : requiredMember;
1042
var symbolAnnotations = property is SourcePropertySymbolBase { UsesFieldKeyword: true,
BackingField
: { } field }
2267
else if (symbol is SourcePropertySymbolBase { UsesFieldKeyword: true,
BackingField
: { } backingField })
10468
var field = property.
BackingField
;
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
314
var backingField = autoProp.
BackingField
;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
1750
definition.PartialImplementationPart == (object)implementation && implementation.
BackingField
!= (object)member)
5181
builder.AddInstanceInitializerForPositionalMembers(new FieldOrPropertyInitializer(property.
BackingField
, paramList.Parameters[param.Ordinal]));
Symbols\Source\SourcePropertySymbol.cs (1)
198
|| this.
BackingField
is not null);
Symbols\Source\SourcePropertySymbolBase.cs (2)
747
if (
BackingField
is null)
1320
_ =
BackingField
?.GetAttributes();
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
220
NullableWalker.AnalyzeIfNeeded(binder, boundGetAccessor, boundGetAccessor.Syntax, diagnostics, getterNullResilienceData: (getAccessor, _property.
BackingField
, assumedNullableAnnotation));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
Emit\EmitMetadataTests.cs (7)
948
var pBack = p.
BackingField
;
954
var qBack = q.
BackingField
;
960
var rBack = r.
BackingField
;
966
var sBack = s.
BackingField
;
1025
var qBack = q.
BackingField
;
1031
var rBack = r.
BackingField
;
1037
var sBack = s.
BackingField
;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (225)
FieldKeywordTests.cs (225)
924
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: true,
BackingField
: { } });
925
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: true,
BackingField
: { } });
926
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
927
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
928
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
929
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
1027
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "Q1", IsAutoProperty: true,
BackingField
: { } });
1028
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "Q2", IsAutoProperty: true,
BackingField
: { } });
1029
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "Q3", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
1030
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q4", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
1523
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1524
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1525
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1526
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1527
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1528
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1529
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
1693
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1694
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1695
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1696
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1697
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1698
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1699
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1700
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P8", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1701
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P9", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1860
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1861
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1862
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1863
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1864
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1865
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1866
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1867
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P8", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1868
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P9", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1966
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1967
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1968
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1969
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1970
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1971
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1972
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
1973
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P8", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
1974
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P9", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
2050
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
2051
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
2052
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
2053
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
2054
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
2055
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
2056
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
2057
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P8", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
2058
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P9", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
2171
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
2172
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2173
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
2174
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2175
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
2176
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
2177
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
2178
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P8", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2179
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P9", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2253
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
2254
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2255
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
2256
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2257
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
2258
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
2259
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
2260
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P8", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
2261
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P9", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8386
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
8387
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
8460
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8461
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8462
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
8463
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
8464
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8555
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
8556
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
8628
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
8629
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
8691
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
8692
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
8745
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8746
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8823
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
8824
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
8825
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
8826
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { HasInitializer: true } });
8898
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
8899
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
8900
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
8901
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { HasInitializer: true } });
8912
var field = (property.
BackingField
is null) ? null : (SynthesizedBackingFieldSymbol)fields[fieldIndex++];
8921
Assert.Same(property.
BackingField
, fieldOpt);
8927
Assert.Same(property.
BackingField
, otherPart.
BackingField
);
8998
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
8999
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9074
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9075
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
9076
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9077
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
9078
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9079
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
9151
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9152
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9153
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9154
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9155
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "Q2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9156
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "Q3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9274
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9275
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9276
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9277
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9278
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9279
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P6", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
9280
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P7", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
9281
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "Q1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9282
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "Q2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9283
Assert.True(actualProperties[9] is SourcePropertySymbol { Name: "Q3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9284
Assert.True(actualProperties[10] is SourcePropertySymbol { Name: "Q4", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9285
Assert.True(actualProperties[11] is SourcePropertySymbol { Name: "Q5", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9286
Assert.True(actualProperties[12] is SourcePropertySymbol { Name: "Q6", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
9287
Assert.True(actualProperties[13] is SourcePropertySymbol { Name: "Q7", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
9359
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9360
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9361
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: { } });
9428
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9429
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9430
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9431
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9432
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P5", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9557
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9558
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9559
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9560
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9561
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
9562
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
9563
Assert.True(actualProperties[6] is SourcePropertySymbol { Name: "P5", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9564
Assert.True(actualProperties[7] is SourcePropertySymbol { Name: "P6", IsPartialDefinition: false, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9565
Assert.True(actualProperties[8] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: false, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9566
Assert.True(actualProperties[9] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: false, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9567
Assert.True(actualProperties[10] is SourcePropertySymbol { Name: "P5", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
9568
Assert.True(actualProperties[11] is SourcePropertySymbol { Name: "P6", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9768
var field = property.
BackingField
;
9848
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9849
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9850
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9851
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9925
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9926
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9927
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
9928
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "P4", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: true,
BackingField
: { } });
9999
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
10000
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10001
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
10002
Assert.True(actualProperties[3] is SourcePropertySymbol { Name: "Q1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
10003
Assert.True(actualProperties[4] is SourcePropertySymbol { Name: "Q2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10004
Assert.True(actualProperties[5] is SourcePropertySymbol { Name: "Q3", IsPartialDefinition: true, IsAutoProperty: true, UsesFieldKeyword: false,
BackingField
: { } });
10087
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10088
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10089
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10154
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10155
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P2", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10156
Assert.True(actualProperties[2] is SourcePropertySymbol { Name: "P3", IsPartialDefinition: true, IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10352
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
10356
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P1", IsAutoProperty: false, UsesFieldKeyword: true,
BackingField
: { } });
10448
Assert.True(actualProperties[0] is SourcePropertySymbol { Name: "P2", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
10449
Assert.True(actualProperties[1] is SourcePropertySymbol { Name: "P3", IsAutoProperty: false, UsesFieldKeyword: false,
BackingField
: null });
10746
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
10747
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10768
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
10769
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10800
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
10801
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10880
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
10881
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10900
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
10901
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10921
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
10922
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10940
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
10941
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10960
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
10961
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
10984
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
10985
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11014
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11015
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11042
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11043
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11069
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11070
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11093
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11094
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11119
Assert.False(prop.
BackingField
.InfersNullableAnnotation);
11120
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11145
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11146
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11174
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11175
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11198
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11199
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11225
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
11226
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11254
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
11255
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11284
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
11285
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11312
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11313
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11351
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11352
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11383
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11384
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11418
Assert.False(prop.
BackingField
.InfersNullableAnnotation);
11419
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11448
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
11449
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11472
Assert.Equal(NullableAnnotation.Annotated, prop.
BackingField
.GetInferredNullableAnnotation());
11473
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
11514
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.GetInferredNullableAnnotation());
11515
Assert.Equal(NullableAnnotation.NotAnnotated, prop.
BackingField
.TypeWithAnnotations.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Symbols\DefaultInterfaceImplementationTests.cs (4)
3411
var field1 = ((SourcePropertySymbolBase)p1).
BackingField
;
3481
var field1 = ((SourcePropertySymbolBase)p1).
BackingField
;
3570
var field1 = ((SourcePropertySymbolBase)p1).
BackingField
;
3636
var field1 = ((SourcePropertySymbolBase)p1).
BackingField
;
Symbols\Source\RecordTests.cs (2)
164
var backing = x.
BackingField
;
198
backing = y.
BackingField
;