9 overrides of GetMethod
Microsoft.CodeAnalysis.CSharp (9)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
71public override MethodSymbol GetMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
194public override MethodSymbol GetMethod
Symbols\ErrorPropertySymbol.cs (1)
57public override MethodSymbol GetMethod { get { return null; } }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
601public override MethodSymbol GetMethod
Symbols\NativeIntegerTypeSymbol.cs (1)
450public override MethodSymbol? GetMethod { get; }
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
123public override MethodSymbol GetMethod
Symbols\SignatureOnlyPropertySymbol.cs (1)
102public override MethodSymbol GetMethod { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourcePropertySymbolBase.cs (1)
538public sealed override MethodSymbol? GetMethod
Symbols\SubstitutedPropertySymbol.cs (1)
86public override MethodSymbol GetMethod
788 references to GetMethod
Microsoft.CodeAnalysis.CSharp (68)
Binder\Binder.ValueChecks.cs (4)
1889PropertySymbol p => p.GetMethod, 2073PropertySymbol p => p.GetMethod ?? p.SetMethod, 2381PropertySymbol p => p.GetMethod ?? p.SetMethod, 2614PropertySymbol p => p.GetMethod?.IsEffectivelyReadOnly != false && p.SetMethod?.IsEffectivelyReadOnly != false,
Binder\Binder_Attributes.cs (1)
621var getMethod = propertySymbol.GetMethod;
Binder\Binder_Lookup.cs (1)
1552method1 = property.GetMethod;
Emitter\Model\PropertySymbolAdapter.cs (2)
32var getMethod = AdaptedPropertySymbol.GetMethod?.GetCciAdapter(); 69MethodSymbol getMethod = AdaptedPropertySymbol.GetMethod;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
521var getMethod = property.AdaptedPropertySymbol.GetMethod?.GetCciAdapter();
FlowAnalysis\AbstractFlowPass.cs (1)
3496property.GetOwnOrInheritedSetMethod() ?? property.GetMethod;
FlowAnalysis\NullableWalker.cs (2)
9804ApplyMemberPostConditions(node.ReceiverOpt, property.GetMethod); 9926var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
FlowAnalysis\NullableWalker_Patterns.cs (2)
505if (property.GetMethod is not null) 508ApplyMemberPostConditions(inputSlot, property.GetMethod);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
358MethodSymbol isCompletedMethod = ((object)node.AwaitableInfo.IsCompleted != null) ? VisitMethodSymbol(node.AwaitableInfo.IsCompleted.GetMethod) : null;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
980membersBuilder.Add(_bound.MethodInfo(AnonymousTypeManager.GetAnonymousTypeProperty(anonType, i).GetMethod));
Lowering\IteratorRewriter\IteratorRewriter.cs (3)
159var getter = symbol.GetMethod; 216var IEnumerator_get_Current = F.SpecialProperty(SpecialMember.System_Collections_IEnumerator__Current).GetMethod; 219var IEnumeratorOfElementType_get_Current = F.SpecialProperty(SpecialMember.System_Collections_Generic_IEnumerator_T__Current).GetMethod.AsMember(IEnumeratorOfElementType);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (2)
183MethodMayMutateReceiver(node.ReceiverOpt, node.PropertySymbol.GetMethod); 317MethodMayMutateReceiver(node.ReceiverOpt, node.Indexer.GetMethod);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (3)
242Debug.Assert(e.Property.GetMethod.ParameterCount == 1); 243Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 244TypeSymbol type = e.Property.GetMethod.ReturnType;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
261MethodSymbol invocationListAccessor = invocationListProperty.GetMethod;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
375MethodSymbol currentManagedThreadIdMethod = currentManagedThreadIdProperty.GetMethod;
Symbols\MemberSymbolExtensions.cs (1)
135return isImplementableAndNotPublic(propertySymbol.GetMethod) || isImplementableAndNotPublic(propertySymbol.SetMethod);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
394MethodSymbol getMethod = curr.GetMethod; 698if (!prop.GetMethod.IsImplementable())
Symbols\NativeIntegerTypeSymbol.cs (1)
437GetMethod = getAccessor(container, this, underlyingProperty.GetMethod);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
260MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.GetMethod : propertyHiddenByProperty.SetMethod;
Symbols\PropertySymbol.cs (2)
181return (object)property.GetMethod == null; 256MethodSymbol accessor = GetMethod ?? SetMethod;
Symbols\PropertySymbolExtensions.cs (1)
21MethodSymbol getMethod = property.GetMethod;
Symbols\PublicModel\PropertySymbol.cs (1)
53get { return _underlying.GetMethod.GetPublicSymbol(); }
Symbols\Retargeting\RetargetingPropertySymbol.cs (2)
127return (object)_underlyingProperty.GetMethod == null 129: this.RetargetingTranslator.Retarget(_underlyingProperty.GetMethod);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
318checkAccessorIsAccessibleIfImplementable(propertySymbol.GetMethod);
Symbols\Source\SourceMemberContainerSymbol.cs (6)
3576MethodSymbol accessor = getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod; 3654var locationFrom = (Symbol)(getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod) ?? propertySymbol; 4008Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 4290else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 4398members.Add(equalityContract.GetMethod); 4428if (equalityContract.GetMethod is null)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
571var getMethod = property.GetMethod; 817else if (associatedProperty.GetMethod == overridingMember && (object)overriddenProperty.GetMethod == null) 1097if (overridingProperty.GetMethod is object) 1101overridingProperty.GetMethod.Locations[0], 1103overridingProperty.GetMethod, 1140if (overridingProperty.GetMethod != ownOrInheritedGetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedGetMethod, overridingType, ref useSiteInfo))
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
617? explicitlyImplementedPropertyOpt.GetMethod 664? explicitlyImplementedPropertyOpt.GetMethod
Symbols\Source\SourcePropertySymbolBase.cs (1)
786CheckExplicitImplementationAccessor(GetMethod, explicitlyImplementedProperty.GetMethod, explicitlyImplementedProperty, diagnostics);
Symbols\SubstitutedPropertySymbol.cs (1)
90MethodSymbol originalGetMethod = OriginalDefinition.GetMethod;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (3)
26Debug.Assert(positionalMembers.All(p => p is PropertySymbol { GetMethod: not null } or FieldSymbol)); 117var getterMethod = property.GetMethod; 118return property.GetMethod is not null && !getterMethod.IsEffectivelyReadOnly;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
76if (_equalityContract.GetMethod is null)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
59if (_equalityContract.GetMethod is null)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (3)
314var getterMethod = property.GetMethod; 315if (property.GetMethod is not null && !getterMethod.IsEffectivelyReadOnly) 331return !property.IsIndexer && !property.IsOverride && property.GetMethod is not null;
Symbols\TypeSymbol.cs (3)
1404interfaceAccessor1 = interfaceProperty.GetMethod; 1879var implementingGetMethod = implementedProperty.GetMethod.IsImplementable() ? 1889implementedProperty.GetMethod,
Symbols\VarianceSafety.cs (2)
192bool hasGetter = (object)property.GetMethod != null; 199requireInputSafety: hasSetter || !(property.GetMethod?.RefKind == RefKind.None),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (63)
BreakingChanges.cs (2)
106Assert.Equal(Accessibility.Public, baseProperty1.GetMethod.DeclaredAccessibility); 110Assert.Equal(Accessibility.ProtectedOrInternal, baseProperty2.GetMethod.DeclaredAccessibility);
CodeGen\CodeGenFunctionPointersTests.cs (1)
799verifier(property.GetMethod.ReturnType);
CodeGen\CodeGenOverridingAndHiding.cs (3)
3780var methodA = classA.GetMember<PropertySymbol>("P").GetMethod; 3782var methodC = classC.GetMember<PropertySymbol>("P").GetMethod; 3854var methodB = classB.GetMember<PropertySymbol>("P").GetMethod;
CodeGen\CodeGenReadonlyStructTests.cs (38)
1361Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle)); 1362Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle)); 1367Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle)); 1368Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle)); 1371Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle)); 1372Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle)); 1377Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle)); 1378Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle)); 1383Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Handle)); 1384Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Signature.ReturnParam.Handle)); 1441Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle)); 1442Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle)); 1445Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle)); 1446Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle)); 1449Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle)); 1450Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle)); 1453Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle)); 1454Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle)); 1499Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle)); 1500Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle)); 1503Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle)); 1504Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle)); 1507Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle)); 1508Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle)); 1513Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle)); 1514Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle)); 1519Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Handle)); 1520Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Signature.ReturnParam.Handle)); 1574verifyReadOnly(s1.GetProperty("P1").GetMethod, true, RefKind.RefReadOnly); 1577verifyReadOnly(s1.GetProperty("P2").GetMethod, true, RefKind.RefReadOnly); 1579verifyReadOnly(s1.GetProperty("P3").GetMethod, true, RefKind.RefReadOnly); 1582verifyReadOnly(s1.GetProperty("P4").GetMethod, false, RefKind.Ref); 1585verifyReadOnly(s1.GetProperty("P5").GetMethod, false, null); 1595verifyReadOnly(s2.GetProperty("P1").GetMethod, true, RefKind.RefReadOnly); 1596verifyReadOnly(s2.GetProperty("P2").GetMethod, true, RefKind.RefReadOnly); 1599verifyReadOnly(s2.GetProperty("P4").GetMethod, false, null); 2582Assert.Equal(isReadOnly, type.GetProperty("P").GetMethod.IsDeclaredReadOnly); 2583Assert.Equal(isReadOnly, type.GetProperty("P").GetMethod.IsEffectivelyReadOnly);
CodeGen\CodeGenTupleTest.cs (6)
13268Assert.True(m10I1P1.GetMethod.IsExplicitInterfaceImplementation); 13269Assert.Equal("System.Int32 I1.P1.get", m10I1P1.GetMethod.ExplicitInterfaceImplementations.Single().ToTestDisplayString()); 15837Assert.True(m1P1Get.Equals(m1P1.GetMethod, TypeCompareKind.ConsiderEverything)); 15867Assert.True(m1thisGet.Equals(m1this.GetMethod, TypeCompareKind.ConsiderEverything)); 23937Assert.Equal("ref (System.Int32, System.Object) ConsoleApplication5.C2.Goo.get", m.GetMethod.ToTestDisplayString()); 23941Assert.Equal("ref (System.Int32, dynamic) ClassLibrary1.C1.Goo.get", b.GetMethod.ToTestDisplayString());
CodeGen\IndexerTests.cs (2)
160var getMethod = indexer.GetMethod; 262var getMethod = indexer.GetMethod;
Emit\EmitMetadataTests.cs (11)
813Assert.NotNull(property.GetMethod); 821Assert.NotNull(property.GetMethod); 1097Assert.True(propertyP.GetMethod.IsVirtual); 1098Assert.False(propertyP.GetMethod.IsOverride); 1101Assert.True(propertyQ.GetMethod.IsVirtual); 1102Assert.False(propertyQ.GetMethod.IsOverride); 1116Assert.False(propertyP.GetMethod.IsVirtual); 1117Assert.True(propertyP.GetMethod.IsOverride); 1170CheckPropertyAccessorAccessibility(property, propertyAccessibility, property.GetMethod, getterAccessibility); 1281Assert.Equal(p.GetMethod.AssociatedSymbol, p); 1309VerifyAutoPropertyAccessor(property, property.GetMethod);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (20)
Attributes\AttributeTests.cs (9)
1676attrs = prop.GetMethod.GetAttributes(); 1767AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.GetMethod.GetAttributes())); 1775AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.GetMethod.GetAttributes())); 1783AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop3.GetMethod.GetAttributes())); 1791AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop3.GetMethod.GetAttributes())); 2427AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.GetMethod.GetAttributes())); 2437AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.GetMethod.GetAttributes())); 3750var getter = property.GetMethod; 3984var getter = property.GetMethod;
Attributes\AttributeTests_Conditional.cs (3)
156var propGetMethod = propP1.GetMethod; 165propGetMethod = propP2.GetMethod; 171propGetMethod = propP3.GetMethod;
Attributes\AttributeTests_Dynamic.cs (4)
391ValidateDynamicAttribute(prop1.GetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true); 402ValidateDynamicAttribute(prop2.GetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags); 422ValidateDynamicAttribute(indexer.GetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true); 423ValidateDynamicAttribute(indexer.GetMethod.Parameters[0].GetAttributes(), expectedDynamicAttribute: true);
Attributes\AttributeTests_Nullable.cs (2)
2536var method = property.GetMethod; 2562var method = property.GetMethod;
Attributes\AttributeTests_Synthesized.cs (2)
229Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)p.GetMethod).Handle).Single().AttributeClass.Name); 234Assert.Empty(peModule.GetCustomAttributesForToken(((PEMethodSymbol)q.GetMethod).Handle));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\ArglistTests.cs (4)
1258var getter = indexer.GetMethod; 1284var getter = indexer.GetMethod; 1310var getter = indexer.GetMethod; 1336var getter = indexer.GetMethod;
Semantics\InitOnlyMemberTests.cs (11)
46Assert.False(property.GetMethod.IsInitOnly); 610Assert.False(property.GetMethod.IsInitOnly); 641Assert.False(property.GetMethod.IsInitOnly); 900Assert.False(property.GetMethod.IsInitOnly); 1155Assert.False(property.GetMethod.IsInitOnly); 1456var getter = property.GetMethod; 1457Assert.Empty(property.GetMethod.ReturnTypeWithAnnotations.CustomModifiers); 3279Assert.Null(property1.GetMethod); 3284Assert.Null(property2.GetMethod); 3371Assert.Null(property1.GetMethod); 3377Assert.Null(property2.GetMethod);
Semantics\NativeIntegerTests.cs (1)
1824Assert.Same(getMethod, property.GetMethod);
Semantics\NullableReferenceTypesTests.cs (9)
12887Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13039Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13130Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16617Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16699Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16781Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 28255var getter = property.GetMethod; 28358var getter = property.GetMethod; 45878var getter = property.GetMethod;
Semantics\ReadOnlyStructsTests.cs (7)
1325Assert.Equal(isReadOnly, property.GetMethod.IsDeclaredReadOnly); 1326Assert.Equal(isReadOnly, property.GetMethod.IsEffectivelyReadOnly); 1327Assert.Equal(isReadOnly, property.GetMethod.GetPublicSymbol().IsReadOnly); 1613var moduleGetter = moduleComp.GetMember<PropertySymbol>("S.P1").GetMethod; 1618var dllGetter = dllComp.GetMember<PropertySymbol>("S.P1").GetMethod; 1641var moduleGetter = moduleComp.GetMember<PropertySymbol>("S.P1").GetMethod; 1646var dllGetter = dllComp.GetMember<PropertySymbol>("S.P1").GetMethod;
Semantics\RecordTests.cs (3)
12382VerifyAccessor(property.GetMethod, getterName); 12482verifyReturnType(property.GetMethod, CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Int32))); 12486verifyReturnType(property.GetMethod,
Semantics\RefFieldTests.cs (2)
10519VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").GetMethod.Parameters[0], "scoped in System.Object o", RefKind.In, ScopedKind.ScopedRef); 24316VerifyParameterSymbol(comp.GetMember<PropertySymbol>("S.P").GetMethod.ThisParameter, "ref S this", RefKind.Ref, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (597)
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (32)
46var baseGetter = baseProperty.GetMethod; 51var derivedGetter = derivedProperty.GetMethod; 105var baseGetter = baseProperty.GetMethod; 110var derived1Getter = derived1Property.GetMethod; 115Assert.Null(derived2Property.GetMethod); 156var baseGetter = baseProperty.GetMethod; 161var derivedGetter = derivedProperty.GetMethod; 211var baseGetter = baseProperty.GetMethod; 215var derived1Getter = derived1Property.GetMethod; 220Assert.Null(derived2Property.GetMethod); 319var ilGetter = global.GetMember<NamedTypeSymbol>("Base").GetMember<PropertySymbol>("P").GetMethod; 320var csharpGetter1 = global.GetMember<NamedTypeSymbol>("Derived1").GetMember<PropertySymbol>("P").GetMethod; 321var csharpGetter2 = global.GetMember<NamedTypeSymbol>("Derived2").GetMember<PropertySymbol>("P").GetMethod; 349var ilGetter = global.GetMember<NamedTypeSymbol>("I").GetMember<PropertySymbol>("P").GetMethod; 351var csharpGetter = @class.GetMember<PropertySymbol>("P").GetMethod; 382var ilGetter = global.GetMember<NamedTypeSymbol>("I").GetMember<PropertySymbol>("P").GetMethod; 384var csharpGetter = @class.GetProperty("I.P").GetMethod; 423var interfaceGetter = interfaceProperty.GetMethod; 428var baseGetter = baseProperty.GetMethod; 482var derivedGetter = derivedProperty.GetMethod; 570var interfaceGetter = interfaceProperty.GetMethod; 575var baseGetter = baseProperty.GetMethod; 580var derivedGetter = derivedProperty.GetMethod; 638var interfaceGetter = interfaceProperty.GetMethod; 643var derived1Getter = derived1Property.GetMethod; 698var interface1Getter = interface1Property.GetMethod; 703var interface2Getter = interface2Property.GetMethod; 708var interface3Getter = interface3Property.GetMethod; 757var interfacePGetter = interfaceP.GetMethod; 761var interfaceQGetter = interfaceQ.GetMethod; 767var classPGetter = classP.GetMethod; 771var classQGetter = classQ.GetMethod;
Symbols\AnonymousTypesSymbolTests.cs (1)
1106var getter = property.GetMethod;
Symbols\CovariantReturnTests.cs (2)
304if (property.GetMethod is MethodSymbol getMethod && overriddenProperty.GetMethod is MethodSymbol overriddenGetMethod)
Symbols\CSharpCompilerFeatureRequiredTests.cs (2)
175Assert.True(onPropertyGetterProperty.GetMethod.HasUnsupportedMetadata); 182Assert.False(onPropertySetterProperty.GetMethod.HasUnsupportedMetadata);
Symbols\CustomModifiersTests.cs (2)
1234Assert.Equal("System.Int32 modopt(System.Runtime.CompilerServices.IsConst) modopt(System.Runtime.CompilerServices.IsLong) CL3.Test.get", test.GetMethod.ToTestDisplayString()); 1235Assert.True(test.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.SequenceEqual(test.SetMethod.Parameters.First().TypeWithAnnotations.CustomModifiers));
Symbols\DefaultInterfaceImplementationTests.cs (345)
2685ValidateAccessor(p1.GetMethod); 2689Assert.Null(p1.GetMethod); 2730peModule.Module.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.GetMethod).Handle, out _, out _, out _, out rva); 2747Assert.Same(p1.GetMethod, test1.FindImplementationForInterfaceMember(p1.GetMethod)); 2766var getP1 = p1.GetMethod; 3005Assert.Null(p1.GetMethod); 3041Assert.Null(p1.GetMethod); 3077Assert.Null(p1.GetMethod); 3107Assert.True(p1.GetMethod.IsAbstract); 3132Assert.True(p1.GetMethod.IsAbstract); 3157Assert.True(p1.GetMethod.IsVirtual); 3196Assert.Null(p1.GetMethod); 3230Assert.Null(p1.GetMethod); 3261Assert.Null(p1.GetMethod); 3291Assert.True(p1.GetMethod.IsAbstract); 3316Assert.True(p1.GetMethod.IsAbstract); 3337Assert.True(p1.GetMethod.IsVirtual); 3382var getP1 = p1.GetMethod; 3438var getP1 = p1.GetMethod; 3590Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 3591Assert.Same(p2.GetMethod, derived.FindImplementationForInterfaceMember(p2.GetMethod)); 3592Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 3593Assert.Same(p4.GetMethod, derived.FindImplementationForInterfaceMember(p4.GetMethod)); 3596Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 3597Assert.Same(p8.GetMethod, derived.FindImplementationForInterfaceMember(p8.GetMethod)); 3825Assert.Equal("System.Int32 Test.I1.P1.get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 3826Assert.Equal("System.Int32 Test.I1.P2.get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 3827Assert.Equal("System.Int32 Test.I1.P3.get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 3828Assert.Equal("System.Int32 Test.I1.P4.get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 3831Assert.Equal("System.Int32 Test.I1.P7.get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 3832Assert.Equal("System.Int32 Test.I1.P8.get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 3977Assert.Equal("System.Int32 Test.P1.get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 3978Assert.Equal("System.Int32 Test.P2.get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 3979Assert.Equal("System.Int32 Test.P3.get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 3980Assert.Equal("System.Int32 Test.P4.get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 3983Assert.Equal("System.Int32 Test.P7.get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 3984Assert.Equal("System.Int32 Test.P8.get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 4166Assert.True(p1.GetMethod.IsVirtual); 4167Assert.True(p3.GetMethod.IsVirtual); 4169Assert.True(p7.GetMethod.IsVirtual); 4172Assert.True(p1.GetMethod.IsMetadataVirtual()); 4173Assert.True(p3.GetMethod.IsMetadataVirtual()); 4175Assert.True(p7.GetMethod.IsMetadataVirtual()); 4178Assert.False(p1.GetMethod.IsAbstract); 4179Assert.False(p3.GetMethod.IsAbstract); 4181Assert.False(p7.GetMethod.IsAbstract); 4184Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 4185Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 4187Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 4323Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 4324Assert.Null(test2.FindImplementationForInterfaceMember(p3.GetMethod)); 4326Assert.Null(test2.FindImplementationForInterfaceMember(p7.GetMethod)); 4731Assert.True(p1.GetMethod.IsStatic); 4732Assert.True(p3.GetMethod.IsStatic); 4734Assert.True(p7.GetMethod.IsStatic); 4737Assert.False(p1.GetMethod.IsVirtual); 4738Assert.False(p3.GetMethod.IsVirtual); 4740Assert.False(p7.GetMethod.IsVirtual); 4743Assert.False(p1.GetMethod.IsMetadataVirtual()); 4744Assert.False(p3.GetMethod.IsMetadataVirtual()); 4746Assert.False(p7.GetMethod.IsMetadataVirtual()); 4749Assert.False(p1.GetMethod.IsAbstract); 4750Assert.False(p3.GetMethod.IsAbstract); 4752Assert.False(p7.GetMethod.IsAbstract); 4755Assert.Null(derived.FindImplementationForInterfaceMember(p1.GetMethod)); 4756Assert.Null(derived.FindImplementationForInterfaceMember(p3.GetMethod)); 4758Assert.Null(derived.FindImplementationForInterfaceMember(p7.GetMethod)); 4939Assert.Null(p1.GetMethod); 4967Assert.True(p1.GetMethod.IsAbstract); 5004Assert.Null(p1.GetMethod); 5032Assert.True(p1.GetMethod.IsAbstract); 5073var getP1 = p1.GetMethod; 5126var getP1 = p1.GetMethod; 5253Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 5254Assert.Same(p2.GetMethod, derived.FindImplementationForInterfaceMember(p2.GetMethod)); 5255Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 5256Assert.Same(p4.GetMethod, derived.FindImplementationForInterfaceMember(p4.GetMethod)); 5259Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 5260Assert.Same(p8.GetMethod, derived.FindImplementationForInterfaceMember(p8.GetMethod)); 5440Assert.Equal("System.Int32 Test.I1.get_Item(System.SByte i)", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5441Assert.Equal("System.Int32 Test.I1.get_Item(System.Byte i)", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5442Assert.Equal("System.Int32 Test.I1.get_Item(System.Int16 i)", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5443Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt16 i)", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5446Assert.Equal("System.Int32 Test.I1.get_Item(System.Int64 i)", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5447Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt64 i)", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5453Assert.Equal("System.Int32 Test.I1.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5454Assert.Equal("System.Int32 Test.I1.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5455Assert.Equal("System.Int32 Test.I1.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5456Assert.Equal("System.Int32 Test.I1.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5459Assert.Equal("System.Int32 Test.I1.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5460Assert.Equal("System.Int32 Test.I1.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5581Assert.Equal("System.Int32 Test.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5582Assert.Equal("System.Int32 Test.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5583Assert.Equal("System.Int32 Test.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5584Assert.Equal("System.Int32 Test.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5587Assert.Equal("System.Int32 Test.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5588Assert.Equal("System.Int32 Test.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5723Assert.True(p1.GetMethod.IsVirtual); 5724Assert.True(p3.GetMethod.IsVirtual); 5726Assert.True(p7.GetMethod.IsVirtual); 5729Assert.True(p1.GetMethod.IsMetadataVirtual()); 5730Assert.True(p3.GetMethod.IsMetadataVirtual()); 5732Assert.True(p7.GetMethod.IsMetadataVirtual()); 5735Assert.False(p1.GetMethod.IsAbstract); 5736Assert.False(p3.GetMethod.IsAbstract); 5738Assert.False(p7.GetMethod.IsAbstract); 5741Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 5742Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 5744Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 5865Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 5866Assert.Null(test2.FindImplementationForInterfaceMember(p3.GetMethod)); 5868Assert.Null(test2.FindImplementationForInterfaceMember(p7.GetMethod)); 12942ValidateP01Accessor(p01.GetMethod); 12958var p02get = p02.GetMethod; 13000var p04get = p04.GetMethod; 13042var p06get = p06.GetMethod; 13084var p08get = p08.GetMethod; 13126var p10get = p10.GetMethod; 13156ValidateP11Accessor(p11.GetMethod); 13181ValidateP12Accessor(p12.GetMethod); 13206ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 13231ValidateP14Accessor(p14.GetMethod, Accessibility.ProtectedOrInternal); 13256ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 13281ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 13297var p17get = p17.GetMethod; 13318var p18get = p18.GetMethod; 13348ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 13732var p1get = p1.GetMethod; 13835ValidateAccessor(p1.GetMethod, test1P1.GetMethod); 13908ValidateAccessor(p1.GetMethod); 14115Assert.Null(p1.GetMethod); 14122ValidateAccessor(p1.GetMethod); 14125ValidateAccessor(p1.GetMethod); 14211var p1get = p1.GetMethod; 14257var p3get = p3.GetMethod; 14464Assert.Null(p1.GetMethod); 14471ValidateAccessor(p1.GetMethod); 14474ValidateAccessor(p1.GetMethod); 14553var p1get = p1.GetMethod; 14576var p2get = p2.GetMethod; 14609ValidateP3Accessor(p3.GetMethod); 14626var p4get = p4.GetMethod; 14756var p1get = p1.GetMethod; 14816var p1get = p1.GetMethod; 14823Assert.Same(test1P1.GetMethod, test1.FindImplementationForInterfaceMember(p1get)); 14857Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 14997var p1get = p1.GetMethod; 15002Assert.Same(test1P1.GetMethod, test1.FindImplementationForInterfaceMember(p1get)); 15006Assert.True(test1P1.GetMethod.IsMetadataVirtual()); 15830Assert.Null(test1.FindImplementationForInterfaceMember(p1.GetMethod)); 16016Assert.Null(p1.GetMethod); 16023ValidateAccessor(p1.GetMethod); 16026ValidateAccessor(p1.GetMethod); 16131var p1get = p1.GetMethod; 16157var p2get = p2.GetMethod; 16423Assert.Null(p2.GetMethod); 16431ValidateAccessor(p2.GetMethod, test1P2.GetMethod); 16434ValidateAccessor(p2.GetMethod, test1P2.GetMethod); 16597var p1get = p1.GetMethod; 16619Assert.Same(test2P1.GetMethod, test2.FindImplementationForInterfaceMember(p1get)); 16663ValidateP3Accessor(p3.GetMethod); 16682var p4get = p4.GetMethod; 16840var p1get = p1.GetMethod; 16862Assert.Same(test2P1.GetMethod, test2.FindImplementationForInterfaceMember(p1get)); 16866var p2get = p2.GetMethod; 16888Assert.Same(test2P2.GetMethod, test2.FindImplementationForInterfaceMember(p2get)); 16903ValidateP3Accessor(p3.GetMethod, p3.IsIndexer ? test2P3.GetMethod : null); 16932ValidateP4Accessor(p4.GetMethod); 16950var p5get = p5.GetMethod; 17101ValidateP1Accessor(p1.GetMethod, test2P1.GetMethod); 17120var p2get = p2.GetMethod; 17142Assert.Same(test2P2.GetMethod, test2.FindImplementationForInterfaceMember(p2get)); 17157ValidateP3Accessor(p3.GetMethod, p3.IsIndexer ? test2P3.GetMethod : null); 17187ValidateP4Accessor(p4.GetMethod, p4.IsIndexer ? test2P4.GetMethod : null); 17205var p5get = p5.GetMethod; 17290var p1get = p1.GetMethod; 17334var p1get = p1.GetMethod; 17583ValidateAccessor(p1.GetMethod, accessibility); 17588ValidateAccessor(p1.GetMethod, Accessibility.Public); 18171if (implementingProperty.GetMethod?.ExplicitInterfaceImplementations.Length > 0 || 18182ValidateMethod23(p1, p1.GetMethod, isAbstract, getAccess, test1, implementingProperty?.GetMethod); 19671var p1get = p1.GetMethod; 19715var p1get = p1.GetMethod; 20347validateAccessor(p1.GetMethod, tuple.getAccess); 21419ValidateP01Accessor(p01.GetMethod); 21435var p02get = p02.GetMethod; 21477var p04get = p04.GetMethod; 21519var p06get = p06.GetMethod; 21561var p08get = p08.GetMethod; 21603var p10get = p10.GetMethod; 21633ValidateP11Accessor(p11.GetMethod); 21658ValidateP12Accessor(p12.GetMethod); 21683ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 21708ValidateP14Accessor(p14.GetMethod, Accessibility.ProtectedOrInternal); 21733ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 21758ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 21774var p17get = p17.GetMethod; 21795var p18get = p18.GetMethod; 21825ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 23209Assert.Null(test1.FindImplementationForInterfaceMember(p1.GetMethod)); 36899ValidateAccessor(expected?.GetMethod, interfaceProperty.GetMethod); 36918ValidateAccessor(expected?.GetMethod, interfaceProperty.GetMethod); 36944ValidateAccessor(m1.GetMethod, isAbstract, isStatic); 37836ValidateAccessor(m1.GetMethod); 52346if (i1p1.GetMethod is object) 52348Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 52349Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52350Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52352else if (i2p1.GetMethod is object) 52354Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 52380if (reabstracting.GetMethod is object) 52382ValidateReabstraction(reabstracting.GetMethod, isStatic); 52545if (i1p1.GetMethod is object) 52547Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52548Assert.Same(test12p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52700if (i1p1.GetMethod is object) 52702Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52703Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52872if (i1p1.GetMethod is object) 52874Assert.Same(i3p1.GetMethod, i3.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52875Assert.Same(i3p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53035if (i1p1.GetMethod is object) 53037Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53200if (i1p1.GetMethod is object) 53202Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53203Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53341if (i1p1.GetMethod is object) 53343Assert.Same(i4p1.GetMethod, i4.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53344Assert.Same(i4p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53428if (i1p1.GetMethod is object) 53430if (i2p1.GetMethod is object) 53432Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53435Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53436Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53438else if (i2p1.GetMethod is object) 53440Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 53562var i2p1Get = i2p1.GetMethod; 53601if (i1p1.GetMethod is object) 53603Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53604Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53605Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53607else if (i2p1.GetMethod is object) 53609Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 53701var c2p1Get = c2p1.GetMethod; 53720if (i1p1.GetMethod is object) 53722Assert.Same(i1p1.GetMethod, c2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53723Assert.Same(c2p1Get, c2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53725else if (c2p1.GetMethod is object) 53727Assert.Empty(c2p1.GetMethod.ExplicitInterfaceImplementations); 54036if (i1p1.GetMethod is object) 54038Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 54039Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54040Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54042else if (i2p1.GetMethod is object) 54044Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 54204Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.GetMethod).ToTestDisplayString()); 54277Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54377Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54448Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.GetMethod).ToTestDisplayString()); 54516Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54610Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54704Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54792Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 56860if (i2p1.GetMethod is object) 56862Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 62973Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.GetMethod)); 62974Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 62984Assert.Same(c1i1P1get, test1.FindImplementationForInterfaceMember(i1P1.GetMethod)); 62985Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 62995Assert.Same(c1i1P1get, test4.FindImplementationForInterfaceMember(i1P1.GetMethod)); 62996Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63006Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63007Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63167Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63171Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63175Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63179Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63333Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63337Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63341Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63345Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63507Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63511Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63515Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63519Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63908Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63909Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63919Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63920Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64038Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64042Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64154Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64158Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64274Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64278Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64352Assert.Null(c2.FindImplementationForInterfaceMember(p1.GetMethod)); 64432Assert.Null(c2.FindImplementationForInterfaceMember(p1.GetMethod)); 64507Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.GetMethod)); 64586Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.GetMethod)); 67147Assert.Empty(m.GetMethod.ExplicitInterfaceImplementations); 67216Assert.Same(m2.GetMethod, m1.GetMethod.ExplicitInterfaceImplementations.Single()); 67824Assert.True(p.GetMethod.IsMetadataVirtual()); 67825Assert.True(p.GetMethod.IsMetadataFinal); 67888Assert.True(p.GetMethod.IsMetadataVirtual()); 67889Assert.True(p.GetMethod.IsMetadataFinal);
Symbols\IndexedPropertyTests.cs (12)
991Assert.True(property.GetMethod.CanBeReferencedByName); 992Assert.True(property.GetMethod.CanBeReferencedByNameIgnoringIllegalCharacters); 999Assert.True(property.GetMethod.CanBeReferencedByName); 1000Assert.True(property.GetMethod.CanBeReferencedByNameIgnoringIllegalCharacters); 1007Assert.False(property.GetMethod.CanBeReferencedByName); 1008Assert.False(property.GetMethod.CanBeReferencedByNameIgnoringIllegalCharacters); 1093Assert.True(property.GetMethod.CanBeReferencedByName); 1094Assert.True(property.GetMethod.CanBeReferencedByNameIgnoringIllegalCharacters); 1099Assert.False(property.GetMethod.CanBeReferencedByName); 1100Assert.True(property.GetMethod.CanBeReferencedByNameIgnoringIllegalCharacters); 2521Assert.Null(sourceType1.FindImplementationForInterfaceMember(interfaceProperty.GetMethod)); 2525Assert.NotNull(sourceType2.FindImplementationForInterfaceMember(interfaceProperty.GetMethod));
Symbols\IndexerTests.cs (20)
182var getter = property.GetMethod; 206Assert.Equal(property.GetMethod != null, hasGet); 285Assert.Null(indexerC.GetMethod.OverriddenMethod); 341Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[0].ImplementingMethod); 342Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[1].ImplementingMethod); 344var interface1Getter = interface1Indexer.GetMethod; 345var interface2Getter = interface2Indexer.GetMethod; 423Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[0].ImplementingMethod); 424Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[1].ImplementingMethod); 426var interface1Getter = interface1Indexer.GetMethod; 427var interface2Getter = interface2Indexer.GetMethod; 489Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementation.ImplementingMethod); 491Assert.Equal(interfaceIndexers[0].GetMethod, synthesizedExplicitImplementation.ExplicitInterfaceImplementations.Single()); 492Assert.Equal(interfaceIndexers[1].GetMethod, synthesizedExplicitImplementation.ExplicitInterfaceImplementations.Single()); 1437Assert.Equal("get_A", indexer.GetMethod.Name); 1438Assert.Equal("get_A", indexer.GetMethod.MetadataName); 1461Assert.Equal("get_@indexer", indexer.GetMethod.MetadataName); 2404Assert.NotNull(indexer.GetMethod); 2405Assert.False(indexer.GetMethod.Parameters.IsEmpty); 2407foreach (var p in indexer.GetMethod.Parameters)
Symbols\InterfaceImplementationTests.cs (7)
914var interfacePropertyGetter = interfaceProperty.GetMethod; 922var baseClassPropertyGetter = baseClassProperty.GetMethod; 983var interfacePropertyGetter = interfaceProperty.GetMethod; 991var baseClassPropertyGetter = baseClassProperty.GetMethod; 1771var interfaceGetter = interfaceProperty.GetMethod; 2290var interfaceGetter = interfaceProperty.GetMethod; 2293var baseGetter = baseProperty.GetMethod;
Symbols\Metadata\MetadataMemberTests.cs (2)
492Assert.Null(propWithoutGetter.GetMethod); 498Assert.NotNull(propWithoutSetter.GetMethod);
Symbols\Metadata\PE\DynamicTransformsTests.cs (2)
312Assert.Equal(s_dynamicType, prop1.GetMethod.ReturnType); 317Assert.Equal(complicatedInnerInnerArrayOfArray, prop2.GetMethod.ReturnType);
Symbols\Metadata\PE\LoadingAttributes.cs (2)
388var attr = property1.GetMethod.GetReturnTypeAttributes().First(); 1121Assert.Equal(3, prop.GetMethod.GetAttributes().Length);
Symbols\Metadata\PE\LoadingIndexers.cs (2)
1032CheckAccessorShape(property.GetMethod, true, property, expectIndexer, suppressAssociatedPropertyCheck); 1036Assert.Null(property.GetMethod);
Symbols\Metadata\PE\LoadingProperties.cs (14)
238Assert.NotNull(interfaceProperty1.GetMethod); 241Assert.NotNull(interfaceProperty2.GetMethod); 244Assert.NotNull(interfaceProperty3.GetMethod); 247Assert.NotNull(interfaceProperty4.GetMethod); 250Assert.Null(interfaceProperty5.GetMethod); 259Assert.NotNull(classProperty1.GetMethod); 262Assert.NotNull(classProperty2.GetMethod); 270var implementedByGetter1 = ImmutableArray.Create<MethodSymbol>(interfaceProperty1.GetMethod, interfaceProperty2.GetMethod, interfaceProperty4.GetMethod); 271Assert.True(implementedByGetter1.SetEquals(classProperty1.GetMethod.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance)); 276var implementedByGetter2 = ImmutableArray.Create<MethodSymbol>(interfaceProperty3.GetMethod); 277Assert.True(implementedByGetter2.SetEquals(classProperty2.GetMethod.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance)); 362var getter = property.GetMethod;
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
222MethodSymbol testMethod = testProperty.GetMethod;
Symbols\Retargeting\RetargetingTests.cs (2)
1257CheckSymbols(a.GetMethod, b.GetMethod, true);
Symbols\Source\ClsComplianceTests.cs (1)
2114var accessor = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<PropertySymbol>("P").GetMethod;
Symbols\Source\CustomModifierCopyTests.cs (21)
305property.GetMethod, 1649Assert.Equal(int8Type, baseProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1650Assert.Equal(int8Type, derivedProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1655Assert.Equal(int8Type, baseIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1656Assert.Equal(int8Type, derivedIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1658Assert.Equal(int16Type, baseIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1659Assert.Equal(int16Type, derivedIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1759Assert.Equal(0, baseProperty.GetMethod.CustomModifierCount()); 1761Assert.Equal(0, baseIndexer.GetMethod.CustomModifierCount()); 1763Assert.Equal(0, derivedProperty.GetMethod.CustomModifierCount()); 1765Assert.Equal(0, derivedIndexer.GetMethod.CustomModifierCount()); 1863Assert.Equal(int8Type, interfaceProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1864Assert.Equal(int8Type, implementationProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1869Assert.Equal(int8Type, interfaceIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1870Assert.Equal(int8Type, implementationIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1872Assert.Equal(int16Type, interfaceIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1873Assert.Equal(int16Type, implementationIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1958Assert.Equal(0, interfaceProperty.GetMethod.CustomModifierCount()); 1960Assert.Equal(0, interfaceIndexer.GetMethod.CustomModifierCount()); 1962Assert.Equal(0, implementationProperty.GetMethod.CustomModifierCount()); 1964Assert.Equal(0, implementationIndexer.GetMethod.CustomModifierCount());
Symbols\Source\MethodTests.cs (3)
1963var methodA = classA.GetMember<PropertySymbol>("P").GetMethod; 1965var methodC = classC.GetMember<PropertySymbol>("P").GetMethod; 2008var methodB = classB.GetMember<PropertySymbol>("P").GetMethod;
Symbols\Source\PropertyTests.cs (14)
185Assert.NotNull(p.GetMethod); 189Assert.NotNull(q.GetMethod); 193Assert.NotNull(r.GetMethod); 246Assert.NotNull(p.GetMethod); 250Assert.NotNull(q.GetMethod); 254Assert.NotNull(r.GetMethod); 363Assert.False(p.GetMethod.IsImplicitlyDeclared); 367Assert.False(p.GetMethod.IsImplicitlyDeclared); 371Assert.False(q.GetMethod.IsImplicitlyDeclared); 590VerifyMethodAndAccessorSame(type, property, property.GetMethod); 2489var interfacePropertyGetter = interfaceProperty.GetMethod; 2496var classPropertyGetter = classProperty.GetMethod; 2528var interfacePropertyGetter = interfaceProperty.GetMethod; 2535var classPropertyGetter = classProperty.GetMethod;
Symbols\StaticAbstractMembersInInterfacesTests.cs (108)
1835var m01 = i1.GetMember<PropertySymbol>("M01").GetMethod; 1847var m02 = i1.GetMember<PropertySymbol>("M02").GetMethod; 1859var m03 = i1.GetMember<PropertySymbol>("M03").GetMethod; 1871var m04 = i1.GetMember<PropertySymbol>("M04").GetMethod; 1883var m05 = i1.GetMember<PropertySymbol>("M05").GetMethod; 1895var m06 = i1.GetMember<PropertySymbol>("M06").GetMethod; 1907var m07 = i1.GetMember<PropertySymbol>("M07").GetMethod; 1919var m08 = i1.GetMember<PropertySymbol>("M08").GetMethod; 1931var m09 = i1.GetMember<PropertySymbol>("M09").GetMethod; 1943var m10 = i1.GetMember<PropertySymbol>("M10").GetMethod; 22653Assert.Same(i6m.GetMethod, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).GetMethod); 22744Assert.Same(i6m.GetMethod, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).GetMethod); 22957var m01Get = m01.GetMethod; 22972var cM01Get = cM01.GetMethod; 23052var m01Get = m01.GetMethod; 23068var cM01Get = cM01.GetMethod; 23143var m01Get = m01.GetMethod; 23158var cM01Get = cM01.GetMethod; 23255Assert.Same(cM01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 23259Assert.Same(m01.GetMethod, cM01.GetMethod.ExplicitInterfaceImplementations.Single()); 23411Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23414Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 23419Assert.Same(c1M01.GetMethod, c2.FindImplementationForInterfaceMember(m01.GetMethod)); 23424Assert.Same(c1M01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 23429Assert.Same(c1M01.GetMethod, c4.FindImplementationForInterfaceMember(m01.GetMethod)); 23436Assert.Same(c2M01.GetMethod, c5.FindImplementationForInterfaceMember(m01.GetMethod)); 23511Assert.Same(m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23512Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 23554Assert.Same(c1m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23555Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 23591Assert.Same(c1m01.GetMethod, c.FindImplementationForInterfaceMember(m01.GetMethod)); 23645Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23646Assert.Null(i1.FindImplementationForInterfaceMember(m01.GetMethod)); 23677var m01Get = m01.GetMethod; 23691var cM01Get = cM01.GetMethod; 23736var m01Get = m01.GetMethod; 23749var cM01Get = cM01.GetMethod; 23815Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23818Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 23840var m01Get = m01.GetMethod; 23853var cM01Get = cM01.GetMethod; 23908Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23941Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23997Assert.Same(m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23998Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24029var m01Get = m01.GetMethod; 24056Assert.Null(cM01.GetMethod); 24114var cM01Get = cM01.GetMethod; 24126var m01Get = m01.GetMethod; 24168Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24170Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24218var m01Get = m01.GetMethod; 24260Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24293Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24296Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24376Assert.Same(i2M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24377Assert.Same(i2M01.GetMethod, i2.FindImplementationForInterfaceMember(m01.GetMethod)); 24382Assert.Same(m01.GetMethod, i2M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24422var c2M01Get = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.GetMethod); 24445Assert.Same(m01.GetMethod, c2M01Get.ExplicitInterfaceImplementations.Single()); 24457var c1M01Get = c1M01.GetMethod; 24499Assert.Same(c2M01.GetMethod, c2M01Get); 24611var c1M01Get = c1M01.GetMethod; 24628Assert.Same(c1M01Get, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24642Assert.Same(m01.GetMethod, c1M01Get.ExplicitInterfaceImplementations.Single()); 24665var c2M01Get = c2M01.GetMethod; 24683Assert.Same(m01.GetMethod, c2M01Get.ExplicitInterfaceImplementations.Single()); 24684Assert.Same(c2M01Get, c2.FindImplementationForInterfaceMember(m01.GetMethod)); 24705var c3M01Get = c3M01.GetMethod; 24723Assert.Same(m01.GetMethod, c3M01Get.ExplicitInterfaceImplementations.Single()); 24724Assert.Same(c3M01Get, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 24822var c1M01Get = c1M01.GetMethod; 24844var c2M01Get = c3.FindImplementationForInterfaceMember(m01.GetMethod); 24856Assert.Same(c1M01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 24865Assert.Same(c2M02.GetMethod, c3.FindImplementationForInterfaceMember(m02.GetMethod)); 24944var c2M01Get = c2M01.GetMethod; 24975var c3M01Get = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.GetMethod); 24977Assert.Same(m01.GetMethod, c3M01Get.ExplicitInterfaceImplementations.Single()); 24986Assert.Same(c2M01Get, c3.FindImplementationForInterfaceMember(m01.GetMethod));
Symbols\SymbolErrorTests.cs (2)
10156Assert.False(classAProp1.GetMethod.IsVirtual); //NB: non-virtual since private 10209Assert.True(classAProp1.GetMethod.IsVirtual);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
LifetimeAnnotationAttributesVisitor.cs (1)
69Visit(property.GetMethod);
TestAttributesVisitor.cs (1)
71Visit(property.GetMethod);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdMetadataTests.cs (1)
137Assert.Equal("System.Runtime.WindowsRuntime.dll", ((PENamedTypeSymbol)((((PropertySymbol)(blk)).GetMethod).ReturnType)).ContainingModule.ToString());