Base:
property
GetMethod
Microsoft.CodeAnalysis.CSharp.Symbols.PropertySymbol.GetMethod
48 references to GetMethod
Microsoft.CodeAnalysis.CSharp (13)
Binder\BinderFactory.BinderFactoryVisitor.cs (2)
286
accessor = (parent.Kind() == SyntaxKind.GetAccessorDeclaration) ? propertySymbol.
GetMethod
: propertySymbol.SetMethod;
405
var accessor = propertySymbol.
GetMethod
;
Symbols\Source\SourceMemberContainerSymbol.cs (4)
4317
Debug.Assert(property.
GetMethod
is object);
4319
members.Add(property.
GetMethod
);
4756
AddAccessorIfAvailable(builder.NonTypeMembers, property.
GetMethod
);
4881
AddAccessorIfAvailable(builder.NonTypeMembers, indexer.
GetMethod
);
Symbols\Source\SourcePropertySymbolBase.cs (7)
678
Debug.Assert(
GetMethod
is object);
710
bool hasGetAccessor =
GetMethod
is object;
786
CheckExplicitImplementationAccessor(
GetMethod
, explicitlyImplementedProperty.GetMethod, explicitlyImplementedProperty, diagnostics);
982
bool hasGetter =
GetMethod
is object;
1005
Debug.Assert(this.IsSealed && (
GetMethod
is null || SetMethod is null));
1007
if (
GetMethod
is object)
1537
if (
GetMethod
is not null)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
BreakingChanges.cs (2)
118
Assert.Equal(Accessibility.Public, derivedProperty1.
GetMethod
.DeclaredAccessibility);
122
Assert.Null(derivedProperty2.
GetMethod
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\RecordTests.cs (3)
18925
var equalityContractGet = equalityContract.
GetMethod
;
19041
var equalityContractGet = equalityContract.
GetMethod
;
19114
var equalityContractGet = equalityContract.
GetMethod
;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (30)
Symbols\Source\ExpressionBodiedPropertyTests.cs (24)
261
Assert.NotNull(p.
GetMethod
);
262
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
267
Assert.NotNull(indexer.
GetMethod
);
268
Assert.False(indexer.
GetMethod
.IsImplicitlyDeclared);
508
Assert.NotNull(p.
GetMethod
);
509
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
511
Assert.Equal(RefKind.Ref, p.
GetMethod
.RefKind);
531
Assert.NotNull(p.
GetMethod
);
532
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
534
Assert.Equal(RefKind.RefReadOnly, p.
GetMethod
.RefKind);
536
Assert.False(p.
GetMethod
.ReturnsByRef);
538
Assert.True(p.
GetMethod
.ReturnsByRefReadonly);
558
Assert.NotNull(p.
GetMethod
);
559
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
561
Assert.Equal(RefKind.RefReadOnly, p.
GetMethod
.RefKind);
562
Assert.Equal(RefKind.In, p.
GetMethod
.Parameters[0].RefKind);
564
Assert.False(p.
GetMethod
.ReturnsByRef);
566
Assert.True(p.
GetMethod
.ReturnsByRefReadonly);
586
Assert.NotNull(p.
GetMethod
);
587
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
589
Assert.Equal(RefKind.RefReadOnly, p.
GetMethod
.RefKind);
590
Assert.Equal(RefKind.In, p.
GetMethod
.Parameters[0].RefKind);
592
Assert.False(p.
GetMethod
.ReturnsByRef);
594
Assert.True(p.
GetMethod
.ReturnsByRefReadonly);
Symbols\Source\RecordTests.cs (6)
152
Assert.NotNull(x.
GetMethod
);
153
Assert.Equal(MethodKind.PropertyGet, x.
GetMethod
!.MethodKind);
170
var getAccessor = x.
GetMethod
;
186
Assert.NotNull(y.
GetMethod
);
187
Assert.Equal(MethodKind.PropertyGet, y.
GetMethod
!.MethodKind);
204
getAccessor = y.
GetMethod
;