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