11 overrides of GetMethod
Microsoft.CodeAnalysis.CSharp (11)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
71
public override MethodSymbol
GetMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
196
public override MethodSymbol
GetMethod
Symbols\ErrorPropertySymbol.cs (1)
57
public override MethodSymbol
GetMethod
{ get { return null; } }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
757
public override MethodSymbol
GetMethod
Symbols\NativeIntegerTypeSymbol.cs (1)
519
public override MethodSymbol?
GetMethod
{ get; }
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
123
public override MethodSymbol
GetMethod
Symbols\SignatureOnlyPropertySymbol.cs (1)
102
public override MethodSymbol
GetMethod
{ get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourcePropertySymbolBase.cs (1)
647
public sealed override MethodSymbol?
GetMethod
Symbols\SubstitutedPropertySymbol.cs (1)
86
public override MethodSymbol
GetMethod
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
43
public override MethodSymbol?
GetMethod
{ get; }
Symbols\Synthesized\SynthesizedPropertySymbol.cs (1)
28
public override MethodSymbol
GetMethod
{ get; }
863 references to GetMethod
Microsoft.CodeAnalysis.CSharp (76)
Binder\Binder_Attributes.cs (1)
647
var getMethod = propertySymbol.
GetMethod
;
Binder\Binder_Expressions.cs (2)
9309
(propertySymbol.
GetMethod
is null || propertySymbol.
GetMethod
.CallerUnsafeMode == propertySymbol.CallerUnsafeMode) ||
Binder\Binder_Invocation.cs (1)
1388
var method = property.
GetMethod
?? property.SetMethod;
Binder\Binder_Lookup.cs (1)
1602
method1 = property.
GetMethod
;
Binder\Binder_Patterns.cs (2)
97
GetMethod
: not null,
215
GetMethod
: not null,
Emitter\Model\PropertySymbolAdapter.cs (2)
35
var getMethod = AdaptedPropertySymbol.
GetMethod
?.GetCciAdapter();
72
MethodSymbol getMethod = AdaptedPropertySymbol.
GetMethod
;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
589
var getMethod = property.AdaptedPropertySymbol.
GetMethod
?.GetCciAdapter();
FlowAnalysis\AbstractFlowPass.cs (1)
3784
property.GetOwnOrInheritedSetMethod() ?? property.
GetMethod
;
FlowAnalysis\NullableWalker.cs (2)
12154
ApplyMemberPostConditions(node.ReceiverOpt, property.
GetMethod
);
12315
var getMethod = ((PropertySymbol)member.OriginalDefinition).
GetMethod
;
FlowAnalysis\NullableWalker_Patterns.cs (2)
484
if (property.
GetMethod
is not null)
487
ApplyMemberPostConditions(inputType, inputSlot, property.
GetMethod
);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
367
MethodSymbol isCompletedMethod = ((object)node.AwaitableInfo.IsCompleted != null) ? VisitMethodSymbol(node.AwaitableInfo.IsCompleted.
GetMethod
) : null;
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (1)
184
var isCompletedMethod = awaitableInfo.IsCompleted.
GetMethod
;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1122
membersBuilder.Add(_bound.MethodInfo(AnonymousTypeManager.GetAnonymousTypeProperty(anonType, i).
GetMethod
, _bound.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
Lowering\IteratorRewriter\IteratorRewriter.cs (3)
159
var getter = symbol.
GetMethod
;
216
var IEnumerator_get_Current = F.SpecialProperty(SpecialMember.System_Collections_IEnumerator__Current).
GetMethod
;
219
var IEnumeratorOfElementType_get_Current = F.SpecialProperty(SpecialMember.System_Collections_Generic_IEnumerator_T__Current).
GetMethod
.AsMember(IEnumeratorOfElementType);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (2)
182
MethodMayMutateReceiver(node.ReceiverOpt, node.PropertySymbol.
GetMethod
);
316
MethodMayMutateReceiver(node.ReceiverOpt, node.Indexer.
GetMethod
);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (3)
261
Debug.Assert(e.Property.
GetMethod
.ParameterCount == 1);
262
Debug.Assert(e.Property.
GetMethod
.Parameters[0].Type.SpecialType == SpecialType.System_Int32);
263
TypeSymbol type = e.Property.
GetMethod
.ReturnType;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
271
MethodSymbol invocationListAccessor = invocationListProperty.
GetMethod
;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
393
MethodSymbol currentManagedThreadIdMethod = currentManagedThreadIdProperty.
GetMethod
;
Symbols\MemberSymbolExtensions.cs (1)
381
return isImplementableAndNotPublic(propertySymbol.
GetMethod
) || isImplementableAndNotPublic(propertySymbol.SetMethod);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
511
MethodSymbol getMethod = curr.
GetMethod
;
909
if (!prop.
GetMethod
.IsImplementable())
Symbols\NativeIntegerTypeSymbol.cs (1)
506
GetMethod = getAccessor(container, this, underlyingProperty.
GetMethod
);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
260
MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.
GetMethod
: propertyHiddenByProperty.SetMethod;
Symbols\PropertySymbol.cs (1)
255
MethodSymbol accessor =
GetMethod
?? SetMethod;
Symbols\PropertySymbolExtensions.cs (1)
26
MethodSymbol getMethod = property.
GetMethod
;
Symbols\PublicModel\PropertySymbol.cs (1)
53
get { return _underlying.
GetMethod
.GetPublicSymbol(); }
Symbols\Retargeting\RetargetingPropertySymbol.cs (2)
127
return (object)_underlyingProperty.
GetMethod
== null
129
: this.RetargetingTranslator.Retarget(_underlyingProperty.
GetMethod
);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
354
checkAccessorIsAccessibleIfImplementable(propertySymbol.
GetMethod
);
Symbols\Source\SourceMemberContainerSymbol.cs (6)
4427
MethodSymbol accessor = getNotSet ? propertySymbol.
GetMethod
: propertySymbol.SetMethod;
4508
var locationFrom = (Symbol)(getNotSet ? propertySymbol.
GetMethod
: propertySymbol.SetMethod) ?? propertySymbol;
5022
Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol {
GetMethod
.IsEffectivelyReadOnly: false }));
5309
else if (existingMember is PropertySymbol { IsStatic: false,
GetMethod
: { } } prop
5419
members.Add(equalityContract.
GetMethod
);
5449
if (equalityContract.
GetMethod
is null)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
587
var getMethod = property.
GetMethod
;
833
else if (associatedProperty.
GetMethod
== overridingMember && (object)overriddenProperty.
GetMethod
== null)
1123
if (overridingProperty.
GetMethod
is object)
1127
overridingProperty.
GetMethod
.GetFirstLocation(),
1129
overridingProperty.
GetMethod
,
1158
if (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)
916
if ((overriddenProperty.
GetMethod
is { } && GetMethod is null) ||
1015
CheckExplicitImplementationAccessor(GetMethod, explicitlyImplementedProperty.
GetMethod
, explicitlyImplementedProperty, diagnostics);
Symbols\SubstitutedPropertySymbol.cs (1)
90
MethodSymbol originalGetMethod = OriginalDefinition.
GetMethod
;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (2)
123
Debug.Assert(property is {
GetMethod
: not null, SetMethod: null });
125
builder.Add(property.
GetMethod
);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
27
GetMethod = new SynthesizedReadOnlyListMethod(containingType, interfaceProperty.
GetMethod
, getAccessorBody);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
773
builder.AddIfNotNull(property.
GetMethod
);
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (3)
26
Debug.Assert(positionalMembers.All(p => p is PropertySymbol {
GetMethod
: not null } or FieldSymbol));
107
var getterMethod = property.
GetMethod
;
108
return property.
GetMethod
is not null && !getterMethod.IsEffectivelyReadOnly;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
70
if (_equalityContract.
GetMethod
is null)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
57
if (_equalityContract.
GetMethod
is null)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (3)
325
var getterMethod = property.
GetMethod
;
326
if (property.
GetMethod
is not null && !getterMethod.IsEffectivelyReadOnly)
342
return !property.IsIndexer && !property.IsOverride && property.
GetMethod
is not null;
Symbols\Synthesized\SynthesizedEmbeddedMemorySafetyRulesAttributeSymbol.cs (2)
103
Debug.Assert(property.
GetMethod
is not null);
105
builder.Add(selector(property.
GetMethod
));
Symbols\TypeSymbol.cs (3)
1416
interfaceAccessor1 = interfaceProperty.
GetMethod
;
1941
var implementingGetMethod = implementedProperty.
GetMethod
.IsImplementable() ?
1951
implementedProperty.
GetMethod
,
Symbols\VarianceSafety.cs (2)
195
bool hasGetter = (object)property.
GetMethod
!= null;
202
requireInputSafety: hasSetter || !(property.
GetMethod
?.RefKind == RefKind.None),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (64)
BreakingChanges.cs (2)
106
Assert.Equal(Accessibility.Public, baseProperty1.
GetMethod
.DeclaredAccessibility);
110
Assert.Equal(Accessibility.ProtectedOrInternal, baseProperty2.
GetMethod
.DeclaredAccessibility);
CodeGen\CodeGenFunctionPointersTests.cs (1)
799
verifier(property.
GetMethod
.ReturnType);
CodeGen\CodeGenOverridingAndHiding.cs (3)
3780
var methodA = classA.GetMember<PropertySymbol>("P").
GetMethod
;
3782
var methodC = classC.GetMember<PropertySymbol>("P").
GetMethod
;
3854
var methodB = classB.GetMember<PropertySymbol>("P").
GetMethod
;
CodeGen\CodeGenReadonlyStructTests.cs (38)
1385
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Handle));
1386
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Signature.ReturnParam.Handle));
1391
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Handle));
1392
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Signature.ReturnParam.Handle));
1395
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Handle));
1396
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Signature.ReturnParam.Handle));
1401
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Handle));
1402
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Signature.ReturnParam.Handle));
1407
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Handle));
1408
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Signature.ReturnParam.Handle));
1465
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Handle));
1466
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Signature.ReturnParam.Handle));
1469
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Handle));
1470
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Signature.ReturnParam.Handle));
1473
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Handle));
1474
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Signature.ReturnParam.Handle));
1477
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Handle));
1478
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Signature.ReturnParam.Handle));
1523
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Handle));
1524
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Signature.ReturnParam.Handle));
1527
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Handle));
1528
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Signature.ReturnParam.Handle));
1531
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Handle));
1532
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Signature.ReturnParam.Handle));
1537
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Handle));
1538
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Signature.ReturnParam.Handle));
1543
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Handle));
1544
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Signature.ReturnParam.Handle));
1598
verifyReadOnly(s1.GetProperty("P1").
GetMethod
, true, RefKind.RefReadOnly);
1601
verifyReadOnly(s1.GetProperty("P2").
GetMethod
, true, RefKind.RefReadOnly);
1603
verifyReadOnly(s1.GetProperty("P3").
GetMethod
, true, RefKind.RefReadOnly);
1606
verifyReadOnly(s1.GetProperty("P4").
GetMethod
, false, RefKind.Ref);
1609
verifyReadOnly(s1.GetProperty("P5").
GetMethod
, false, null);
1619
verifyReadOnly(s2.GetProperty("P1").
GetMethod
, true, RefKind.RefReadOnly);
1620
verifyReadOnly(s2.GetProperty("P2").
GetMethod
, true, RefKind.RefReadOnly);
1623
verifyReadOnly(s2.GetProperty("P4").
GetMethod
, false, null);
2606
Assert.Equal(isReadOnly, type.GetProperty("P").
GetMethod
.IsDeclaredReadOnly);
2607
Assert.Equal(isReadOnly, type.GetProperty("P").
GetMethod
.IsEffectivelyReadOnly);
CodeGen\CodeGenTupleTest.cs (6)
13263
Assert.True(m10I1P1.
GetMethod
.IsExplicitInterfaceImplementation);
13264
Assert.Equal("System.Int32 I1.P1.get", m10I1P1.
GetMethod
.ExplicitInterfaceImplementations.Single().ToTestDisplayString());
15832
Assert.True(m1P1Get.Equals(m1P1.
GetMethod
, TypeCompareKind.ConsiderEverything));
15862
Assert.True(m1thisGet.Equals(m1this.
GetMethod
, TypeCompareKind.ConsiderEverything));
23906
Assert.Equal("ref (System.Int32, System.Object) ConsoleApplication5.C2.Goo.get", m.
GetMethod
.ToTestDisplayString());
23910
Assert.Equal("ref (System.Int32, dynamic) ClassLibrary1.C1.Goo.get", b.
GetMethod
.ToTestDisplayString());
CodeGen\IndexerTests.cs (2)
161
var getMethod = indexer.
GetMethod
;
263
var getMethod = indexer.
GetMethod
;
Emit\CompilationEmitTests.cs (1)
2453
Assert.Equal(Accessibility.Internal, hiddenProperty.
GetMethod
.DeclaredAccessibility);
Emit\EmitMetadataTests.cs (11)
814
Assert.NotNull(property.
GetMethod
);
822
Assert.NotNull(property.
GetMethod
);
1098
Assert.True(propertyP.
GetMethod
.IsVirtual);
1099
Assert.False(propertyP.
GetMethod
.IsOverride);
1102
Assert.True(propertyQ.
GetMethod
.IsVirtual);
1103
Assert.False(propertyQ.
GetMethod
.IsOverride);
1117
Assert.False(propertyP.
GetMethod
.IsVirtual);
1118
Assert.True(propertyP.
GetMethod
.IsOverride);
1171
CheckPropertyAccessorAccessibility(property, propertyAccessibility, property.
GetMethod
, getterAccessibility);
1282
Assert.Equal(p.
GetMethod
.AssociatedSymbol, p);
1310
VerifyAutoPropertyAccessor(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
))
4235
SemanticEdit.Create(SemanticEditKind.Insert, null, q2.
GetMethod
),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (74)
Attributes\AttributeTests.cs (9)
1714
attrs = prop.
GetMethod
.GetAttributes();
1805
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.
GetMethod
.GetAttributes()));
1813
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.
GetMethod
.GetAttributes()));
1821
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop3.
GetMethod
.GetAttributes()));
1829
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop3.
GetMethod
.GetAttributes()));
2465
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.
GetMethod
.GetAttributes()));
2475
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.
GetMethod
.GetAttributes()));
3792
var getter = property.
GetMethod
;
4026
var getter = property.
GetMethod
;
Attributes\AttributeTests_Conditional.cs (3)
156
var propGetMethod = propP1.
GetMethod
;
165
propGetMethod = propP2.
GetMethod
;
171
propGetMethod = propP3.
GetMethod
;
Attributes\AttributeTests_Dynamic.cs (4)
391
ValidateDynamicAttribute(prop1.
GetMethod
.GetReturnTypeAttributes(), expectedDynamicAttribute: true);
402
ValidateDynamicAttribute(prop2.
GetMethod
.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags);
422
ValidateDynamicAttribute(indexer.
GetMethod
.GetReturnTypeAttributes(), expectedDynamicAttribute: true);
423
ValidateDynamicAttribute(indexer.
GetMethod
.Parameters[0].GetAttributes(), expectedDynamicAttribute: true);
Attributes\AttributeTests_Nullable.cs (2)
2536
var method = property.
GetMethod
;
2562
var method = property.
GetMethod
;
Attributes\AttributeTests_Synthesized.cs (2)
243
Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)p.
GetMethod
).Handle).Single().AttributeClass.Name);
248
Assert.Empty(peModule.GetCustomAttributesForToken(((PEMethodSymbol)q.
GetMethod
).Handle));
OverloadResolutionPriorityTests.cs (4)
1452
Assert.Equal(0, indexer.
GetMethod
.OverloadResolutionPriority);
1575
Assert.Equal(0, indexer.
GetMethod
.OverloadResolutionPriority);
1581
Assert.Equal(0, indexer.
GetMethod
.OverloadResolutionPriority);
1616
Assert.Equal(0, indexer.
GetMethod
.OverloadResolutionPriority);
RefStructInterfacesTests.cs (44)
158
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
190
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
224
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
249
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
275
Assert.True(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
313
Assert.True(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
353
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
381
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
405
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
437
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
471
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
497
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
523
Assert.True(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
561
Assert.True(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
601
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
630
Assert.True(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1062
Assert.Equal(onInterfaceGet, p.
GetMethod
.HasUnscopedRefAttribute);
1122
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1178
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1224
Assert.False(c1P.
GetMethod
.HasUnscopedRefAttribute);
1227
Assert.False(c2P.
GetMethod
.HasUnscopedRefAttribute);
1230
Assert.False(c3P.
GetMethod
.HasUnscopedRefAttribute);
1290
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1312
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1349
Assert.Equal(onImplementationGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1402
Assert.Equal(onImplementationGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1459
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1479
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1578
Assert.Equal(onGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1612
Assert.Equal(onGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1638
Assert.Equal(onInterfaceGet, p.
GetMethod
.HasUnscopedRefAttribute);
1698
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1754
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1800
Assert.False(c1P.
GetMethod
.HasUnscopedRefAttribute);
1803
Assert.False(c2P.
GetMethod
.HasUnscopedRefAttribute);
1806
Assert.False(c3P.
GetMethod
.HasUnscopedRefAttribute);
1866
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1888
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1925
Assert.Equal(onImplementationGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
1978
Assert.Equal(onImplementationGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
2035
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
2055
Assert.False(propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
2154
Assert.Equal(onGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
2188
Assert.Equal(onGet, propertySymbol.
GetMethod
.HasUnscopedRefAttribute);
Semantics\ExtensionTests2.cs (1)
35037
var extensionGetter = extensionProperty.
GetMethod
;
Semantics\ParamsCollectionTests.cs (2)
8994
if (prop.
GetMethod
is MethodSymbol getMethod)
9039
if (prop.
GetMethod
is MethodSymbol getMethod)
Semantics\RecordTests.cs (3)
12404
VerifyAccessor(property.
GetMethod
, getterName);
12504
verifyReturnType(property.
GetMethod
, CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Int32)));
12508
verifyReturnType(property.
GetMethod
,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
Semantics\ArglistTests.cs (4)
1258
var getter = indexer.
GetMethod
;
1284
var getter = indexer.
GetMethod
;
1310
var getter = indexer.
GetMethod
;
1336
var getter = indexer.
GetMethod
;
Semantics\InitOnlyMemberTests.cs (11)
48
Assert.False(property.
GetMethod
.IsInitOnly);
612
Assert.False(property.
GetMethod
.IsInitOnly);
643
Assert.False(property.
GetMethod
.IsInitOnly);
902
Assert.False(property.
GetMethod
.IsInitOnly);
1157
Assert.False(property.
GetMethod
.IsInitOnly);
1461
var getter = property.
GetMethod
;
1462
Assert.Empty(property.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers);
3284
Assert.Null(property1.
GetMethod
);
3289
Assert.Null(property2.
GetMethod
);
3376
Assert.Null(property1.
GetMethod
);
3382
Assert.Null(property2.
GetMethod
);
Semantics\NativeIntegerTests.cs (1)
1829
Assert.Same(getMethod, property.
GetMethod
);
Semantics\NullableReferenceTypesTests.cs (9)
12903
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
13055
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
13146
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16654
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16739
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16824
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
30222
var getter = property.
GetMethod
;
30325
var getter = property.
GetMethod
;
48028
var getter = property.
GetMethod
;
Semantics\ReadOnlyStructsTests.cs (7)
1325
Assert.Equal(isReadOnly, property.
GetMethod
.IsDeclaredReadOnly);
1326
Assert.Equal(isReadOnly, property.
GetMethod
.IsEffectivelyReadOnly);
1327
Assert.Equal(isReadOnly, property.
GetMethod
.GetPublicSymbol().IsReadOnly);
1613
var moduleGetter = moduleComp.GetMember<PropertySymbol>("S.P1").
GetMethod
;
1618
var dllGetter = dllComp.GetMember<PropertySymbol>("S.P1").
GetMethod
;
1641
var moduleGetter = moduleComp.GetMember<PropertySymbol>("S.P1").
GetMethod
;
1646
var dllGetter = dllComp.GetMember<PropertySymbol>("S.P1").
GetMethod
;
Semantics\RefFieldTests.cs (2)
11103
VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").
GetMethod
.Parameters[0], "scoped in System.Object o", RefKind.In, ScopedKind.ScopedRef);
25451
VerifyParameterSymbol(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)
46
var baseGetter = baseProperty.
GetMethod
;
51
var derivedGetter = derivedProperty.
GetMethod
;
105
var baseGetter = baseProperty.
GetMethod
;
110
var derived1Getter = derived1Property.
GetMethod
;
115
Assert.Null(derived2Property.
GetMethod
);
156
var baseGetter = baseProperty.
GetMethod
;
161
var derivedGetter = derivedProperty.
GetMethod
;
211
var baseGetter = baseProperty.
GetMethod
;
215
var derived1Getter = derived1Property.
GetMethod
;
220
Assert.Null(derived2Property.
GetMethod
);
319
var ilGetter = global.GetMember<NamedTypeSymbol>("Base").GetMember<PropertySymbol>("P").
GetMethod
;
320
var csharpGetter1 = global.GetMember<NamedTypeSymbol>("Derived1").GetMember<PropertySymbol>("P").
GetMethod
;
321
var csharpGetter2 = global.GetMember<NamedTypeSymbol>("Derived2").GetMember<PropertySymbol>("P").
GetMethod
;
349
var ilGetter = global.GetMember<NamedTypeSymbol>("I").GetMember<PropertySymbol>("P").
GetMethod
;
351
var csharpGetter = @class.GetMember<PropertySymbol>("P").
GetMethod
;
382
var ilGetter = global.GetMember<NamedTypeSymbol>("I").GetMember<PropertySymbol>("P").
GetMethod
;
384
var csharpGetter = @class.GetProperty("I.P").
GetMethod
;
423
var interfaceGetter = interfaceProperty.
GetMethod
;
428
var baseGetter = baseProperty.
GetMethod
;
482
var derivedGetter = derivedProperty.
GetMethod
;
570
var interfaceGetter = interfaceProperty.
GetMethod
;
575
var baseGetter = baseProperty.
GetMethod
;
580
var derivedGetter = derivedProperty.
GetMethod
;
638
var interfaceGetter = interfaceProperty.
GetMethod
;
643
var derived1Getter = derived1Property.
GetMethod
;
698
var interface1Getter = interface1Property.
GetMethod
;
703
var interface2Getter = interface2Property.
GetMethod
;
708
var interface3Getter = interface3Property.
GetMethod
;
757
var interfacePGetter = interfaceP.
GetMethod
;
761
var interfaceQGetter = interfaceQ.
GetMethod
;
767
var classPGetter = classP.
GetMethod
;
771
var classQGetter = classQ.
GetMethod
;
Symbols\AnonymousTypesSymbolTests.cs (1)
1106
var getter = property.
GetMethod
;
Symbols\CovariantReturnTests.cs (2)
304
if (property.
GetMethod
is MethodSymbol getMethod && overriddenProperty.
GetMethod
is MethodSymbol overriddenGetMethod)
Symbols\CSharpCompilerFeatureRequiredTests.cs (2)
175
Assert.True(onPropertyGetterProperty.
GetMethod
.HasUnsupportedMetadata);
182
Assert.False(onPropertySetterProperty.
GetMethod
.HasUnsupportedMetadata);
Symbols\CustomModifiersTests.cs (2)
1234
Assert.Equal("System.Int32 modopt(System.Runtime.CompilerServices.IsConst) modopt(System.Runtime.CompilerServices.IsLong) CL3.Test.get", test.
GetMethod
.ToTestDisplayString());
1235
Assert.True(test.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.SequenceEqual(test.SetMethod.Parameters.First().TypeWithAnnotations.CustomModifiers));
Symbols\DefaultInterfaceImplementationTests.cs (347)
2706
ValidateAccessor(p1.
GetMethod
);
2710
Assert.Null(p1.
GetMethod
);
2751
peModule.Module.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.
GetMethod
).Handle, out _, out _, out _, out rva);
2768
Assert.Same(p1.
GetMethod
, test1.FindImplementationForInterfaceMember(p1.
GetMethod
));
2787
var getP1 = p1.
GetMethod
;
3026
Assert.Null(p1.
GetMethod
);
3062
Assert.Null(p1.
GetMethod
);
3098
Assert.Null(p1.
GetMethod
);
3128
Assert.True(p1.
GetMethod
.IsAbstract);
3153
Assert.True(p1.
GetMethod
.IsAbstract);
3178
Assert.True(p1.
GetMethod
.IsVirtual);
3217
Assert.Null(p1.
GetMethod
);
3251
Assert.Null(p1.
GetMethod
);
3285
Assert.Null(p1.
GetMethod
);
3315
Assert.True(p1.
GetMethod
.IsAbstract);
3340
Assert.True(p1.
GetMethod
.IsAbstract);
3361
Assert.True(p1.
GetMethod
.IsVirtual);
3436
var getP1 = p1.
GetMethod
;
3506
var getP1 = p1.
GetMethod
;
3595
var getP1 = p1.
GetMethod
;
3661
var getP1 = p1.
GetMethod
;
3816
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
3817
Assert.Same(p2.
GetMethod
, derived.FindImplementationForInterfaceMember(p2.
GetMethod
));
3818
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
3819
Assert.Same(p4.
GetMethod
, derived.FindImplementationForInterfaceMember(p4.
GetMethod
));
3822
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
3823
Assert.Same(p8.
GetMethod
, derived.FindImplementationForInterfaceMember(p8.
GetMethod
));
4051
Assert.Equal("System.Int32 Test.I1.P1.get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
4052
Assert.Equal("System.Int32 Test.I1.P2.get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
4053
Assert.Equal("System.Int32 Test.I1.P3.get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
4054
Assert.Equal("System.Int32 Test.I1.P4.get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
4057
Assert.Equal("System.Int32 Test.I1.P7.get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
4058
Assert.Equal("System.Int32 Test.I1.P8.get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
4203
Assert.Equal("System.Int32 Test.P1.get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
4204
Assert.Equal("System.Int32 Test.P2.get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
4205
Assert.Equal("System.Int32 Test.P3.get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
4206
Assert.Equal("System.Int32 Test.P4.get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
4209
Assert.Equal("System.Int32 Test.P7.get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
4210
Assert.Equal("System.Int32 Test.P8.get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
4392
Assert.True(p1.
GetMethod
.IsVirtual);
4393
Assert.True(p3.
GetMethod
.IsVirtual);
4395
Assert.True(p7.
GetMethod
.IsVirtual);
4398
Assert.True(p1.
GetMethod
.IsMetadataVirtual());
4399
Assert.True(p3.
GetMethod
.IsMetadataVirtual());
4401
Assert.True(p7.
GetMethod
.IsMetadataVirtual());
4404
Assert.False(p1.
GetMethod
.IsAbstract);
4405
Assert.False(p3.
GetMethod
.IsAbstract);
4407
Assert.False(p7.
GetMethod
.IsAbstract);
4410
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
4411
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
4413
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
4549
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
GetMethod
));
4550
Assert.Null(test2.FindImplementationForInterfaceMember(p3.
GetMethod
));
4552
Assert.Null(test2.FindImplementationForInterfaceMember(p7.
GetMethod
));
4957
Assert.True(p1.
GetMethod
.IsStatic);
4958
Assert.True(p3.
GetMethod
.IsStatic);
4960
Assert.True(p7.
GetMethod
.IsStatic);
4963
Assert.False(p1.
GetMethod
.IsVirtual);
4964
Assert.False(p3.
GetMethod
.IsVirtual);
4966
Assert.False(p7.
GetMethod
.IsVirtual);
4969
Assert.False(p1.
GetMethod
.IsMetadataVirtual());
4970
Assert.False(p3.
GetMethod
.IsMetadataVirtual());
4972
Assert.False(p7.
GetMethod
.IsMetadataVirtual());
4975
Assert.False(p1.
GetMethod
.IsAbstract);
4976
Assert.False(p3.
GetMethod
.IsAbstract);
4978
Assert.False(p7.
GetMethod
.IsAbstract);
4981
Assert.Null(derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
4982
Assert.Null(derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
4984
Assert.Null(derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
5165
Assert.Null(p1.
GetMethod
);
5193
Assert.True(p1.
GetMethod
.IsAbstract);
5230
Assert.Null(p1.
GetMethod
);
5258
Assert.True(p1.
GetMethod
.IsAbstract);
5299
var getP1 = p1.
GetMethod
;
5352
var getP1 = p1.
GetMethod
;
5479
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
5480
Assert.Same(p2.
GetMethod
, derived.FindImplementationForInterfaceMember(p2.
GetMethod
));
5481
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
5482
Assert.Same(p4.
GetMethod
, derived.FindImplementationForInterfaceMember(p4.
GetMethod
));
5485
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
5486
Assert.Same(p8.
GetMethod
, derived.FindImplementationForInterfaceMember(p8.
GetMethod
));
5666
Assert.Equal("System.Int32 Test.I1.get_Item(System.SByte i)", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
5667
Assert.Equal("System.Int32 Test.I1.get_Item(System.Byte i)", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
5668
Assert.Equal("System.Int32 Test.I1.get_Item(System.Int16 i)", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
5669
Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt16 i)", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
5672
Assert.Equal("System.Int32 Test.I1.get_Item(System.Int64 i)", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
5673
Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt64 i)", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
5679
Assert.Equal("System.Int32 Test.I1.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
5680
Assert.Equal("System.Int32 Test.I1.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
5681
Assert.Equal("System.Int32 Test.I1.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
5682
Assert.Equal("System.Int32 Test.I1.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
5685
Assert.Equal("System.Int32 Test.I1.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
5686
Assert.Equal("System.Int32 Test.I1.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
5807
Assert.Equal("System.Int32 Test.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
5808
Assert.Equal("System.Int32 Test.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
5809
Assert.Equal("System.Int32 Test.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
5810
Assert.Equal("System.Int32 Test.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
5813
Assert.Equal("System.Int32 Test.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
5814
Assert.Equal("System.Int32 Test.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
5949
Assert.True(p1.
GetMethod
.IsVirtual);
5950
Assert.True(p3.
GetMethod
.IsVirtual);
5952
Assert.True(p7.
GetMethod
.IsVirtual);
5955
Assert.True(p1.
GetMethod
.IsMetadataVirtual());
5956
Assert.True(p3.
GetMethod
.IsMetadataVirtual());
5958
Assert.True(p7.
GetMethod
.IsMetadataVirtual());
5961
Assert.False(p1.
GetMethod
.IsAbstract);
5962
Assert.False(p3.
GetMethod
.IsAbstract);
5964
Assert.False(p7.
GetMethod
.IsAbstract);
5967
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
5968
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
5970
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
6091
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
GetMethod
));
6092
Assert.Null(test2.FindImplementationForInterfaceMember(p3.
GetMethod
));
6094
Assert.Null(test2.FindImplementationForInterfaceMember(p7.
GetMethod
));
13314
ValidateP01Accessor(p01.
GetMethod
);
13330
var p02get = p02.
GetMethod
;
13372
var p04get = p04.
GetMethod
;
13414
var p06get = p06.
GetMethod
;
13456
var p08get = p08.
GetMethod
;
13498
var p10get = p10.
GetMethod
;
13528
ValidateP11Accessor(p11.
GetMethod
);
13553
ValidateP12Accessor(p12.
GetMethod
);
13578
ValidateP13Accessor(p13.
GetMethod
, Accessibility.Public);
13603
ValidateP14Accessor(p14.
GetMethod
, Accessibility.ProtectedOrInternal);
13628
ValidateP15Accessor(p15.
GetMethod
, Accessibility.Public);
13653
ValidateP16Accessor(p16.
GetMethod
, Accessibility.Private);
13669
var p17get = p17.
GetMethod
;
13690
var p18get = p18.
GetMethod
;
13720
ValidateP13Accessor(p19.
GetMethod
, Accessibility.Public);
14177
var p1get = p1.
GetMethod
;
14280
ValidateAccessor(p1.
GetMethod
, test1P1.
GetMethod
);
14353
ValidateAccessor(p1.
GetMethod
);
14575
Assert.Null(p1.
GetMethod
);
14582
ValidateAccessor(p1.
GetMethod
);
14585
ValidateAccessor(p1.
GetMethod
);
14671
var p1get = p1.
GetMethod
;
14717
var p3get = p3.
GetMethod
;
14924
Assert.Null(p1.
GetMethod
);
14931
ValidateAccessor(p1.
GetMethod
);
14934
ValidateAccessor(p1.
GetMethod
);
15013
var p1get = p1.
GetMethod
;
15036
var p2get = p2.
GetMethod
;
15069
ValidateP3Accessor(p3.
GetMethod
);
15086
var p4get = p4.
GetMethod
;
15216
var p1get = p1.
GetMethod
;
15276
var p1get = p1.
GetMethod
;
15283
Assert.Same(test1P1.
GetMethod
, test1.FindImplementationForInterfaceMember(p1get));
15317
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
GetMethod
));
15457
var p1get = p1.
GetMethod
;
15462
Assert.Same(test1P1.
GetMethod
, test1.FindImplementationForInterfaceMember(p1get));
15466
Assert.True(test1P1.
GetMethod
.IsMetadataVirtual());
16290
Assert.Null(test1.FindImplementationForInterfaceMember(p1.
GetMethod
));
16476
Assert.Null(p1.
GetMethod
);
16483
ValidateAccessor(p1.
GetMethod
);
16486
ValidateAccessor(p1.
GetMethod
);
16591
var p1get = p1.
GetMethod
;
16617
var p2get = p2.
GetMethod
;
16883
Assert.Null(p2.
GetMethod
);
16891
ValidateAccessor(p2.
GetMethod
, test1P2.
GetMethod
);
16894
ValidateAccessor(p2.
GetMethod
, test1P2.
GetMethod
);
17051
var p1get = p1.
GetMethod
;
17073
Assert.Same(test2P1.
GetMethod
, test2.FindImplementationForInterfaceMember(p1get));
17117
ValidateP3Accessor(p3.
GetMethod
);
17136
var p4get = p4.
GetMethod
;
17294
var p1get = p1.
GetMethod
;
17316
Assert.Same(test2P1.
GetMethod
, test2.FindImplementationForInterfaceMember(p1get));
17320
var p2get = p2.
GetMethod
;
17342
Assert.Same(test2P2.
GetMethod
, test2.FindImplementationForInterfaceMember(p2get));
17357
ValidateP3Accessor(p3.
GetMethod
, p3.IsIndexer ? test2P3.
GetMethod
: null);
17386
ValidateP4Accessor(p4.
GetMethod
);
17404
var p5get = p5.
GetMethod
;
17555
ValidateP1Accessor(p1.
GetMethod
, test2P1.
GetMethod
);
17574
var p2get = p2.
GetMethod
;
17596
Assert.Same(test2P2.
GetMethod
, test2.FindImplementationForInterfaceMember(p2get));
17611
ValidateP3Accessor(p3.
GetMethod
, p3.IsIndexer ? test2P3.
GetMethod
: null);
17641
ValidateP4Accessor(p4.
GetMethod
, p4.IsIndexer ? test2P4.
GetMethod
: null);
17659
var p5get = p5.
GetMethod
;
17744
var p1get = p1.
GetMethod
;
17788
var p1get = p1.
GetMethod
;
18037
ValidateAccessor(p1.
GetMethod
, accessibility);
18042
ValidateAccessor(p1.
GetMethod
, Accessibility.Public);
18625
if (implementingProperty.
GetMethod
?.ExplicitInterfaceImplementations.Length > 0 ||
18636
ValidateMethod23(p1, p1.
GetMethod
, isAbstract, getAccess, test1, implementingProperty?.
GetMethod
);
20125
var p1get = p1.
GetMethod
;
20169
var p1get = p1.
GetMethod
;
20801
validateAccessor(p1.
GetMethod
, tuple.getAccess);
21873
ValidateP01Accessor(p01.
GetMethod
);
21889
var p02get = p02.
GetMethod
;
21931
var p04get = p04.
GetMethod
;
21973
var p06get = p06.
GetMethod
;
22015
var p08get = p08.
GetMethod
;
22057
var p10get = p10.
GetMethod
;
22087
ValidateP11Accessor(p11.
GetMethod
);
22112
ValidateP12Accessor(p12.
GetMethod
);
22137
ValidateP13Accessor(p13.
GetMethod
, Accessibility.Public);
22162
ValidateP14Accessor(p14.
GetMethod
, Accessibility.ProtectedOrInternal);
22187
ValidateP15Accessor(p15.
GetMethod
, Accessibility.Public);
22212
ValidateP16Accessor(p16.
GetMethod
, Accessibility.Private);
22228
var p17get = p17.
GetMethod
;
22249
var p18get = p18.
GetMethod
;
22279
ValidateP13Accessor(p19.
GetMethod
, Accessibility.Public);
23663
Assert.Null(test1.FindImplementationForInterfaceMember(p1.
GetMethod
));
37491
ValidateAccessor(expected?.
GetMethod
, interfaceProperty.
GetMethod
);
37510
ValidateAccessor(expected?.
GetMethod
, interfaceProperty.
GetMethod
);
37536
ValidateAccessor(m1.
GetMethod
, isAbstract, isStatic);
38428
ValidateAccessor(m1.
GetMethod
);
53370
if (i1p1.
GetMethod
is object)
53372
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
53373
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53374
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53376
else if (i2p1.
GetMethod
is object)
53378
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
53404
if (reabstracting.
GetMethod
is object)
53406
ValidateReabstraction(reabstracting.
GetMethod
, isStatic);
53569
if (i1p1.
GetMethod
is object)
53571
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53572
Assert.Same(test12p1.
GetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53724
if (i1p1.
GetMethod
is object)
53726
Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53727
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53896
if (i1p1.
GetMethod
is object)
53898
Assert.Same(i3p1.
GetMethod
, i3.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53899
Assert.Same(i3p1.
GetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54059
if (i1p1.
GetMethod
is object)
54061
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54224
if (i1p1.
GetMethod
is object)
54226
Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54227
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54365
if (i1p1.
GetMethod
is object)
54367
Assert.Same(i4p1.
GetMethod
, i4.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54368
Assert.Same(i4p1.
GetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54452
if (i1p1.
GetMethod
is object)
54454
if (i2p1.
GetMethod
is object)
54456
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
54459
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54460
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54462
else if (i2p1.
GetMethod
is object)
54464
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
54586
var i2p1Get = i2p1.
GetMethod
;
54625
if (i1p1.
GetMethod
is object)
54627
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
54628
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54629
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54631
else if (i2p1.
GetMethod
is object)
54633
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
54725
var c2p1Get = c2p1.
GetMethod
;
54744
if (i1p1.
GetMethod
is object)
54746
Assert.Same(i1p1.
GetMethod
, c2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
54747
Assert.Same(c2p1Get, c2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54749
else if (c2p1.
GetMethod
is object)
54751
Assert.Empty(c2p1.
GetMethod
.ExplicitInterfaceImplementations);
55060
if (i1p1.
GetMethod
is object)
55062
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
55063
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
55064
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
55066
else if (i2p1.
GetMethod
is object)
55068
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
55228
Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
).ToTestDisplayString());
55301
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
55401
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
55472
Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
).ToTestDisplayString());
55540
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
55634
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
55728
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
55816
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
57884
if (i2p1.
GetMethod
is object)
57886
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
63997
Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
63998
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64008
Assert.Same(c1i1P1get, test1.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64009
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64019
Assert.Same(c1i1P1get, test4.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64020
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64030
Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64031
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64191
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64195
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64199
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64203
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64357
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64361
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64365
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64369
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64531
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64535
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64539
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64543
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64932
Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64933
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64943
Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64944
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65062
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65066
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65178
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65182
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65298
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65302
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
65376
Assert.Null(c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
65456
Assert.Null(c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
65531
Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
65610
Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
68171
Assert.Empty(m.
GetMethod
.ExplicitInterfaceImplementations);
68240
Assert.Same(m2.
GetMethod
, m1.
GetMethod
.ExplicitInterfaceImplementations.Single());
68845
Assert.True(p.
GetMethod
.IsMetadataVirtual());
68846
Assert.True(p.
GetMethod
.IsMetadataFinal);
68909
Assert.True(p.
GetMethod
.IsMetadataVirtual());
68910
Assert.True(p.
GetMethod
.IsMetadataFinal);
Symbols\IndexedPropertyTests.cs (12)
991
Assert.True(property.
GetMethod
.CanBeReferencedByName);
992
Assert.True(property.
GetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
999
Assert.True(property.
GetMethod
.CanBeReferencedByName);
1000
Assert.True(property.
GetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
1007
Assert.False(property.
GetMethod
.CanBeReferencedByName);
1008
Assert.False(property.
GetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
1093
Assert.True(property.
GetMethod
.CanBeReferencedByName);
1094
Assert.True(property.
GetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
1099
Assert.False(property.
GetMethod
.CanBeReferencedByName);
1100
Assert.True(property.
GetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
2521
Assert.Null(sourceType1.FindImplementationForInterfaceMember(interfaceProperty.
GetMethod
));
2525
Assert.NotNull(sourceType2.FindImplementationForInterfaceMember(interfaceProperty.
GetMethod
));
Symbols\IndexerTests.cs (20)
184
var getter = property.
GetMethod
;
208
Assert.Equal(property.
GetMethod
!= null, hasGet);
287
Assert.Null(indexerC.
GetMethod
.OverriddenMethod);
343
Assert.Equal(classIndexer.
GetMethod
, synthesizedExplicitImplementations[0].ImplementingMethod);
344
Assert.Equal(classIndexer.
GetMethod
, synthesizedExplicitImplementations[1].ImplementingMethod);
346
var interface1Getter = interface1Indexer.
GetMethod
;
347
var interface2Getter = interface2Indexer.
GetMethod
;
425
Assert.Equal(classIndexer.
GetMethod
, synthesizedExplicitImplementations[0].ImplementingMethod);
426
Assert.Equal(classIndexer.
GetMethod
, synthesizedExplicitImplementations[1].ImplementingMethod);
428
var interface1Getter = interface1Indexer.
GetMethod
;
429
var interface2Getter = interface2Indexer.
GetMethod
;
491
Assert.Equal(classIndexer.
GetMethod
, synthesizedExplicitImplementation.ImplementingMethod);
493
Assert.Equal(interfaceIndexers[0].
GetMethod
, synthesizedExplicitImplementation.ExplicitInterfaceImplementations.Single());
494
Assert.Equal(interfaceIndexers[1].
GetMethod
, synthesizedExplicitImplementation.ExplicitInterfaceImplementations.Single());
1439
Assert.Equal("get_A", indexer.
GetMethod
.Name);
1440
Assert.Equal("get_A", indexer.
GetMethod
.MetadataName);
1463
Assert.Equal("get_@indexer", indexer.
GetMethod
.MetadataName);
2406
Assert.NotNull(indexer.
GetMethod
);
2407
Assert.False(indexer.
GetMethod
.Parameters.IsEmpty);
2409
foreach (var p in indexer.
GetMethod
.Parameters)
Symbols\InterfaceImplementationTests.cs (7)
914
var interfacePropertyGetter = interfaceProperty.
GetMethod
;
922
var baseClassPropertyGetter = baseClassProperty.
GetMethod
;
983
var interfacePropertyGetter = interfaceProperty.
GetMethod
;
991
var baseClassPropertyGetter = baseClassProperty.
GetMethod
;
1771
var interfaceGetter = interfaceProperty.
GetMethod
;
2290
var interfaceGetter = interfaceProperty.
GetMethod
;
2293
var baseGetter = baseProperty.
GetMethod
;
Symbols\Metadata\MetadataMemberTests.cs (2)
496
Assert.Null(propWithoutGetter.
GetMethod
);
502
Assert.NotNull(propWithoutSetter.
GetMethod
);
Symbols\Metadata\PE\DynamicTransformsTests.cs (2)
312
Assert.Equal(s_dynamicType, prop1.
GetMethod
.ReturnType);
317
Assert.Equal(complicatedInnerInnerArrayOfArray, prop2.
GetMethod
.ReturnType);
Symbols\Metadata\PE\LoadingAttributes.cs (2)
388
var attr = property1.
GetMethod
.GetReturnTypeAttributes().First();
1121
Assert.Equal(3, prop.
GetMethod
.GetAttributes().Length);
Symbols\Metadata\PE\LoadingIndexers.cs (2)
1042
CheckAccessorShape(property.
GetMethod
, true, property, expectIndexer, suppressAssociatedPropertyCheck);
1046
Assert.Null(property.
GetMethod
);
Symbols\Metadata\PE\LoadingProperties.cs (14)
236
Assert.NotNull(interfaceProperty1.
GetMethod
);
239
Assert.NotNull(interfaceProperty2.
GetMethod
);
242
Assert.NotNull(interfaceProperty3.
GetMethod
);
245
Assert.NotNull(interfaceProperty4.
GetMethod
);
248
Assert.Null(interfaceProperty5.
GetMethod
);
257
Assert.NotNull(classProperty1.
GetMethod
);
260
Assert.NotNull(classProperty2.
GetMethod
);
268
var implementedByGetter1 = ImmutableArray.Create<MethodSymbol>(interfaceProperty1.
GetMethod
, interfaceProperty2.
GetMethod
, interfaceProperty4.
GetMethod
);
269
Assert.True(implementedByGetter1.SetEquals(classProperty1.
GetMethod
.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance));
274
var implementedByGetter2 = ImmutableArray.Create<MethodSymbol>(interfaceProperty3.
GetMethod
);
275
Assert.True(implementedByGetter2.SetEquals(classProperty2.
GetMethod
.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance));
360
var getter = property.
GetMethod
;
Symbols\PartialPropertiesTests.cs (10)
729
Assert.True(prop.PartialImplementationPart!.
GetMethod
!.GetPublicSymbol().IsExtern);
739
Assert.False(prop.
GetMethod
!.GetPublicSymbol().IsExtern);
805
verifyAccessor(prop.
GetMethod
!);
812
verifyAccessor(implPart.
GetMethod
!);
964
verifyAccessor(propDefinition.GetMethod!, propImplementation.
GetMethod
!);
1039
var implementationAccessor = propImplementation.
GetMethod
!;
1122
Assert.Null(propImplementation.
GetMethod
);
2713
validateAccessor(p.
GetMethod
);
2853
validateAccessor(p.
GetMethod
);
3967
verify(indexer.PartialImplementationPart!.
GetMethod
!.Parameters.Single());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
223
MethodSymbol testMethod = testProperty.
GetMethod
;
Symbols\Retargeting\RetargetingTests.cs (2)
1260
CheckSymbols(a.
GetMethod
, b.
GetMethod
, true);
Symbols\Source\ClsComplianceTests.cs (1)
2113
var accessor = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<PropertySymbol>("P").
GetMethod
;
Symbols\Source\CustomModifierCopyTests.cs (22)
370
property.
GetMethod
,
424
property.
GetMethod
,
1792
Assert.Equal(int8Type, baseProperty.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
1793
Assert.Equal(int8Type, derivedProperty.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
1798
Assert.Equal(int8Type, baseIndexer.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
1799
Assert.Equal(int8Type, derivedIndexer.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
1801
Assert.Equal(int16Type, baseIndexer.
GetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
1802
Assert.Equal(int16Type, derivedIndexer.
GetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
1902
Assert.Equal(0, baseProperty.
GetMethod
.CustomModifierCount());
1904
Assert.Equal(0, baseIndexer.
GetMethod
.CustomModifierCount());
1906
Assert.Equal(0, derivedProperty.
GetMethod
.CustomModifierCount());
1908
Assert.Equal(0, derivedIndexer.
GetMethod
.CustomModifierCount());
2006
Assert.Equal(int8Type, interfaceProperty.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
2007
Assert.Equal(int8Type, implementationProperty.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
2012
Assert.Equal(int8Type, interfaceIndexer.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
2013
Assert.Equal(int8Type, implementationIndexer.
GetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
2015
Assert.Equal(int16Type, interfaceIndexer.
GetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
2016
Assert.Equal(int16Type, implementationIndexer.
GetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
2101
Assert.Equal(0, interfaceProperty.
GetMethod
.CustomModifierCount());
2103
Assert.Equal(0, interfaceIndexer.
GetMethod
.CustomModifierCount());
2105
Assert.Equal(0, implementationProperty.
GetMethod
.CustomModifierCount());
2107
Assert.Equal(0, implementationIndexer.
GetMethod
.CustomModifierCount());
Symbols\Source\MethodTests.cs (3)
1964
var methodA = classA.GetMember<PropertySymbol>("P").
GetMethod
;
1966
var methodC = classC.GetMember<PropertySymbol>("P").
GetMethod
;
2009
var methodB = classB.GetMember<PropertySymbol>("P").
GetMethod
;
Symbols\Source\PropertyTests.cs (14)
186
Assert.NotNull(p.
GetMethod
);
190
Assert.NotNull(q.
GetMethod
);
194
Assert.NotNull(r.
GetMethod
);
247
Assert.NotNull(p.
GetMethod
);
251
Assert.NotNull(q.
GetMethod
);
255
Assert.NotNull(r.
GetMethod
);
364
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
368
Assert.False(p.
GetMethod
.IsImplicitlyDeclared);
372
Assert.False(q.
GetMethod
.IsImplicitlyDeclared);
591
VerifyMethodAndAccessorSame(type, property, property.
GetMethod
);
2490
var interfacePropertyGetter = interfaceProperty.
GetMethod
;
2497
var classPropertyGetter = classProperty.
GetMethod
;
2529
var interfacePropertyGetter = interfaceProperty.
GetMethod
;
2536
var classPropertyGetter = classProperty.
GetMethod
;
Symbols\StaticAbstractMembersInInterfacesTests.cs (108)
1817
var m01 = i1.GetMember<PropertySymbol>("M01").
GetMethod
;
1829
var m02 = i1.GetMember<PropertySymbol>("M02").
GetMethod
;
1841
var m03 = i1.GetMember<PropertySymbol>("M03").
GetMethod
;
1853
var m04 = i1.GetMember<PropertySymbol>("M04").
GetMethod
;
1865
var m05 = i1.GetMember<PropertySymbol>("M05").
GetMethod
;
1877
var m06 = i1.GetMember<PropertySymbol>("M06").
GetMethod
;
1889
var m07 = i1.GetMember<PropertySymbol>("M07").
GetMethod
;
1901
var m08 = i1.GetMember<PropertySymbol>("M08").
GetMethod
;
1913
var m09 = i1.GetMember<PropertySymbol>("M09").
GetMethod
;
1925
var m10 = i1.GetMember<PropertySymbol>("M10").
GetMethod
;
23089
Assert.Same(i6m.
GetMethod
, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).
GetMethod
);
23180
Assert.Same(i6m.
GetMethod
, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).
GetMethod
);
23393
var m01Get = m01.
GetMethod
;
23408
var cM01Get = cM01.
GetMethod
;
23488
var m01Get = m01.
GetMethod
;
23504
var cM01Get = cM01.
GetMethod
;
23579
var m01Get = m01.
GetMethod
;
23594
var cM01Get = cM01.
GetMethod
;
23691
Assert.Same(cM01.
GetMethod
, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
23695
Assert.Same(m01.
GetMethod
, cM01.
GetMethod
.ExplicitInterfaceImplementations.Single());
23847
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
23850
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
23855
Assert.Same(c1M01.
GetMethod
, c2.FindImplementationForInterfaceMember(m01.
GetMethod
));
23860
Assert.Same(c1M01.
GetMethod
, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
23865
Assert.Same(c1M01.
GetMethod
, c4.FindImplementationForInterfaceMember(m01.
GetMethod
));
23872
Assert.Same(c2M01.
GetMethod
, c5.FindImplementationForInterfaceMember(m01.
GetMethod
));
23947
Assert.Same(m01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
23948
Assert.Same(m01.
GetMethod
, i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
23990
Assert.Same(c1m01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
23991
Assert.Same(m01.
GetMethod
, i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24027
Assert.Same(c1m01.
GetMethod
, c.FindImplementationForInterfaceMember(m01.
GetMethod
));
24081
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24082
Assert.Null(i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24113
var m01Get = m01.
GetMethod
;
24127
var cM01Get = cM01.
GetMethod
;
24172
var m01Get = m01.
GetMethod
;
24185
var cM01Get = cM01.
GetMethod
;
24251
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24254
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24276
var m01Get = m01.
GetMethod
;
24289
var cM01Get = cM01.
GetMethod
;
24344
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24377
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24433
Assert.Same(m01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24434
Assert.Same(m01.
GetMethod
, i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24465
var m01Get = m01.
GetMethod
;
24492
Assert.Null(cM01.
GetMethod
);
24550
var cM01Get = cM01.
GetMethod
;
24562
var m01Get = m01.
GetMethod
;
24604
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24606
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24654
var m01Get = m01.
GetMethod
;
24696
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24729
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24732
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24812
Assert.Same(i2M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24813
Assert.Same(i2M01.
GetMethod
, i2.FindImplementationForInterfaceMember(m01.
GetMethod
));
24818
Assert.Same(m01.
GetMethod
, i2M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24858
var c2M01Get = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.
GetMethod
);
24881
Assert.Same(m01.
GetMethod
, c2M01Get.ExplicitInterfaceImplementations.Single());
24893
var c1M01Get = c1M01.
GetMethod
;
24935
Assert.Same(c2M01.
GetMethod
, c2M01Get);
25047
var c1M01Get = c1M01.
GetMethod
;
25064
Assert.Same(c1M01Get, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
25078
Assert.Same(m01.
GetMethod
, c1M01Get.ExplicitInterfaceImplementations.Single());
25101
var c2M01Get = c2M01.
GetMethod
;
25119
Assert.Same(m01.
GetMethod
, c2M01Get.ExplicitInterfaceImplementations.Single());
25120
Assert.Same(c2M01Get, c2.FindImplementationForInterfaceMember(m01.
GetMethod
));
25141
var c3M01Get = c3M01.
GetMethod
;
25159
Assert.Same(m01.
GetMethod
, c3M01Get.ExplicitInterfaceImplementations.Single());
25160
Assert.Same(c3M01Get, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
25258
var c1M01Get = c1M01.
GetMethod
;
25280
var c2M01Get = c3.FindImplementationForInterfaceMember(m01.
GetMethod
);
25292
Assert.Same(c1M01.
GetMethod
, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
25301
Assert.Same(c2M02.
GetMethod
, c3.FindImplementationForInterfaceMember(m02.
GetMethod
));
25380
var c2M01Get = c2M01.
GetMethod
;
25411
var c3M01Get = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.
GetMethod
);
25413
Assert.Same(m01.
GetMethod
, c3M01Get.ExplicitInterfaceImplementations.Single());
25422
Assert.Same(c2M01Get, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
Symbols\SymbolErrorTests.cs (2)
10339
Assert.False(classAProp1.
GetMethod
.IsVirtual); //NB: non-virtual since private
10392
Assert.True(classAProp1.
GetMethod
.IsVirtual);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
LifetimeAnnotationAttributesVisitor.cs (1)
69
Visit(property.
GetMethod
);
TestAttributesVisitor.cs (1)
71
Visit(property.
GetMethod
);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdMetadataTests.cs (1)
137
Assert.Equal("System.Runtime.WindowsRuntime.dll", ((PENamedTypeSymbol)((((PropertySymbol)(blk)).
GetMethod
).ReturnType)).ContainingModule.ToString());