11 overrides of GetMethod
Microsoft.CodeAnalysis.CSharp (11)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
71public override MethodSymbol GetMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
196public override MethodSymbol GetMethod
Symbols\ErrorPropertySymbol.cs (1)
57public override MethodSymbol GetMethod { get { return null; } }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
757public override MethodSymbol GetMethod
Symbols\NativeIntegerTypeSymbol.cs (1)
519public 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)
647public sealed override MethodSymbol? GetMethod
Symbols\SubstitutedPropertySymbol.cs (1)
86public override MethodSymbol GetMethod
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
43public override MethodSymbol? GetMethod { get; }
Symbols\Synthesized\SynthesizedPropertySymbol.cs (1)
28public override MethodSymbol GetMethod { get; }
863 references to GetMethod
Microsoft.CodeAnalysis.CSharp (76)
Binder\Binder_Attributes.cs (1)
647var getMethod = propertySymbol.GetMethod;
Binder\Binder_Expressions.cs (2)
9309(propertySymbol.GetMethod is null || propertySymbol.GetMethod.CallerUnsafeMode == propertySymbol.CallerUnsafeMode) ||
Binder\Binder_Invocation.cs (1)
1388var method = property.GetMethod ?? property.SetMethod;
Binder\Binder_Lookup.cs (1)
1602method1 = property.GetMethod;
Binder\Binder_Patterns.cs (2)
97GetMethod: not null, 215GetMethod: not null,
Emitter\Model\PropertySymbolAdapter.cs (2)
35var getMethod = AdaptedPropertySymbol.GetMethod?.GetCciAdapter(); 72MethodSymbol getMethod = AdaptedPropertySymbol.GetMethod;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
589var getMethod = property.AdaptedPropertySymbol.GetMethod?.GetCciAdapter();
FlowAnalysis\AbstractFlowPass.cs (1)
3784property.GetOwnOrInheritedSetMethod() ?? property.GetMethod;
FlowAnalysis\NullableWalker.cs (2)
12154ApplyMemberPostConditions(node.ReceiverOpt, property.GetMethod); 12315var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
FlowAnalysis\NullableWalker_Patterns.cs (2)
484if (property.GetMethod is not null) 487ApplyMemberPostConditions(inputType, inputSlot, property.GetMethod);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
367MethodSymbol isCompletedMethod = ((object)node.AwaitableInfo.IsCompleted != null) ? VisitMethodSymbol(node.AwaitableInfo.IsCompleted.GetMethod) : null;
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (1)
184var isCompletedMethod = awaitableInfo.IsCompleted.GetMethod;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1122membersBuilder.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)
261Debug.Assert(e.Property.GetMethod.ParameterCount == 1); 262Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 263TypeSymbol type = e.Property.GetMethod.ReturnType;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
271MethodSymbol invocationListAccessor = invocationListProperty.GetMethod;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
393MethodSymbol currentManagedThreadIdMethod = currentManagedThreadIdProperty.GetMethod;
Symbols\MemberSymbolExtensions.cs (1)
381return isImplementableAndNotPublic(propertySymbol.GetMethod) || isImplementableAndNotPublic(propertySymbol.SetMethod);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
511MethodSymbol getMethod = curr.GetMethod; 909if (!prop.GetMethod.IsImplementable())
Symbols\NativeIntegerTypeSymbol.cs (1)
506GetMethod = getAccessor(container, this, underlyingProperty.GetMethod);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
260MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.GetMethod : propertyHiddenByProperty.SetMethod;
Symbols\PropertySymbol.cs (1)
255MethodSymbol 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)
354checkAccessorIsAccessibleIfImplementable(propertySymbol.GetMethod);
Symbols\Source\SourceMemberContainerSymbol.cs (6)
4427MethodSymbol accessor = getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod; 4508var locationFrom = (Symbol)(getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod) ?? propertySymbol; 5022Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 5309else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 5419members.Add(equalityContract.GetMethod); 5449if (equalityContract.GetMethod is null)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
587var getMethod = property.GetMethod; 833else if (associatedProperty.GetMethod == overridingMember && (object)overriddenProperty.GetMethod == null) 1123if (overridingProperty.GetMethod is object) 1127overridingProperty.GetMethod.GetFirstLocation(), 1129overridingProperty.GetMethod, 1158if (overridingProperty.GetMethod != ownOrInheritedGetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedGetMethod, overridingType, ref useSiteInfo))
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
672? explicitlyImplementedPropertyOpt.GetMethod 744? explicitlyImplementedPropertyOpt.GetMethod
Symbols\Source\SourcePropertySymbolBase.cs (2)
916if ((overriddenProperty.GetMethod is { } && GetMethod is null) || 1015CheckExplicitImplementationAccessor(GetMethod, explicitlyImplementedProperty.GetMethod, explicitlyImplementedProperty, diagnostics);
Symbols\SubstitutedPropertySymbol.cs (1)
90MethodSymbol originalGetMethod = OriginalDefinition.GetMethod;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (2)
123Debug.Assert(property is { GetMethod: not null, SetMethod: null }); 125builder.Add(property.GetMethod);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
27GetMethod = new SynthesizedReadOnlyListMethod(containingType, interfaceProperty.GetMethod, getAccessorBody);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
773builder.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)
325var getterMethod = property.GetMethod; 326if (property.GetMethod is not null && !getterMethod.IsEffectivelyReadOnly) 342return !property.IsIndexer && !property.IsOverride && property.GetMethod is not null;
Symbols\Synthesized\SynthesizedEmbeddedMemorySafetyRulesAttributeSymbol.cs (2)
103Debug.Assert(property.GetMethod is not null); 105builder.Add(selector(property.GetMethod));
Symbols\TypeSymbol.cs (3)
1416interfaceAccessor1 = interfaceProperty.GetMethod; 1941var implementingGetMethod = implementedProperty.GetMethod.IsImplementable() ? 1951implementedProperty.GetMethod,
Symbols\VarianceSafety.cs (2)
195bool hasGetter = (object)property.GetMethod != null; 202requireInputSafety: hasSetter || !(property.GetMethod?.RefKind == RefKind.None),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (64)
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)
1385Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle)); 1386Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle)); 1391Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle)); 1392Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle)); 1395Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle)); 1396Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle)); 1401Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle)); 1402Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle)); 1407Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Handle)); 1408Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Signature.ReturnParam.Handle)); 1465Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle)); 1466Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle)); 1469Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle)); 1470Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle)); 1473Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle)); 1474Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle)); 1477Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle)); 1478Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle)); 1523Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle)); 1524Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle)); 1527Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle)); 1528Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle)); 1531Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle)); 1532Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle)); 1537Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle)); 1538Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle)); 1543Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Handle)); 1544Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Signature.ReturnParam.Handle)); 1598verifyReadOnly(s1.GetProperty("P1").GetMethod, true, RefKind.RefReadOnly); 1601verifyReadOnly(s1.GetProperty("P2").GetMethod, true, RefKind.RefReadOnly); 1603verifyReadOnly(s1.GetProperty("P3").GetMethod, true, RefKind.RefReadOnly); 1606verifyReadOnly(s1.GetProperty("P4").GetMethod, false, RefKind.Ref); 1609verifyReadOnly(s1.GetProperty("P5").GetMethod, false, null); 1619verifyReadOnly(s2.GetProperty("P1").GetMethod, true, RefKind.RefReadOnly); 1620verifyReadOnly(s2.GetProperty("P2").GetMethod, true, RefKind.RefReadOnly); 1623verifyReadOnly(s2.GetProperty("P4").GetMethod, false, null); 2606Assert.Equal(isReadOnly, type.GetProperty("P").GetMethod.IsDeclaredReadOnly); 2607Assert.Equal(isReadOnly, type.GetProperty("P").GetMethod.IsEffectivelyReadOnly);
CodeGen\CodeGenTupleTest.cs (6)
13263Assert.True(m10I1P1.GetMethod.IsExplicitInterfaceImplementation); 13264Assert.Equal("System.Int32 I1.P1.get", m10I1P1.GetMethod.ExplicitInterfaceImplementations.Single().ToTestDisplayString()); 15832Assert.True(m1P1Get.Equals(m1P1.GetMethod, TypeCompareKind.ConsiderEverything)); 15862Assert.True(m1thisGet.Equals(m1this.GetMethod, TypeCompareKind.ConsiderEverything)); 23906Assert.Equal("ref (System.Int32, System.Object) ConsoleApplication5.C2.Goo.get", m.GetMethod.ToTestDisplayString()); 23910Assert.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\CompilationEmitTests.cs (1)
2453Assert.Equal(Accessibility.Internal, hiddenProperty.GetMethod.DeclaredAccessibility);
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)
4198? ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, r1), SemanticEdit.Create(SemanticEditKind.Insert, null, r1.GetMethod)) 4235SemanticEdit.Create(SemanticEditKind.Insert, null, q2.GetMethod),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (74)
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)
243Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)p.GetMethod).Handle).Single().AttributeClass.Name); 248Assert.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\ExtensionTests2.cs (1)
35037var extensionGetter = extensionProperty.GetMethod;
Semantics\ParamsCollectionTests.cs (2)
8994if (prop.GetMethod is MethodSymbol getMethod) 9039if (prop.GetMethod is MethodSymbol getMethod)
Semantics\RecordTests.cs (3)
12404VerifyAccessor(property.GetMethod, getterName); 12504verifyReturnType(property.GetMethod, CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Int32))); 12508verifyReturnType(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)
12903Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13055Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13146Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16654Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16739Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16824Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 30222var getter = property.GetMethod; 30325var getter = property.GetMethod; 48028var 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)
11103VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").GetMethod.Parameters[0], "scoped in System.Object o", RefKind.In, ScopedKind.ScopedRef); 25451VerifyParameterSymbol(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)
2706ValidateAccessor(p1.GetMethod); 2710Assert.Null(p1.GetMethod); 2751peModule.Module.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.GetMethod).Handle, out _, out _, out _, out rva); 2768Assert.Same(p1.GetMethod, test1.FindImplementationForInterfaceMember(p1.GetMethod)); 2787var getP1 = p1.GetMethod; 3026Assert.Null(p1.GetMethod); 3062Assert.Null(p1.GetMethod); 3098Assert.Null(p1.GetMethod); 3128Assert.True(p1.GetMethod.IsAbstract); 3153Assert.True(p1.GetMethod.IsAbstract); 3178Assert.True(p1.GetMethod.IsVirtual); 3217Assert.Null(p1.GetMethod); 3251Assert.Null(p1.GetMethod); 3285Assert.Null(p1.GetMethod); 3315Assert.True(p1.GetMethod.IsAbstract); 3340Assert.True(p1.GetMethod.IsAbstract); 3361Assert.True(p1.GetMethod.IsVirtual); 3436var getP1 = p1.GetMethod; 3506var getP1 = p1.GetMethod; 3595var getP1 = p1.GetMethod; 3661var getP1 = p1.GetMethod; 3816Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 3817Assert.Same(p2.GetMethod, derived.FindImplementationForInterfaceMember(p2.GetMethod)); 3818Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 3819Assert.Same(p4.GetMethod, derived.FindImplementationForInterfaceMember(p4.GetMethod)); 3822Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 3823Assert.Same(p8.GetMethod, derived.FindImplementationForInterfaceMember(p8.GetMethod)); 4051Assert.Equal("System.Int32 Test.I1.P1.get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 4052Assert.Equal("System.Int32 Test.I1.P2.get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 4053Assert.Equal("System.Int32 Test.I1.P3.get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 4054Assert.Equal("System.Int32 Test.I1.P4.get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 4057Assert.Equal("System.Int32 Test.I1.P7.get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 4058Assert.Equal("System.Int32 Test.I1.P8.get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 4203Assert.Equal("System.Int32 Test.P1.get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 4204Assert.Equal("System.Int32 Test.P2.get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 4205Assert.Equal("System.Int32 Test.P3.get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 4206Assert.Equal("System.Int32 Test.P4.get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 4209Assert.Equal("System.Int32 Test.P7.get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 4210Assert.Equal("System.Int32 Test.P8.get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 4392Assert.True(p1.GetMethod.IsVirtual); 4393Assert.True(p3.GetMethod.IsVirtual); 4395Assert.True(p7.GetMethod.IsVirtual); 4398Assert.True(p1.GetMethod.IsMetadataVirtual()); 4399Assert.True(p3.GetMethod.IsMetadataVirtual()); 4401Assert.True(p7.GetMethod.IsMetadataVirtual()); 4404Assert.False(p1.GetMethod.IsAbstract); 4405Assert.False(p3.GetMethod.IsAbstract); 4407Assert.False(p7.GetMethod.IsAbstract); 4410Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 4411Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 4413Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 4549Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 4550Assert.Null(test2.FindImplementationForInterfaceMember(p3.GetMethod)); 4552Assert.Null(test2.FindImplementationForInterfaceMember(p7.GetMethod)); 4957Assert.True(p1.GetMethod.IsStatic); 4958Assert.True(p3.GetMethod.IsStatic); 4960Assert.True(p7.GetMethod.IsStatic); 4963Assert.False(p1.GetMethod.IsVirtual); 4964Assert.False(p3.GetMethod.IsVirtual); 4966Assert.False(p7.GetMethod.IsVirtual); 4969Assert.False(p1.GetMethod.IsMetadataVirtual()); 4970Assert.False(p3.GetMethod.IsMetadataVirtual()); 4972Assert.False(p7.GetMethod.IsMetadataVirtual()); 4975Assert.False(p1.GetMethod.IsAbstract); 4976Assert.False(p3.GetMethod.IsAbstract); 4978Assert.False(p7.GetMethod.IsAbstract); 4981Assert.Null(derived.FindImplementationForInterfaceMember(p1.GetMethod)); 4982Assert.Null(derived.FindImplementationForInterfaceMember(p3.GetMethod)); 4984Assert.Null(derived.FindImplementationForInterfaceMember(p7.GetMethod)); 5165Assert.Null(p1.GetMethod); 5193Assert.True(p1.GetMethod.IsAbstract); 5230Assert.Null(p1.GetMethod); 5258Assert.True(p1.GetMethod.IsAbstract); 5299var getP1 = p1.GetMethod; 5352var getP1 = p1.GetMethod; 5479Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 5480Assert.Same(p2.GetMethod, derived.FindImplementationForInterfaceMember(p2.GetMethod)); 5481Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 5482Assert.Same(p4.GetMethod, derived.FindImplementationForInterfaceMember(p4.GetMethod)); 5485Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 5486Assert.Same(p8.GetMethod, derived.FindImplementationForInterfaceMember(p8.GetMethod)); 5666Assert.Equal("System.Int32 Test.I1.get_Item(System.SByte i)", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5667Assert.Equal("System.Int32 Test.I1.get_Item(System.Byte i)", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5668Assert.Equal("System.Int32 Test.I1.get_Item(System.Int16 i)", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5669Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt16 i)", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5672Assert.Equal("System.Int32 Test.I1.get_Item(System.Int64 i)", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5673Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt64 i)", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5679Assert.Equal("System.Int32 Test.I1.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5680Assert.Equal("System.Int32 Test.I1.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5681Assert.Equal("System.Int32 Test.I1.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5682Assert.Equal("System.Int32 Test.I1.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5685Assert.Equal("System.Int32 Test.I1.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5686Assert.Equal("System.Int32 Test.I1.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5807Assert.Equal("System.Int32 Test.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.GetMethod).ToTestDisplayString()); 5808Assert.Equal("System.Int32 Test.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.GetMethod).ToTestDisplayString()); 5809Assert.Equal("System.Int32 Test.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.GetMethod).ToTestDisplayString()); 5810Assert.Equal("System.Int32 Test.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.GetMethod).ToTestDisplayString()); 5813Assert.Equal("System.Int32 Test.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.GetMethod).ToTestDisplayString()); 5814Assert.Equal("System.Int32 Test.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.GetMethod).ToTestDisplayString()); 5949Assert.True(p1.GetMethod.IsVirtual); 5950Assert.True(p3.GetMethod.IsVirtual); 5952Assert.True(p7.GetMethod.IsVirtual); 5955Assert.True(p1.GetMethod.IsMetadataVirtual()); 5956Assert.True(p3.GetMethod.IsMetadataVirtual()); 5958Assert.True(p7.GetMethod.IsMetadataVirtual()); 5961Assert.False(p1.GetMethod.IsAbstract); 5962Assert.False(p3.GetMethod.IsAbstract); 5964Assert.False(p7.GetMethod.IsAbstract); 5967Assert.Same(p1.GetMethod, derived.FindImplementationForInterfaceMember(p1.GetMethod)); 5968Assert.Same(p3.GetMethod, derived.FindImplementationForInterfaceMember(p3.GetMethod)); 5970Assert.Same(p7.GetMethod, derived.FindImplementationForInterfaceMember(p7.GetMethod)); 6091Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 6092Assert.Null(test2.FindImplementationForInterfaceMember(p3.GetMethod)); 6094Assert.Null(test2.FindImplementationForInterfaceMember(p7.GetMethod)); 13314ValidateP01Accessor(p01.GetMethod); 13330var p02get = p02.GetMethod; 13372var p04get = p04.GetMethod; 13414var p06get = p06.GetMethod; 13456var p08get = p08.GetMethod; 13498var p10get = p10.GetMethod; 13528ValidateP11Accessor(p11.GetMethod); 13553ValidateP12Accessor(p12.GetMethod); 13578ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 13603ValidateP14Accessor(p14.GetMethod, Accessibility.ProtectedOrInternal); 13628ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 13653ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 13669var p17get = p17.GetMethod; 13690var p18get = p18.GetMethod; 13720ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 14177var p1get = p1.GetMethod; 14280ValidateAccessor(p1.GetMethod, test1P1.GetMethod); 14353ValidateAccessor(p1.GetMethod); 14575Assert.Null(p1.GetMethod); 14582ValidateAccessor(p1.GetMethod); 14585ValidateAccessor(p1.GetMethod); 14671var p1get = p1.GetMethod; 14717var p3get = p3.GetMethod; 14924Assert.Null(p1.GetMethod); 14931ValidateAccessor(p1.GetMethod); 14934ValidateAccessor(p1.GetMethod); 15013var p1get = p1.GetMethod; 15036var p2get = p2.GetMethod; 15069ValidateP3Accessor(p3.GetMethod); 15086var p4get = p4.GetMethod; 15216var p1get = p1.GetMethod; 15276var p1get = p1.GetMethod; 15283Assert.Same(test1P1.GetMethod, test1.FindImplementationForInterfaceMember(p1get)); 15317Assert.Null(test2.FindImplementationForInterfaceMember(p1.GetMethod)); 15457var p1get = p1.GetMethod; 15462Assert.Same(test1P1.GetMethod, test1.FindImplementationForInterfaceMember(p1get)); 15466Assert.True(test1P1.GetMethod.IsMetadataVirtual()); 16290Assert.Null(test1.FindImplementationForInterfaceMember(p1.GetMethod)); 16476Assert.Null(p1.GetMethod); 16483ValidateAccessor(p1.GetMethod); 16486ValidateAccessor(p1.GetMethod); 16591var p1get = p1.GetMethod; 16617var p2get = p2.GetMethod; 16883Assert.Null(p2.GetMethod); 16891ValidateAccessor(p2.GetMethod, test1P2.GetMethod); 16894ValidateAccessor(p2.GetMethod, test1P2.GetMethod); 17051var p1get = p1.GetMethod; 17073Assert.Same(test2P1.GetMethod, test2.FindImplementationForInterfaceMember(p1get)); 17117ValidateP3Accessor(p3.GetMethod); 17136var p4get = p4.GetMethod; 17294var p1get = p1.GetMethod; 17316Assert.Same(test2P1.GetMethod, test2.FindImplementationForInterfaceMember(p1get)); 17320var p2get = p2.GetMethod; 17342Assert.Same(test2P2.GetMethod, test2.FindImplementationForInterfaceMember(p2get)); 17357ValidateP3Accessor(p3.GetMethod, p3.IsIndexer ? test2P3.GetMethod : null); 17386ValidateP4Accessor(p4.GetMethod); 17404var p5get = p5.GetMethod; 17555ValidateP1Accessor(p1.GetMethod, test2P1.GetMethod); 17574var p2get = p2.GetMethod; 17596Assert.Same(test2P2.GetMethod, test2.FindImplementationForInterfaceMember(p2get)); 17611ValidateP3Accessor(p3.GetMethod, p3.IsIndexer ? test2P3.GetMethod : null); 17641ValidateP4Accessor(p4.GetMethod, p4.IsIndexer ? test2P4.GetMethod : null); 17659var p5get = p5.GetMethod; 17744var p1get = p1.GetMethod; 17788var p1get = p1.GetMethod; 18037ValidateAccessor(p1.GetMethod, accessibility); 18042ValidateAccessor(p1.GetMethod, Accessibility.Public); 18625if (implementingProperty.GetMethod?.ExplicitInterfaceImplementations.Length > 0 || 18636ValidateMethod23(p1, p1.GetMethod, isAbstract, getAccess, test1, implementingProperty?.GetMethod); 20125var p1get = p1.GetMethod; 20169var p1get = p1.GetMethod; 20801validateAccessor(p1.GetMethod, tuple.getAccess); 21873ValidateP01Accessor(p01.GetMethod); 21889var p02get = p02.GetMethod; 21931var p04get = p04.GetMethod; 21973var p06get = p06.GetMethod; 22015var p08get = p08.GetMethod; 22057var p10get = p10.GetMethod; 22087ValidateP11Accessor(p11.GetMethod); 22112ValidateP12Accessor(p12.GetMethod); 22137ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 22162ValidateP14Accessor(p14.GetMethod, Accessibility.ProtectedOrInternal); 22187ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 22212ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 22228var p17get = p17.GetMethod; 22249var p18get = p18.GetMethod; 22279ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 23663Assert.Null(test1.FindImplementationForInterfaceMember(p1.GetMethod)); 37491ValidateAccessor(expected?.GetMethod, interfaceProperty.GetMethod); 37510ValidateAccessor(expected?.GetMethod, interfaceProperty.GetMethod); 37536ValidateAccessor(m1.GetMethod, isAbstract, isStatic); 38428ValidateAccessor(m1.GetMethod); 53370if (i1p1.GetMethod is object) 53372Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 53373Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53374Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53376else if (i2p1.GetMethod is object) 53378Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 53404if (reabstracting.GetMethod is object) 53406ValidateReabstraction(reabstracting.GetMethod, isStatic); 53569if (i1p1.GetMethod is object) 53571Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53572Assert.Same(test12p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53724if (i1p1.GetMethod is object) 53726Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53727Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53896if (i1p1.GetMethod is object) 53898Assert.Same(i3p1.GetMethod, i3.FindImplementationForInterfaceMember(i1p1.GetMethod)); 53899Assert.Same(i3p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54059if (i1p1.GetMethod is object) 54061Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54224if (i1p1.GetMethod is object) 54226Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54227Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54365if (i1p1.GetMethod is object) 54367Assert.Same(i4p1.GetMethod, i4.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54368Assert.Same(i4p1.GetMethod, test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54452if (i1p1.GetMethod is object) 54454if (i2p1.GetMethod is object) 54456Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 54459Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54460Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54462else if (i2p1.GetMethod is object) 54464Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 54586var i2p1Get = i2p1.GetMethod; 54625if (i1p1.GetMethod is object) 54627Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 54628Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54629Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54631else if (i2p1.GetMethod is object) 54633Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 54725var c2p1Get = c2p1.GetMethod; 54744if (i1p1.GetMethod is object) 54746Assert.Same(i1p1.GetMethod, c2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 54747Assert.Same(c2p1Get, c2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 54749else if (c2p1.GetMethod is object) 54751Assert.Empty(c2p1.GetMethod.ExplicitInterfaceImplementations); 55060if (i1p1.GetMethod is object) 55062Assert.Same(i1p1.GetMethod, i2p1.GetMethod.ExplicitInterfaceImplementations.Single()); 55063Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.GetMethod)); 55064Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.GetMethod)); 55066else if (i2p1.GetMethod is object) 55068Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 55228Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.GetMethod).ToTestDisplayString()); 55301Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 55401Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 55472Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.GetMethod).ToTestDisplayString()); 55540Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 55634Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 55728Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 55816Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.GetMethod)); 57884if (i2p1.GetMethod is object) 57886Assert.Empty(i2p1.GetMethod.ExplicitInterfaceImplementations); 63997Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.GetMethod)); 63998Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64008Assert.Same(c1i1P1get, test1.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64009Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64019Assert.Same(c1i1P1get, test4.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64020Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64030Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64031Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64191Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64195Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64199Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64203Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64357Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64361Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64365Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64369Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64531Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64535Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64539Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64543Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64932Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64933Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 64943Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.GetMethod)); 64944Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65062Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65066Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65178Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65182Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65298Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65302Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.GetMethod)); 65376Assert.Null(c2.FindImplementationForInterfaceMember(p1.GetMethod)); 65456Assert.Null(c2.FindImplementationForInterfaceMember(p1.GetMethod)); 65531Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.GetMethod)); 65610Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.GetMethod)); 68171Assert.Empty(m.GetMethod.ExplicitInterfaceImplementations); 68240Assert.Same(m2.GetMethod, m1.GetMethod.ExplicitInterfaceImplementations.Single()); 68845Assert.True(p.GetMethod.IsMetadataVirtual()); 68846Assert.True(p.GetMethod.IsMetadataFinal); 68909Assert.True(p.GetMethod.IsMetadataVirtual()); 68910Assert.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)
729Assert.True(prop.PartialImplementationPart!.GetMethod!.GetPublicSymbol().IsExtern); 739Assert.False(prop.GetMethod!.GetPublicSymbol().IsExtern); 805verifyAccessor(prop.GetMethod!); 812verifyAccessor(implPart.GetMethod!); 964verifyAccessor(propDefinition.GetMethod!, propImplementation.GetMethod!); 1039var implementationAccessor = propImplementation.GetMethod!; 1122Assert.Null(propImplementation.GetMethod); 2713validateAccessor(p.GetMethod); 2853validateAccessor(p.GetMethod); 3967verify(indexer.PartialImplementationPart!.GetMethod!.Parameters.Single());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
223MethodSymbol testMethod = testProperty.GetMethod;
Symbols\Retargeting\RetargetingTests.cs (2)
1260CheckSymbols(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; 23089Assert.Same(i6m.GetMethod, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).GetMethod); 23180Assert.Same(i6m.GetMethod, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).GetMethod); 23393var m01Get = m01.GetMethod; 23408var cM01Get = cM01.GetMethod; 23488var m01Get = m01.GetMethod; 23504var cM01Get = cM01.GetMethod; 23579var m01Get = m01.GetMethod; 23594var cM01Get = cM01.GetMethod; 23691Assert.Same(cM01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 23695Assert.Same(m01.GetMethod, cM01.GetMethod.ExplicitInterfaceImplementations.Single()); 23847Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23850Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 23855Assert.Same(c1M01.GetMethod, c2.FindImplementationForInterfaceMember(m01.GetMethod)); 23860Assert.Same(c1M01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 23865Assert.Same(c1M01.GetMethod, c4.FindImplementationForInterfaceMember(m01.GetMethod)); 23872Assert.Same(c2M01.GetMethod, c5.FindImplementationForInterfaceMember(m01.GetMethod)); 23947Assert.Same(m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23948Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 23990Assert.Same(c1m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 23991Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24027Assert.Same(c1m01.GetMethod, c.FindImplementationForInterfaceMember(m01.GetMethod)); 24081Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24082Assert.Null(i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24113var m01Get = m01.GetMethod; 24127var cM01Get = cM01.GetMethod; 24172var m01Get = m01.GetMethod; 24185var cM01Get = cM01.GetMethod; 24251Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24254Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24276var m01Get = m01.GetMethod; 24289var cM01Get = cM01.GetMethod; 24344Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24377Assert.Null(c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24433Assert.Same(m01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24434Assert.Same(m01.GetMethod, i1.FindImplementationForInterfaceMember(m01.GetMethod)); 24465var m01Get = m01.GetMethod; 24492Assert.Null(cM01.GetMethod); 24550var cM01Get = cM01.GetMethod; 24562var m01Get = m01.GetMethod; 24604Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24606Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24654var m01Get = m01.GetMethod; 24696Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24729Assert.Same(c1M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24732Assert.Same(m01.GetMethod, c1M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24812Assert.Same(i2M01.GetMethod, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 24813Assert.Same(i2M01.GetMethod, i2.FindImplementationForInterfaceMember(m01.GetMethod)); 24818Assert.Same(m01.GetMethod, i2M01.GetMethod.ExplicitInterfaceImplementations.Single()); 24858var c2M01Get = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.GetMethod); 24881Assert.Same(m01.GetMethod, c2M01Get.ExplicitInterfaceImplementations.Single()); 24893var c1M01Get = c1M01.GetMethod; 24935Assert.Same(c2M01.GetMethod, c2M01Get); 25047var c1M01Get = c1M01.GetMethod; 25064Assert.Same(c1M01Get, c1.FindImplementationForInterfaceMember(m01.GetMethod)); 25078Assert.Same(m01.GetMethod, c1M01Get.ExplicitInterfaceImplementations.Single()); 25101var c2M01Get = c2M01.GetMethod; 25119Assert.Same(m01.GetMethod, c2M01Get.ExplicitInterfaceImplementations.Single()); 25120Assert.Same(c2M01Get, c2.FindImplementationForInterfaceMember(m01.GetMethod)); 25141var c3M01Get = c3M01.GetMethod; 25159Assert.Same(m01.GetMethod, c3M01Get.ExplicitInterfaceImplementations.Single()); 25160Assert.Same(c3M01Get, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 25258var c1M01Get = c1M01.GetMethod; 25280var c2M01Get = c3.FindImplementationForInterfaceMember(m01.GetMethod); 25292Assert.Same(c1M01.GetMethod, c3.FindImplementationForInterfaceMember(m01.GetMethod)); 25301Assert.Same(c2M02.GetMethod, c3.FindImplementationForInterfaceMember(m02.GetMethod)); 25380var c2M01Get = c2M01.GetMethod; 25411var c3M01Get = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.GetMethod); 25413Assert.Same(m01.GetMethod, c3M01Get.ExplicitInterfaceImplementations.Single()); 25422Assert.Same(c2M01Get, c3.FindImplementationForInterfaceMember(m01.GetMethod));
Symbols\SymbolErrorTests.cs (2)
10339Assert.False(classAProp1.GetMethod.IsVirtual); //NB: non-virtual since private 10392Assert.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());