10 overrides of GetMethod
Microsoft.CodeAnalysis.CSharp (10)
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)
695public override MethodSymbol GetMethod
Symbols\NativeIntegerTypeSymbol.cs (1)
508public 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)
645public sealed override MethodSymbol? GetMethod
Symbols\SubstitutedPropertySymbol.cs (1)
86public override MethodSymbol GetMethod
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
43public override MethodSymbol? GetMethod { get; }
855 references to GetMethod
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_Attributes.cs (1)
639var getMethod = propertySymbol.GetMethod;
Binder\Binder_Invocation.cs (1)
1381var method = property.GetMethod ?? property.SetMethod;
Binder\Binder_Lookup.cs (1)
1622method1 = property.GetMethod;
Emitter\Model\PropertySymbolAdapter.cs (2)
35var getMethod = AdaptedPropertySymbol.GetMethod?.GetCciAdapter(); 72MethodSymbol getMethod = AdaptedPropertySymbol.GetMethod;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
536var getMethod = property.AdaptedPropertySymbol.GetMethod?.GetCciAdapter();
FlowAnalysis\AbstractFlowPass.cs (1)
3725property.GetOwnOrInheritedSetMethod() ?? property.GetMethod;
FlowAnalysis\NullableWalker.cs (2)
11381ApplyMemberPostConditions(node.ReceiverOpt, property.GetMethod); 11517var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
FlowAnalysis\NullableWalker_Patterns.cs (2)
547if (property.GetMethod is not null) 550ApplyMemberPostConditions(inputSlot, property.GetMethod);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
366MethodSymbol isCompletedMethod = ((object)node.AwaitableInfo.IsCompleted != null) ? VisitMethodSymbol(node.AwaitableInfo.IsCompleted.GetMethod) : null;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1070membersBuilder.Add(_bound.MethodInfo(AnonymousTypeManager.GetAnonymousTypeProperty(anonType, i).GetMethod, _bound.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
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)
182MethodMayMutateReceiver(node.ReceiverOpt, node.PropertySymbol.GetMethod); 316MethodMayMutateReceiver(node.ReceiverOpt, node.Indexer.GetMethod);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (3)
246Debug.Assert(e.Property.GetMethod.ParameterCount == 1); 247Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 248TypeSymbol type = e.Property.GetMethod.ReturnType;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
271MethodSymbol invocationListAccessor = invocationListProperty.GetMethod;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
389MethodSymbol currentManagedThreadIdMethod = currentManagedThreadIdProperty.GetMethod;
Symbols\MemberSymbolExtensions.cs (1)
370return isImplementableAndNotPublic(propertySymbol.GetMethod) || isImplementableAndNotPublic(propertySymbol.SetMethod);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
488MethodSymbol getMethod = curr.GetMethod; 821if (!prop.GetMethod.IsImplementable())
Symbols\NativeIntegerTypeSymbol.cs (1)
495GetMethod = getAccessor(container, this, underlyingProperty.GetMethod);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
260MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.GetMethod : propertyHiddenByProperty.SetMethod;
Symbols\PropertySymbol.cs (2)
182return (object)property.GetMethod == null; 257MethodSymbol accessor = GetMethod ?? SetMethod;
Symbols\PropertySymbolExtensions.cs (1)
26MethodSymbol 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)
4356MethodSymbol accessor = getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod; 4437var locationFrom = (Symbol)(getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod) ?? propertySymbol; 4859Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 5146else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 5256members.Add(equalityContract.GetMethod); 5286if (equalityContract.GetMethod is null)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
572var getMethod = property.GetMethod; 818else if (associatedProperty.GetMethod == overridingMember && (object)overriddenProperty.GetMethod == null) 1100if (overridingProperty.GetMethod is object) 1104overridingProperty.GetMethod.GetFirstLocation(), 1106overridingProperty.GetMethod, 1135if (overridingProperty.GetMethod != ownOrInheritedGetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedGetMethod, overridingType, ref useSiteInfo))
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
623? explicitlyImplementedPropertyOpt.GetMethod 695? explicitlyImplementedPropertyOpt.GetMethod
Symbols\Source\SourcePropertySymbolBase.cs (2)
914if ((overriddenProperty.GetMethod is { } && GetMethod is null) || 1013CheckExplicitImplementationAccessor(GetMethod, explicitlyImplementedProperty.GetMethod, explicitlyImplementedProperty, diagnostics);
Symbols\SubstitutedPropertySymbol.cs (1)
90MethodSymbol originalGetMethod = OriginalDefinition.GetMethod;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (2)
115Debug.Assert(property is { GetMethod: not null, SetMethod: null }); 117builder.Add(property.GetMethod);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
27GetMethod = new SynthesizedReadOnlyListMethod(containingType, interfaceProperty.GetMethod, getAccessorBody);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
732builder.AddIfNotNull(property.GetMethod);
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (3)
26Debug.Assert(positionalMembers.All(p => p is PropertySymbol { GetMethod: not null } or FieldSymbol)); 107var getterMethod = property.GetMethod; 108return property.GetMethod is not null && !getterMethod.IsEffectivelyReadOnly;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
70if (_equalityContract.GetMethod is null)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
57if (_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)
1424interfaceAccessor1 = interfaceProperty.GetMethod; 1932var implementingGetMethod = implementedProperty.GetMethod.IsImplementable() ? 1942implementedProperty.GetMethod,
Symbols\VarianceSafety.cs (2)
195bool hasGetter = (object)property.GetMethod != null; 202requireInputSafety: 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)
13262Assert.True(m10I1P1.GetMethod.IsExplicitInterfaceImplementation); 13263Assert.Equal("System.Int32 I1.P1.get", m10I1P1.GetMethod.ExplicitInterfaceImplementations.Single().ToTestDisplayString()); 15831Assert.True(m1P1Get.Equals(m1P1.GetMethod, TypeCompareKind.ConsiderEverything)); 15861Assert.True(m1thisGet.Equals(m1this.GetMethod, TypeCompareKind.ConsiderEverything)); 23905Assert.Equal("ref (System.Int32, System.Object) ConsoleApplication5.C2.Goo.get", m.GetMethod.ToTestDisplayString()); 23909Assert.Equal("ref (System.Int32, dynamic) ClassLibrary1.C1.Goo.get", b.GetMethod.ToTestDisplayString());
CodeGen\IndexerTests.cs (2)
161var getMethod = indexer.GetMethod; 263var getMethod = indexer.GetMethod;
Emit\EmitMetadataTests.cs (11)
814Assert.NotNull(property.GetMethod); 822Assert.NotNull(property.GetMethod); 1098Assert.True(propertyP.GetMethod.IsVirtual); 1099Assert.False(propertyP.GetMethod.IsOverride); 1102Assert.True(propertyQ.GetMethod.IsVirtual); 1103Assert.False(propertyQ.GetMethod.IsOverride); 1117Assert.False(propertyP.GetMethod.IsVirtual); 1118Assert.True(propertyP.GetMethod.IsOverride); 1171CheckPropertyAccessorAccessibility(property, propertyAccessibility, property.GetMethod, getterAccessibility); 1282Assert.Equal(p.GetMethod.AssociatedSymbol, p); 1310VerifyAutoPropertyAccessor(property, property.GetMethod);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\EditAndContinueTests.cs (2)
3904? ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, r1), SemanticEdit.Create(SemanticEditKind.Insert, null, r1.GetMethod)) 3941SemanticEdit.Create(SemanticEditKind.Insert, null, q2.GetMethod),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (73)
Attributes\AttributeTests.cs (9)
1714attrs = prop.GetMethod.GetAttributes(); 1805AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.GetMethod.GetAttributes())); 1813AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.GetMethod.GetAttributes())); 1821AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop3.GetMethod.GetAttributes())); 1829AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop3.GetMethod.GetAttributes())); 2465AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.GetMethod.GetAttributes())); 2475AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.GetMethod.GetAttributes())); 3792var getter = property.GetMethod; 4026var 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));
OverloadResolutionPriorityTests.cs (4)
1452Assert.Equal(0, indexer.GetMethod.OverloadResolutionPriority); 1575Assert.Equal(0, indexer.GetMethod.OverloadResolutionPriority); 1581Assert.Equal(0, indexer.GetMethod.OverloadResolutionPriority); 1616Assert.Equal(0, indexer.GetMethod.OverloadResolutionPriority);
RefStructInterfacesTests.cs (44)
158Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 190Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 224Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 249Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 275Assert.True(propertySymbol.GetMethod.HasUnscopedRefAttribute); 313Assert.True(propertySymbol.GetMethod.HasUnscopedRefAttribute); 353Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 381Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 405Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 437Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 471Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 497Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 523Assert.True(propertySymbol.GetMethod.HasUnscopedRefAttribute); 561Assert.True(propertySymbol.GetMethod.HasUnscopedRefAttribute); 601Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 630Assert.True(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1062Assert.Equal(onInterfaceGet, p.GetMethod.HasUnscopedRefAttribute); 1122Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1178Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1224Assert.False(c1P.GetMethod.HasUnscopedRefAttribute); 1227Assert.False(c2P.GetMethod.HasUnscopedRefAttribute); 1230Assert.False(c3P.GetMethod.HasUnscopedRefAttribute); 1290Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1312Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1349Assert.Equal(onImplementationGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 1402Assert.Equal(onImplementationGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 1459Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1479Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1578Assert.Equal(onGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 1612Assert.Equal(onGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 1638Assert.Equal(onInterfaceGet, p.GetMethod.HasUnscopedRefAttribute); 1698Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1754Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1800Assert.False(c1P.GetMethod.HasUnscopedRefAttribute); 1803Assert.False(c2P.GetMethod.HasUnscopedRefAttribute); 1806Assert.False(c3P.GetMethod.HasUnscopedRefAttribute); 1866Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1888Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 1925Assert.Equal(onImplementationGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 1978Assert.Equal(onImplementationGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 2035Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 2055Assert.False(propertySymbol.GetMethod.HasUnscopedRefAttribute); 2154Assert.Equal(onGet, propertySymbol.GetMethod.HasUnscopedRefAttribute); 2188Assert.Equal(onGet, propertySymbol.GetMethod.HasUnscopedRefAttribute);
Semantics\ParamsCollectionTests.cs (2)
9010if (prop.GetMethod is MethodSymbol getMethod) 9055if (prop.GetMethod is MethodSymbol getMethod)
Semantics\RecordTests.cs (3)
12437VerifyAccessor(property.GetMethod, getterName); 12537verifyReturnType(property.GetMethod, CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Int32))); 12541verifyReturnType(property.GetMethod,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
Semantics\ArglistTests.cs (4)
1258var getter = indexer.GetMethod; 1284var getter = indexer.GetMethod; 1310var getter = indexer.GetMethod; 1336var getter = indexer.GetMethod;
Semantics\InitOnlyMemberTests.cs (11)
48Assert.False(property.GetMethod.IsInitOnly); 612Assert.False(property.GetMethod.IsInitOnly); 643Assert.False(property.GetMethod.IsInitOnly); 902Assert.False(property.GetMethod.IsInitOnly); 1157Assert.False(property.GetMethod.IsInitOnly); 1461var getter = property.GetMethod; 1462Assert.Empty(property.GetMethod.ReturnTypeWithAnnotations.CustomModifiers); 3284Assert.Null(property1.GetMethod); 3289Assert.Null(property2.GetMethod); 3376Assert.Null(property1.GetMethod); 3382Assert.Null(property2.GetMethod);
Semantics\NativeIntegerTests.cs (1)
1829Assert.Same(getMethod, property.GetMethod);
Semantics\NullableReferenceTypesTests.cs (9)
12899Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13051Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13142Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16650Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16735Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16820Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 30193var getter = property.GetMethod; 30296var getter = property.GetMethod; 47999var 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\RefFieldTests.cs (2)
11031VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").GetMethod.Parameters[0], "scoped in System.Object o", RefKind.In, ScopedKind.ScopedRef); 25473VerifyParameterSymbol(comp.GetMember<PropertySymbol>("S.P").GetMethod.ThisParameter, "ref S this", RefKind.Ref, scopedRefInCSharp10, expectedHasUnscopedRefAttribute: true);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (610)
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 (347)
2676ValidateAccessor(p1.GetMethod); 2680Assert.Null(p1.GetMethod); 2721peModule.Module.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.GetMethod).Handle, out _, out _, out _, out rva); 2738Assert.Same(p1.GetMethod, test1.FindImplementationForInterfaceMember(p1.GetMethod)); 2757var getP1 = p1.GetMethod; 2996Assert.Null(p1.GetMethod); 3032Assert.Null(p1.GetMethod); 3068Assert.Null(p1.GetMethod); 3098Assert.True(p1.GetMethod.IsAbstract); 3123Assert.True(p1.GetMethod.IsAbstract); 3148Assert.True(p1.GetMethod.IsVirtual); 3187Assert.Null(p1.GetMethod); 3221Assert.Null(p1.GetMethod); 3255Assert.Null(p1.GetMethod); 3285Assert.True(p1.GetMethod.IsAbstract); 3310Assert.True(p1.GetMethod.IsAbstract); 3331Assert.True(p1.GetMethod.IsVirtual); 3406var getP1 = p1.GetMethod; 3476var getP1 = p1.GetMethod; 3565var getP1 = p1.GetMethod; 3631var getP1 = p1.GetMethod; 3786Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 3787Assert.Same(p2.GetMethod, derived.FindImplementationForInterfaceMember(p2.GetMethod)); 3788Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 3789Assert.Same(p4.GetMethod, derived.FindImplementationForInterfaceMember(p4.GetMethod)); 3792Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 3793Assert.Same(p8.GetMethod, derived.FindImplementationForInterfaceMember(p8.GetMethod)); 4021Assert.Equal("System.Int32 Test.I1.P1.get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 4022Assert.Equal("System.Int32 Test.I1.P2.get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 4023Assert.Equal("System.Int32 Test.I1.P3.get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 4024Assert.Equal("System.Int32 Test.I1.P4.get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 4027Assert.Equal("System.Int32 Test.I1.P7.get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 4028Assert.Equal("System.Int32 Test.I1.P8.get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 4173Assert.Equal("System.Int32 Test.P1.get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 4174Assert.Equal("System.Int32 Test.P2.get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 4175Assert.Equal("System.Int32 Test.P3.get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 4176Assert.Equal("System.Int32 Test.P4.get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 4179Assert.Equal("System.Int32 Test.P7.get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 4180Assert.Equal("System.Int32 Test.P8.get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 4362Assert.True(p1.GetMethod.IsVirtual); 4363Assert.True(p3.GetMethod.IsVirtual); 4365Assert.True(p7.GetMethod.IsVirtual); 4368Assert.True(p1.GetMethod.IsMetadataVirtual()); 4369Assert.True(p3.GetMethod.IsMetadataVirtual()); 4371Assert.True(p7.GetMethod.IsMetadataVirtual()); 4374Assert.False(p1.GetMethod.IsAbstract); 4375Assert.False(p3.GetMethod.IsAbstract); 4377Assert.False(p7.GetMethod.IsAbstract); 4380Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 4381Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 4383Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 4519Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 4520Assert.Null(test2.FindImplementationForInterfaceMember(p3.GetMethod)); 4522Assert.Null(test2.FindImplementationForInterfaceMember(p7.GetMethod)); 4927Assert.True(p1.GetMethod.IsStatic); 4928Assert.True(p3.GetMethod.IsStatic); 4930Assert.True(p7.GetMethod.IsStatic); 4933Assert.False(p1.GetMethod.IsVirtual); 4934Assert.False(p3.GetMethod.IsVirtual); 4936Assert.False(p7.GetMethod.IsVirtual); 4939Assert.False(p1.GetMethod.IsMetadataVirtual()); 4940Assert.False(p3.GetMethod.IsMetadataVirtual()); 4942Assert.False(p7.GetMethod.IsMetadataVirtual()); 4945Assert.False(p1.GetMethod.IsAbstract); 4946Assert.False(p3.GetMethod.IsAbstract); 4948Assert.False(p7.GetMethod.IsAbstract); 4951Assert.Null(derived.FindImplementationForInterfaceMember(p1.GetMethod)); 4952Assert.Null(derived.FindImplementationForInterfaceMember(p3.GetMethod)); 4954Assert.Null(derived.FindImplementationForInterfaceMember(p7.GetMethod)); 5135Assert.Null(p1.GetMethod); 5163Assert.True(p1.GetMethod.IsAbstract); 5200Assert.Null(p1.GetMethod); 5228Assert.True(p1.GetMethod.IsAbstract); 5269var getP1 = p1.GetMethod; 5322var getP1 = p1.GetMethod; 5449Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 5450Assert.Same(p2.GetMethod, derived.FindImplementationForInterfaceMember(p2.GetMethod)); 5451Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 5452Assert.Same(p4.GetMethod, derived.FindImplementationForInterfaceMember(p4.GetMethod)); 5455Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 5456Assert.Same(p8.GetMethod, derived.FindImplementationForInterfaceMember(p8.GetMethod)); 5636Assert.Equal("System.Int32 Test.I1.get_Item(System.SByte i)", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5637Assert.Equal("System.Int32 Test.I1.get_Item(System.Byte i)", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5638Assert.Equal("System.Int32 Test.I1.get_Item(System.Int16 i)", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5639Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt16 i)", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5642Assert.Equal("System.Int32 Test.I1.get_Item(System.Int64 i)", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5643Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt64 i)", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5649Assert.Equal("System.Int32 Test.I1.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5650Assert.Equal("System.Int32 Test.I1.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5651Assert.Equal("System.Int32 Test.I1.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5652Assert.Equal("System.Int32 Test.I1.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5655Assert.Equal("System.Int32 Test.I1.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5656Assert.Equal("System.Int32 Test.I1.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5777Assert.Equal("System.Int32 Test.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5778Assert.Equal("System.Int32 Test.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5779Assert.Equal("System.Int32 Test.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5780Assert.Equal("System.Int32 Test.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5783Assert.Equal("System.Int32 Test.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5784Assert.Equal("System.Int32 Test.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5919Assert.True(p1.GetMethod.IsVirtual); 5920Assert.True(p3.GetMethod.IsVirtual); 5922Assert.True(p7.GetMethod.IsVirtual); 5925Assert.True(p1.GetMethod.IsMetadataVirtual()); 5926Assert.True(p3.GetMethod.IsMetadataVirtual()); 5928Assert.True(p7.GetMethod.IsMetadataVirtual()); 5931Assert.False(p1.GetMethod.IsAbstract); 5932Assert.False(p3.GetMethod.IsAbstract); 5934Assert.False(p7.GetMethod.IsAbstract); 5937Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 5938Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 5940Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 6061Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 6062Assert.Null(test2.FindImplementationForInterfaceMember(p3.GetMethod)); 6064Assert.Null(test2.FindImplementationForInterfaceMember(p7.GetMethod)); 13138ValidateP01Accessor(p01.GetMethod); 13154var p02get = p02.GetMethod; 13196var p04get = p04.GetMethod; 13238var p06get = p06.GetMethod; 13280var p08get = p08.GetMethod; 13322var p10get = p10.GetMethod; 13352ValidateP11Accessor(p11.GetMethod); 13377ValidateP12Accessor(p12.GetMethod); 13402ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 13427ValidateP14Accessor(p14.GetMethod, Accessibility.ProtectedOrInternal); 13452ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 13477ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 13493var p17get = p17.GetMethod; 13514var p18get = p18.GetMethod; 13544ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 13928var p1get = p1.GetMethod; 14031ValidateAccessor(p1.GetMethod, test1P1.GetMethod); 14104ValidateAccessor(p1.GetMethod); 14311Assert.Null(p1.GetMethod); 14318ValidateAccessor(p1.GetMethod); 14321ValidateAccessor(p1.GetMethod); 14407var p1get = p1.GetMethod; 14453var p3get = p3.GetMethod; 14660Assert.Null(p1.GetMethod); 14667ValidateAccessor(p1.GetMethod); 14670ValidateAccessor(p1.GetMethod); 14749var p1get = p1.GetMethod; 14772var p2get = p2.GetMethod; 14805ValidateP3Accessor(p3.GetMethod); 14822var p4get = p4.GetMethod; 14952var p1get = p1.GetMethod; 15012var p1get = p1.GetMethod; 15019Assert.Same(test1P1.GetMethod, test1.FindImplementationForInterfaceMember(p1get)); 15053Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 15193var p1get = p1.GetMethod; 15198Assert.Same(test1P1.GetMethod, test1.FindImplementationForInterfaceMember(p1get)); 15202Assert.True(test1P1.GetMethod.IsMetadataVirtual()); 16026Assert.Null(test1.FindImplementationForInterfaceMember(p1.GetMethod)); 16212Assert.Null(p1.GetMethod); 16219ValidateAccessor(p1.GetMethod); 16222ValidateAccessor(p1.GetMethod); 16327var p1get = p1.GetMethod; 16353var p2get = p2.GetMethod; 16619Assert.Null(p2.GetMethod); 16627ValidateAccessor(p2.GetMethod, test1P2.GetMethod); 16630ValidateAccessor(p2.GetMethod, test1P2.GetMethod); 16793var p1get = p1.GetMethod; 16815Assert.Same(test2P1.GetMethod, test2.FindImplementationForInterfaceMember(p1get)); 16859ValidateP3Accessor(p3.GetMethod); 16878var p4get = p4.GetMethod; 17036var p1get = p1.GetMethod; 17058Assert.Same(test2P1.GetMethod, test2.FindImplementationForInterfaceMember(p1get)); 17062var p2get = p2.GetMethod; 17084Assert.Same(test2P2.GetMethod, test2.FindImplementationForInterfaceMember(p2get)); 17099ValidateP3Accessor(p3.GetMethod, p3.IsIndexer ? test2P3.GetMethod : null); 17128ValidateP4Accessor(p4.GetMethod); 17146var p5get = p5.GetMethod; 17297ValidateP1Accessor(p1.GetMethod, test2P1.GetMethod); 17316var p2get = p2.GetMethod; 17338Assert.Same(test2P2.GetMethod, test2.FindImplementationForInterfaceMember(p2get)); 17353ValidateP3Accessor(p3.GetMethod, p3.IsIndexer ? test2P3.GetMethod : null); 17383ValidateP4Accessor(p4.GetMethod, p4.IsIndexer ? test2P4.GetMethod : null); 17401var p5get = p5.GetMethod; 17486var p1get = p1.GetMethod; 17530var p1get = p1.GetMethod; 17779ValidateAccessor(p1.GetMethod, accessibility); 17784ValidateAccessor(p1.GetMethod, Accessibility.Public); 18367if (implementingProperty.GetMethod?.ExplicitInterfaceImplementations.Length > 0 || 18378ValidateMethod23(p1, p1.GetMethod, isAbstract, getAccess, test1, implementingProperty?.GetMethod); 19867var p1get = p1.GetMethod; 19911var p1get = p1.GetMethod; 20543validateAccessor(p1.GetMethod, tuple.getAccess); 21615ValidateP01Accessor(p01.GetMethod); 21631var p02get = p02.GetMethod; 21673var p04get = p04.GetMethod; 21715var p06get = p06.GetMethod; 21757var p08get = p08.GetMethod; 21799var p10get = p10.GetMethod; 21829ValidateP11Accessor(p11.GetMethod); 21854ValidateP12Accessor(p12.GetMethod); 21879ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 21904ValidateP14Accessor(p14.GetMethod, Accessibility.ProtectedOrInternal); 21929ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 21954ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 21970var p17get = p17.GetMethod; 21991var p18get = p18.GetMethod; 22021ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 23405Assert.Null(test1.FindImplementationForInterfaceMember(p1.GetMethod)); 37095ValidateAccessor(expected?.GetMethod, interfaceProperty.GetMethod); 37114ValidateAccessor(expected?.GetMethod, interfaceProperty.GetMethod); 37140ValidateAccessor(m1.GetMethod, isAbstract, isStatic); 38032ValidateAccessor(m1.GetMethod); 52533if (i1p1.GetMethod is object) 52535Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 52536Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52537Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52539else if (i2p1.GetMethod is object) 52541Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 52567if (reabstracting.GetMethod is object) 52569ValidateReabstraction(reabstracting.GetMethod, isStatic); 52732if (i1p1.GetMethod is object) 52734Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52735Assert.Same(test12p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52887if (i1p1.GetMethod is object) 52889Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.GetMethod)); 52890Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53059if (i1p1.GetMethod is object) 53061Assert.Same(i3p1.GetMethod, i3.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53062Assert.Same(i3p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53222if (i1p1.GetMethod is object) 53224Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53387if (i1p1.GetMethod is object) 53389Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53390Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53528if (i1p1.GetMethod is object) 53530Assert.Same(i4p1.GetMethod, i4.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53531Assert.Same(i4p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53615if (i1p1.GetMethod is object) 53617if (i2p1.GetMethod is object) 53619Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53622Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53623Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53625else if (i2p1.GetMethod is object) 53627Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 53749var i2p1Get = i2p1.GetMethod; 53788if (i1p1.GetMethod is object) 53790Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53791Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53792Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53794else if (i2p1.GetMethod is object) 53796Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 53888var c2p1Get = c2p1.GetMethod; 53907if (i1p1.GetMethod is object) 53909Assert.Same(i1p1.GetMethod, c2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53910Assert.Same(c2p1Get, c2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53912else if (c2p1.GetMethod is object) 53914Assert.Empty(c2p1.GetMethod.ExplicitInterfaceImplementations); 54223if (i1p1.GetMethod is object) 54225Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 54226Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54227Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54229else if (i2p1.GetMethod is object) 54231Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 54391Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.GetMethod).ToTestDisplayString()); 54464Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54564Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54635Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.GetMethod).ToTestDisplayString()); 54703Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54797Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54891Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 54979Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 57047if (i2p1.GetMethod is object) 57049Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 63160Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63161Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63171Assert.Same(c1i1P1get, test1.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63172Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63182Assert.Same(c1i1P1get, test4.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63183Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63193Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63194Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63354Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63358Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63362Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63366Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63520Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63524Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63528Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63532Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63694Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63698Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63702Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 63706Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64095Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64096Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64106Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64107Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64225Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64229Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64341Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64345Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64461Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64465Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64539Assert.Null(c2.FindImplementationForInterfaceMember(p1.GetMethod)); 64619Assert.Null(c2.FindImplementationForInterfaceMember(p1.GetMethod)); 64694Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.GetMethod)); 64773Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.GetMethod)); 67334Assert.Empty(m.GetMethod.ExplicitInterfaceImplementations); 67403Assert.Same(m2.GetMethod, m1.GetMethod.ExplicitInterfaceImplementations.Single()); 68014Assert.True(p.GetMethod.IsMetadataVirtual()); 68015Assert.True(p.GetMethod.IsMetadataFinal); 68078Assert.True(p.GetMethod.IsMetadataVirtual()); 68079Assert.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)
184var getter = property.GetMethod; 208Assert.Equal(property.GetMethod != null, hasGet); 287Assert.Null(indexerC.GetMethod.OverriddenMethod); 343Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[0].ImplementingMethod); 344Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[1].ImplementingMethod); 346var interface1Getter = interface1Indexer.GetMethod; 347var interface2Getter = interface2Indexer.GetMethod; 425Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[0].ImplementingMethod); 426Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementations[1].ImplementingMethod); 428var interface1Getter = interface1Indexer.GetMethod; 429var interface2Getter = interface2Indexer.GetMethod; 491Assert.Equal(classIndexer.GetMethod, synthesizedExplicitImplementation.ImplementingMethod); 493Assert.Equal(interfaceIndexers[0].GetMethod, synthesizedExplicitImplementation.ExplicitInterfaceImplementations.Single()); 494Assert.Equal(interfaceIndexers[1].GetMethod, synthesizedExplicitImplementation.ExplicitInterfaceImplementations.Single()); 1439Assert.Equal("get_A", indexer.GetMethod.Name); 1440Assert.Equal("get_A", indexer.GetMethod.MetadataName); 1463Assert.Equal("get_@indexer", indexer.GetMethod.MetadataName); 2406Assert.NotNull(indexer.GetMethod); 2407Assert.False(indexer.GetMethod.Parameters.IsEmpty); 2409foreach (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)
496Assert.Null(propWithoutGetter.GetMethod); 502Assert.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)
1042CheckAccessorShape(property.GetMethod, true, property, expectIndexer, suppressAssociatedPropertyCheck); 1046Assert.Null(property.GetMethod);
Symbols\Metadata\PE\LoadingProperties.cs (14)
236Assert.NotNull(interfaceProperty1.GetMethod); 239Assert.NotNull(interfaceProperty2.GetMethod); 242Assert.NotNull(interfaceProperty3.GetMethod); 245Assert.NotNull(interfaceProperty4.GetMethod); 248Assert.Null(interfaceProperty5.GetMethod); 257Assert.NotNull(classProperty1.GetMethod); 260Assert.NotNull(classProperty2.GetMethod); 268var implementedByGetter1 = ImmutableArray.Create<MethodSymbol>(interfaceProperty1.GetMethod, interfaceProperty2.GetMethod, interfaceProperty4.GetMethod); 269Assert.True(implementedByGetter1.SetEquals(classProperty1.GetMethod.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance)); 274var implementedByGetter2 = ImmutableArray.Create<MethodSymbol>(interfaceProperty3.GetMethod); 275Assert.True(implementedByGetter2.SetEquals(classProperty2.GetMethod.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance)); 360var getter = property.GetMethod;
Symbols\PartialPropertiesTests.cs (10)
702Assert.True(prop.PartialImplementationPart!.GetMethod!.GetPublicSymbol().IsExtern); 712Assert.False(prop.GetMethod!.GetPublicSymbol().IsExtern); 778verifyAccessor(prop.GetMethod!); 785verifyAccessor(implPart.GetMethod!); 937verifyAccessor(propDefinition.GetMethod!, propImplementation.GetMethod!); 1012var implementationAccessor = propImplementation.GetMethod!; 1095Assert.Null(propImplementation.GetMethod); 2680validateAccessor(p.GetMethod); 2820validateAccessor(p.GetMethod); 3934verify(indexer.PartialImplementationPart!.GetMethod!.Parameters.Single());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
223MethodSymbol testMethod = testProperty.GetMethod;
Symbols\Retargeting\RetargetingTests.cs (2)
1257CheckSymbols(a.GetMethod, b.GetMethod, true);
Symbols\Source\ClsComplianceTests.cs (1)
2113var accessor = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<PropertySymbol>("P").GetMethod;
Symbols\Source\CustomModifierCopyTests.cs (22)
370property.GetMethod, 424property.GetMethod, 1792Assert.Equal(int8Type, baseProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1793Assert.Equal(int8Type, derivedProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1798Assert.Equal(int8Type, baseIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1799Assert.Equal(int8Type, derivedIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1801Assert.Equal(int16Type, baseIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1802Assert.Equal(int16Type, derivedIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1902Assert.Equal(0, baseProperty.GetMethod.CustomModifierCount()); 1904Assert.Equal(0, baseIndexer.GetMethod.CustomModifierCount()); 1906Assert.Equal(0, derivedProperty.GetMethod.CustomModifierCount()); 1908Assert.Equal(0, derivedIndexer.GetMethod.CustomModifierCount()); 2006Assert.Equal(int8Type, interfaceProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2007Assert.Equal(int8Type, implementationProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2012Assert.Equal(int8Type, interfaceIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2013Assert.Equal(int8Type, implementationIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2015Assert.Equal(int16Type, interfaceIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2016Assert.Equal(int16Type, implementationIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2101Assert.Equal(0, interfaceProperty.GetMethod.CustomModifierCount()); 2103Assert.Equal(0, interfaceIndexer.GetMethod.CustomModifierCount()); 2105Assert.Equal(0, implementationProperty.GetMethod.CustomModifierCount()); 2107Assert.Equal(0, implementationIndexer.GetMethod.CustomModifierCount());
Symbols\Source\MethodTests.cs (3)
1964var methodA = classA.GetMember<PropertySymbol>("P").GetMethod; 1966var methodC = classC.GetMember<PropertySymbol>("P").GetMethod; 2009var methodB = classB.GetMember<PropertySymbol>("P").GetMethod;
Symbols\Source\PropertyTests.cs (14)
186Assert.NotNull(p.GetMethod); 190Assert.NotNull(q.GetMethod); 194Assert.NotNull(r.GetMethod); 247Assert.NotNull(p.GetMethod); 251Assert.NotNull(q.GetMethod); 255Assert.NotNull(r.GetMethod); 364Assert.False(p.GetMethod.IsImplicitlyDeclared); 368Assert.False(p.GetMethod.IsImplicitlyDeclared); 372Assert.False(q.GetMethod.IsImplicitlyDeclared); 591VerifyMethodAndAccessorSame(type, property, property.GetMethod); 2490var interfacePropertyGetter = interfaceProperty.GetMethod; 2497var classPropertyGetter = classProperty.GetMethod; 2529var interfacePropertyGetter = interfaceProperty.GetMethod; 2536var classPropertyGetter = classProperty.GetMethod;
Symbols\StaticAbstractMembersInInterfacesTests.cs (108)
1817var m01 = i1.GetMember<PropertySymbol>("M01").GetMethod; 1829var m02 = i1.GetMember<PropertySymbol>("M02").GetMethod; 1841var m03 = i1.GetMember<PropertySymbol>("M03").GetMethod; 1853var m04 = i1.GetMember<PropertySymbol>("M04").GetMethod; 1865var m05 = i1.GetMember<PropertySymbol>("M05").GetMethod; 1877var m06 = i1.GetMember<PropertySymbol>("M06").GetMethod; 1889var m07 = i1.GetMember<PropertySymbol>("M07").GetMethod; 1901var m08 = i1.GetMember<PropertySymbol>("M08").GetMethod; 1913var m09 = i1.GetMember<PropertySymbol>("M09").GetMethod; 1925var m10 = i1.GetMember<PropertySymbol>("M10").GetMethod; 23167Assert.Same(i6m.GetMethod, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).GetMethod); 23258Assert.Same(i6m.GetMethod, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).GetMethod); 23471var m01Get = m01.GetMethod; 23486var cM01Get = cM01.GetMethod; 23566var m01Get = m01.GetMethod; 23582var cM01Get = cM01.GetMethod; 23657var m01Get = m01.GetMethod; 23672var cM01Get = cM01.GetMethod; 23769Assert.Same(cM01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 23773Assert.Same(m01.GetMethod, cM01.GetMethod.ExplicitInterfaceImplementations.Single()); 23925Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23928Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 23933Assert.Same(c1M01.GetMethod, c2.FindImplementationForInterfaceMember(m01.GetMethod)); 23938Assert.Same(c1M01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 23943Assert.Same(c1M01.GetMethod, c4.FindImplementationForInterfaceMember(m01.GetMethod)); 23950Assert.Same(c2M01.GetMethod, c5.FindImplementationForInterfaceMember(m01.GetMethod)); 24025Assert.Same(m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24026Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24068Assert.Same(c1m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24069Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24105Assert.Same(c1m01.GetMethod, c.FindImplementationForInterfaceMember(m01.GetMethod)); 24159Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24160Assert.Null(i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24191var m01Get = m01.GetMethod; 24205var cM01Get = cM01.GetMethod; 24250var m01Get = m01.GetMethod; 24263var cM01Get = cM01.GetMethod; 24329Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24332Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24354var m01Get = m01.GetMethod; 24367var cM01Get = cM01.GetMethod; 24422Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24455Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24511Assert.Same(m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24512Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24543var m01Get = m01.GetMethod; 24570Assert.Null(cM01.GetMethod); 24628var cM01Get = cM01.GetMethod; 24640var m01Get = m01.GetMethod; 24682Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24684Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24732var m01Get = m01.GetMethod; 24774Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24807Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24810Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24890Assert.Same(i2M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24891Assert.Same(i2M01.GetMethod, i2.FindImplementationForInterfaceMember(m01.GetMethod)); 24896Assert.Same(m01.GetMethod, i2M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24936var c2M01Get = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.GetMethod); 24959Assert.Same(m01.GetMethod, c2M01Get.ExplicitInterfaceImplementations.Single()); 24971var c1M01Get = c1M01.GetMethod; 25013Assert.Same(c2M01.GetMethod, c2M01Get); 25125var c1M01Get = c1M01.GetMethod; 25142Assert.Same(c1M01Get, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 25156Assert.Same(m01.GetMethod, c1M01Get.ExplicitInterfaceImplementations.Single()); 25179var c2M01Get = c2M01.GetMethod; 25197Assert.Same(m01.GetMethod, c2M01Get.ExplicitInterfaceImplementations.Single()); 25198Assert.Same(c2M01Get, c2.FindImplementationForInterfaceMember(m01.GetMethod)); 25219var c3M01Get = c3M01.GetMethod; 25237Assert.Same(m01.GetMethod, c3M01Get.ExplicitInterfaceImplementations.Single()); 25238Assert.Same(c3M01Get, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 25336var c1M01Get = c1M01.GetMethod; 25358var c2M01Get = c3.FindImplementationForInterfaceMember(m01.GetMethod); 25370Assert.Same(c1M01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 25379Assert.Same(c2M02.GetMethod, c3.FindImplementationForInterfaceMember(m02.GetMethod)); 25458var c2M01Get = c2M01.GetMethod; 25489var c3M01Get = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.GetMethod); 25491Assert.Same(m01.GetMethod, c3M01Get.ExplicitInterfaceImplementations.Single()); 25500Assert.Same(c2M01Get, c3.FindImplementationForInterfaceMember(m01.GetMethod));
Symbols\SymbolErrorTests.cs (2)
10310Assert.False(classAProp1.GetMethod.IsVirtual); //NB: non-virtual since private 10363Assert.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());