10 overrides of GetMethod
Microsoft.CodeAnalysis.CSharp (10)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
71
public override MethodSymbol
GetMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
194
public override MethodSymbol
GetMethod
Symbols\ErrorPropertySymbol.cs (1)
57
public override MethodSymbol
GetMethod
{ get { return null; } }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
695
public override MethodSymbol
GetMethod
Symbols\NativeIntegerTypeSymbol.cs (1)
508
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)
645
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; }
855 references to GetMethod
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_Attributes.cs (1)
639
var getMethod = propertySymbol.
GetMethod
;
Binder\Binder_Invocation.cs (1)
1381
var method = property.
GetMethod
?? property.SetMethod;
Binder\Binder_Lookup.cs (1)
1622
method1 = property.
GetMethod
;
Emitter\Model\PropertySymbolAdapter.cs (2)
35
var getMethod = AdaptedPropertySymbol.
GetMethod
?.GetCciAdapter();
72
MethodSymbol getMethod = AdaptedPropertySymbol.
GetMethod
;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
536
var getMethod = property.AdaptedPropertySymbol.
GetMethod
?.GetCciAdapter();
FlowAnalysis\AbstractFlowPass.cs (1)
3725
property.GetOwnOrInheritedSetMethod() ?? property.
GetMethod
;
FlowAnalysis\NullableWalker.cs (2)
11381
ApplyMemberPostConditions(node.ReceiverOpt, property.
GetMethod
);
11517
var getMethod = ((PropertySymbol)member.OriginalDefinition).
GetMethod
;
FlowAnalysis\NullableWalker_Patterns.cs (2)
547
if (property.
GetMethod
is not null)
550
ApplyMemberPostConditions(inputSlot, property.
GetMethod
);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
366
MethodSymbol isCompletedMethod = ((object)node.AwaitableInfo.IsCompleted != null) ? VisitMethodSymbol(node.AwaitableInfo.IsCompleted.
GetMethod
) : null;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1070
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)
246
Debug.Assert(e.Property.
GetMethod
.ParameterCount == 1);
247
Debug.Assert(e.Property.
GetMethod
.Parameters[0].Type.SpecialType == SpecialType.System_Int32);
248
TypeSymbol type = e.Property.
GetMethod
.ReturnType;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
271
MethodSymbol invocationListAccessor = invocationListProperty.
GetMethod
;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
389
MethodSymbol currentManagedThreadIdMethod = currentManagedThreadIdProperty.
GetMethod
;
Symbols\MemberSymbolExtensions.cs (1)
370
return isImplementableAndNotPublic(propertySymbol.
GetMethod
) || isImplementableAndNotPublic(propertySymbol.SetMethod);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
488
MethodSymbol getMethod = curr.
GetMethod
;
821
if (!prop.
GetMethod
.IsImplementable())
Symbols\NativeIntegerTypeSymbol.cs (1)
495
GetMethod = getAccessor(container, this, underlyingProperty.
GetMethod
);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
260
MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.
GetMethod
: propertyHiddenByProperty.SetMethod;
Symbols\PropertySymbol.cs (2)
182
return (object)property.
GetMethod
== null;
257
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)
318
checkAccessorIsAccessibleIfImplementable(propertySymbol.
GetMethod
);
Symbols\Source\SourceMemberContainerSymbol.cs (6)
4356
MethodSymbol accessor = getNotSet ? propertySymbol.
GetMethod
: propertySymbol.SetMethod;
4437
var locationFrom = (Symbol)(getNotSet ? propertySymbol.
GetMethod
: propertySymbol.SetMethod) ?? propertySymbol;
4859
Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol {
GetMethod
.IsEffectivelyReadOnly: false }));
5146
else if (existingMember is PropertySymbol { IsStatic: false,
GetMethod
: { } } prop
5256
members.Add(equalityContract.
GetMethod
);
5286
if (equalityContract.
GetMethod
is null)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
572
var getMethod = property.
GetMethod
;
818
else if (associatedProperty.
GetMethod
== overridingMember && (object)overriddenProperty.
GetMethod
== null)
1100
if (overridingProperty.
GetMethod
is object)
1104
overridingProperty.
GetMethod
.GetFirstLocation(),
1106
overridingProperty.
GetMethod
,
1135
if (overridingProperty.
GetMethod
!= ownOrInheritedGetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedGetMethod, overridingType, ref useSiteInfo))
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
623
? explicitlyImplementedPropertyOpt.
GetMethod
695
? explicitlyImplementedPropertyOpt.
GetMethod
Symbols\Source\SourcePropertySymbolBase.cs (2)
914
if ((overriddenProperty.
GetMethod
is { } && GetMethod is null) ||
1013
CheckExplicitImplementationAccessor(GetMethod, explicitlyImplementedProperty.
GetMethod
, explicitlyImplementedProperty, diagnostics);
Symbols\SubstitutedPropertySymbol.cs (1)
90
MethodSymbol originalGetMethod = OriginalDefinition.
GetMethod
;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (2)
115
Debug.Assert(property is {
GetMethod
: not null, SetMethod: null });
117
builder.Add(property.
GetMethod
);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
27
GetMethod = new SynthesizedReadOnlyListMethod(containingType, interfaceProperty.
GetMethod
, getAccessorBody);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
732
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)
314
var getterMethod = property.
GetMethod
;
315
if (property.
GetMethod
is not null && !getterMethod.IsEffectivelyReadOnly)
331
return !property.IsIndexer && !property.IsOverride && property.
GetMethod
is not null;
Symbols\TypeSymbol.cs (3)
1424
interfaceAccessor1 = interfaceProperty.
GetMethod
;
1932
var implementingGetMethod = implementedProperty.
GetMethod
.IsImplementable() ?
1942
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 (63)
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)
1361
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Handle));
1362
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Signature.ReturnParam.Handle));
1367
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Handle));
1368
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Signature.ReturnParam.Handle));
1371
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Handle));
1372
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Signature.ReturnParam.Handle));
1377
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Handle));
1378
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Signature.ReturnParam.Handle));
1383
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Handle));
1384
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Signature.ReturnParam.Handle));
1441
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Handle));
1442
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Signature.ReturnParam.Handle));
1445
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Handle));
1446
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Signature.ReturnParam.Handle));
1449
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Handle));
1450
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Signature.ReturnParam.Handle));
1453
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Handle));
1454
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Signature.ReturnParam.Handle));
1499
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Handle));
1500
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
GetMethod
).Signature.ReturnParam.Handle));
1503
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Handle));
1504
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.
GetMethod
).Signature.ReturnParam.Handle));
1507
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Handle));
1508
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
GetMethod
).Signature.ReturnParam.Handle));
1513
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Handle));
1514
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
GetMethod
).Signature.ReturnParam.Handle));
1519
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Handle));
1520
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
GetMethod
).Signature.ReturnParam.Handle));
1574
verifyReadOnly(s1.GetProperty("P1").
GetMethod
, true, RefKind.RefReadOnly);
1577
verifyReadOnly(s1.GetProperty("P2").
GetMethod
, true, RefKind.RefReadOnly);
1579
verifyReadOnly(s1.GetProperty("P3").
GetMethod
, true, RefKind.RefReadOnly);
1582
verifyReadOnly(s1.GetProperty("P4").
GetMethod
, false, RefKind.Ref);
1585
verifyReadOnly(s1.GetProperty("P5").
GetMethod
, false, null);
1595
verifyReadOnly(s2.GetProperty("P1").
GetMethod
, true, RefKind.RefReadOnly);
1596
verifyReadOnly(s2.GetProperty("P2").
GetMethod
, true, RefKind.RefReadOnly);
1599
verifyReadOnly(s2.GetProperty("P4").
GetMethod
, false, null);
2582
Assert.Equal(isReadOnly, type.GetProperty("P").
GetMethod
.IsDeclaredReadOnly);
2583
Assert.Equal(isReadOnly, type.GetProperty("P").
GetMethod
.IsEffectivelyReadOnly);
CodeGen\CodeGenTupleTest.cs (6)
13262
Assert.True(m10I1P1.
GetMethod
.IsExplicitInterfaceImplementation);
13263
Assert.Equal("System.Int32 I1.P1.get", m10I1P1.
GetMethod
.ExplicitInterfaceImplementations.Single().ToTestDisplayString());
15831
Assert.True(m1P1Get.Equals(m1P1.
GetMethod
, TypeCompareKind.ConsiderEverything));
15861
Assert.True(m1thisGet.Equals(m1this.
GetMethod
, TypeCompareKind.ConsiderEverything));
23905
Assert.Equal("ref (System.Int32, System.Object) ConsoleApplication5.C2.Goo.get", m.
GetMethod
.ToTestDisplayString());
23909
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\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)
3904
? ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, r1), SemanticEdit.Create(SemanticEditKind.Insert, null, r1.
GetMethod
))
3941
SemanticEdit.Create(SemanticEditKind.Insert, null, q2.
GetMethod
),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (73)
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)
229
Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)p.
GetMethod
).Handle).Single().AttributeClass.Name);
234
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\ParamsCollectionTests.cs (2)
9010
if (prop.
GetMethod
is MethodSymbol getMethod)
9055
if (prop.
GetMethod
is MethodSymbol getMethod)
Semantics\RecordTests.cs (3)
12437
VerifyAccessor(property.
GetMethod
, getterName);
12537
verifyReturnType(property.
GetMethod
, CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Int32)));
12541
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)
12899
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
13051
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
13142
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16650
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16735
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16820
Assert.True(property.TypeWithAnnotations.Equals(property.
GetMethod
.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything));
30193
var getter = property.
GetMethod
;
30296
var getter = property.
GetMethod
;
47999
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)
11031
VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").
GetMethod
.Parameters[0], "scoped in System.Object o", RefKind.In, ScopedKind.ScopedRef);
25473
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)
2676
ValidateAccessor(p1.
GetMethod
);
2680
Assert.Null(p1.
GetMethod
);
2721
peModule.Module.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.
GetMethod
).Handle, out _, out _, out _, out rva);
2738
Assert.Same(p1.
GetMethod
, test1.FindImplementationForInterfaceMember(p1.
GetMethod
));
2757
var getP1 = p1.
GetMethod
;
2996
Assert.Null(p1.
GetMethod
);
3032
Assert.Null(p1.
GetMethod
);
3068
Assert.Null(p1.
GetMethod
);
3098
Assert.True(p1.
GetMethod
.IsAbstract);
3123
Assert.True(p1.
GetMethod
.IsAbstract);
3148
Assert.True(p1.
GetMethod
.IsVirtual);
3187
Assert.Null(p1.
GetMethod
);
3221
Assert.Null(p1.
GetMethod
);
3255
Assert.Null(p1.
GetMethod
);
3285
Assert.True(p1.
GetMethod
.IsAbstract);
3310
Assert.True(p1.
GetMethod
.IsAbstract);
3331
Assert.True(p1.
GetMethod
.IsVirtual);
3406
var getP1 = p1.
GetMethod
;
3476
var getP1 = p1.
GetMethod
;
3565
var getP1 = p1.
GetMethod
;
3631
var getP1 = p1.
GetMethod
;
3786
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
3787
Assert.Same(p2.
GetMethod
, derived.FindImplementationForInterfaceMember(p2.
GetMethod
));
3788
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
3789
Assert.Same(p4.
GetMethod
, derived.FindImplementationForInterfaceMember(p4.
GetMethod
));
3792
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
3793
Assert.Same(p8.
GetMethod
, derived.FindImplementationForInterfaceMember(p8.
GetMethod
));
4021
Assert.Equal("System.Int32 Test.I1.P1.get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
4022
Assert.Equal("System.Int32 Test.I1.P2.get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
4023
Assert.Equal("System.Int32 Test.I1.P3.get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
4024
Assert.Equal("System.Int32 Test.I1.P4.get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
4027
Assert.Equal("System.Int32 Test.I1.P7.get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
4028
Assert.Equal("System.Int32 Test.I1.P8.get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
4173
Assert.Equal("System.Int32 Test.P1.get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
4174
Assert.Equal("System.Int32 Test.P2.get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
4175
Assert.Equal("System.Int32 Test.P3.get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
4176
Assert.Equal("System.Int32 Test.P4.get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
4179
Assert.Equal("System.Int32 Test.P7.get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
4180
Assert.Equal("System.Int32 Test.P8.get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
4362
Assert.True(p1.
GetMethod
.IsVirtual);
4363
Assert.True(p3.
GetMethod
.IsVirtual);
4365
Assert.True(p7.
GetMethod
.IsVirtual);
4368
Assert.True(p1.
GetMethod
.IsMetadataVirtual());
4369
Assert.True(p3.
GetMethod
.IsMetadataVirtual());
4371
Assert.True(p7.
GetMethod
.IsMetadataVirtual());
4374
Assert.False(p1.
GetMethod
.IsAbstract);
4375
Assert.False(p3.
GetMethod
.IsAbstract);
4377
Assert.False(p7.
GetMethod
.IsAbstract);
4380
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
4381
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
4383
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
4519
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
GetMethod
));
4520
Assert.Null(test2.FindImplementationForInterfaceMember(p3.
GetMethod
));
4522
Assert.Null(test2.FindImplementationForInterfaceMember(p7.
GetMethod
));
4927
Assert.True(p1.
GetMethod
.IsStatic);
4928
Assert.True(p3.
GetMethod
.IsStatic);
4930
Assert.True(p7.
GetMethod
.IsStatic);
4933
Assert.False(p1.
GetMethod
.IsVirtual);
4934
Assert.False(p3.
GetMethod
.IsVirtual);
4936
Assert.False(p7.
GetMethod
.IsVirtual);
4939
Assert.False(p1.
GetMethod
.IsMetadataVirtual());
4940
Assert.False(p3.
GetMethod
.IsMetadataVirtual());
4942
Assert.False(p7.
GetMethod
.IsMetadataVirtual());
4945
Assert.False(p1.
GetMethod
.IsAbstract);
4946
Assert.False(p3.
GetMethod
.IsAbstract);
4948
Assert.False(p7.
GetMethod
.IsAbstract);
4951
Assert.Null(derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
4952
Assert.Null(derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
4954
Assert.Null(derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
5135
Assert.Null(p1.
GetMethod
);
5163
Assert.True(p1.
GetMethod
.IsAbstract);
5200
Assert.Null(p1.
GetMethod
);
5228
Assert.True(p1.
GetMethod
.IsAbstract);
5269
var getP1 = p1.
GetMethod
;
5322
var getP1 = p1.
GetMethod
;
5449
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
5450
Assert.Same(p2.
GetMethod
, derived.FindImplementationForInterfaceMember(p2.
GetMethod
));
5451
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
5452
Assert.Same(p4.
GetMethod
, derived.FindImplementationForInterfaceMember(p4.
GetMethod
));
5455
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
5456
Assert.Same(p8.
GetMethod
, derived.FindImplementationForInterfaceMember(p8.
GetMethod
));
5636
Assert.Equal("System.Int32 Test.I1.get_Item(System.SByte i)", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
5637
Assert.Equal("System.Int32 Test.I1.get_Item(System.Byte i)", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
5638
Assert.Equal("System.Int32 Test.I1.get_Item(System.Int16 i)", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
5639
Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt16 i)", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
5642
Assert.Equal("System.Int32 Test.I1.get_Item(System.Int64 i)", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
5643
Assert.Equal("System.Int32 Test.I1.get_Item(System.UInt64 i)", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
5649
Assert.Equal("System.Int32 Test.I1.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
5650
Assert.Equal("System.Int32 Test.I1.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
5651
Assert.Equal("System.Int32 Test.I1.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
5652
Assert.Equal("System.Int32 Test.I1.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
5655
Assert.Equal("System.Int32 Test.I1.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
5656
Assert.Equal("System.Int32 Test.I1.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
5777
Assert.Equal("System.Int32 Test.this[System.SByte i].get", derived.FindImplementationForInterfaceMember(p1.
GetMethod
).ToTestDisplayString());
5778
Assert.Equal("System.Int32 Test.this[System.Byte i].get", derived.FindImplementationForInterfaceMember(p2.
GetMethod
).ToTestDisplayString());
5779
Assert.Equal("System.Int32 Test.this[System.Int16 i].get", derived.FindImplementationForInterfaceMember(p3.
GetMethod
).ToTestDisplayString());
5780
Assert.Equal("System.Int32 Test.this[System.UInt16 i].get", derived.FindImplementationForInterfaceMember(p4.
GetMethod
).ToTestDisplayString());
5783
Assert.Equal("System.Int32 Test.this[System.Int64 i].get", derived.FindImplementationForInterfaceMember(p7.
GetMethod
).ToTestDisplayString());
5784
Assert.Equal("System.Int32 Test.this[System.UInt64 i].get", derived.FindImplementationForInterfaceMember(p8.
GetMethod
).ToTestDisplayString());
5919
Assert.True(p1.
GetMethod
.IsVirtual);
5920
Assert.True(p3.
GetMethod
.IsVirtual);
5922
Assert.True(p7.
GetMethod
.IsVirtual);
5925
Assert.True(p1.
GetMethod
.IsMetadataVirtual());
5926
Assert.True(p3.
GetMethod
.IsMetadataVirtual());
5928
Assert.True(p7.
GetMethod
.IsMetadataVirtual());
5931
Assert.False(p1.
GetMethod
.IsAbstract);
5932
Assert.False(p3.
GetMethod
.IsAbstract);
5934
Assert.False(p7.
GetMethod
.IsAbstract);
5937
Assert.Same(p1.
GetMethod
, derived.FindImplementationForInterfaceMember(p1.
GetMethod
));
5938
Assert.Same(p3.
GetMethod
, derived.FindImplementationForInterfaceMember(p3.
GetMethod
));
5940
Assert.Same(p7.
GetMethod
, derived.FindImplementationForInterfaceMember(p7.
GetMethod
));
6061
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
GetMethod
));
6062
Assert.Null(test2.FindImplementationForInterfaceMember(p3.
GetMethod
));
6064
Assert.Null(test2.FindImplementationForInterfaceMember(p7.
GetMethod
));
13138
ValidateP01Accessor(p01.
GetMethod
);
13154
var p02get = p02.
GetMethod
;
13196
var p04get = p04.
GetMethod
;
13238
var p06get = p06.
GetMethod
;
13280
var p08get = p08.
GetMethod
;
13322
var p10get = p10.
GetMethod
;
13352
ValidateP11Accessor(p11.
GetMethod
);
13377
ValidateP12Accessor(p12.
GetMethod
);
13402
ValidateP13Accessor(p13.
GetMethod
, Accessibility.Public);
13427
ValidateP14Accessor(p14.
GetMethod
, Accessibility.ProtectedOrInternal);
13452
ValidateP15Accessor(p15.
GetMethod
, Accessibility.Public);
13477
ValidateP16Accessor(p16.
GetMethod
, Accessibility.Private);
13493
var p17get = p17.
GetMethod
;
13514
var p18get = p18.
GetMethod
;
13544
ValidateP13Accessor(p19.
GetMethod
, Accessibility.Public);
13928
var p1get = p1.
GetMethod
;
14031
ValidateAccessor(p1.
GetMethod
, test1P1.
GetMethod
);
14104
ValidateAccessor(p1.
GetMethod
);
14311
Assert.Null(p1.
GetMethod
);
14318
ValidateAccessor(p1.
GetMethod
);
14321
ValidateAccessor(p1.
GetMethod
);
14407
var p1get = p1.
GetMethod
;
14453
var p3get = p3.
GetMethod
;
14660
Assert.Null(p1.
GetMethod
);
14667
ValidateAccessor(p1.
GetMethod
);
14670
ValidateAccessor(p1.
GetMethod
);
14749
var p1get = p1.
GetMethod
;
14772
var p2get = p2.
GetMethod
;
14805
ValidateP3Accessor(p3.
GetMethod
);
14822
var p4get = p4.
GetMethod
;
14952
var p1get = p1.
GetMethod
;
15012
var p1get = p1.
GetMethod
;
15019
Assert.Same(test1P1.
GetMethod
, test1.FindImplementationForInterfaceMember(p1get));
15053
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
GetMethod
));
15193
var p1get = p1.
GetMethod
;
15198
Assert.Same(test1P1.
GetMethod
, test1.FindImplementationForInterfaceMember(p1get));
15202
Assert.True(test1P1.
GetMethod
.IsMetadataVirtual());
16026
Assert.Null(test1.FindImplementationForInterfaceMember(p1.
GetMethod
));
16212
Assert.Null(p1.
GetMethod
);
16219
ValidateAccessor(p1.
GetMethod
);
16222
ValidateAccessor(p1.
GetMethod
);
16327
var p1get = p1.
GetMethod
;
16353
var p2get = p2.
GetMethod
;
16619
Assert.Null(p2.
GetMethod
);
16627
ValidateAccessor(p2.
GetMethod
, test1P2.
GetMethod
);
16630
ValidateAccessor(p2.
GetMethod
, test1P2.
GetMethod
);
16793
var p1get = p1.
GetMethod
;
16815
Assert.Same(test2P1.
GetMethod
, test2.FindImplementationForInterfaceMember(p1get));
16859
ValidateP3Accessor(p3.
GetMethod
);
16878
var p4get = p4.
GetMethod
;
17036
var p1get = p1.
GetMethod
;
17058
Assert.Same(test2P1.
GetMethod
, test2.FindImplementationForInterfaceMember(p1get));
17062
var p2get = p2.
GetMethod
;
17084
Assert.Same(test2P2.
GetMethod
, test2.FindImplementationForInterfaceMember(p2get));
17099
ValidateP3Accessor(p3.
GetMethod
, p3.IsIndexer ? test2P3.
GetMethod
: null);
17128
ValidateP4Accessor(p4.
GetMethod
);
17146
var p5get = p5.
GetMethod
;
17297
ValidateP1Accessor(p1.
GetMethod
, test2P1.
GetMethod
);
17316
var p2get = p2.
GetMethod
;
17338
Assert.Same(test2P2.
GetMethod
, test2.FindImplementationForInterfaceMember(p2get));
17353
ValidateP3Accessor(p3.
GetMethod
, p3.IsIndexer ? test2P3.
GetMethod
: null);
17383
ValidateP4Accessor(p4.
GetMethod
, p4.IsIndexer ? test2P4.
GetMethod
: null);
17401
var p5get = p5.
GetMethod
;
17486
var p1get = p1.
GetMethod
;
17530
var p1get = p1.
GetMethod
;
17779
ValidateAccessor(p1.
GetMethod
, accessibility);
17784
ValidateAccessor(p1.
GetMethod
, Accessibility.Public);
18367
if (implementingProperty.
GetMethod
?.ExplicitInterfaceImplementations.Length > 0 ||
18378
ValidateMethod23(p1, p1.
GetMethod
, isAbstract, getAccess, test1, implementingProperty?.
GetMethod
);
19867
var p1get = p1.
GetMethod
;
19911
var p1get = p1.
GetMethod
;
20543
validateAccessor(p1.
GetMethod
, tuple.getAccess);
21615
ValidateP01Accessor(p01.
GetMethod
);
21631
var p02get = p02.
GetMethod
;
21673
var p04get = p04.
GetMethod
;
21715
var p06get = p06.
GetMethod
;
21757
var p08get = p08.
GetMethod
;
21799
var p10get = p10.
GetMethod
;
21829
ValidateP11Accessor(p11.
GetMethod
);
21854
ValidateP12Accessor(p12.
GetMethod
);
21879
ValidateP13Accessor(p13.
GetMethod
, Accessibility.Public);
21904
ValidateP14Accessor(p14.
GetMethod
, Accessibility.ProtectedOrInternal);
21929
ValidateP15Accessor(p15.
GetMethod
, Accessibility.Public);
21954
ValidateP16Accessor(p16.
GetMethod
, Accessibility.Private);
21970
var p17get = p17.
GetMethod
;
21991
var p18get = p18.
GetMethod
;
22021
ValidateP13Accessor(p19.
GetMethod
, Accessibility.Public);
23405
Assert.Null(test1.FindImplementationForInterfaceMember(p1.
GetMethod
));
37095
ValidateAccessor(expected?.
GetMethod
, interfaceProperty.
GetMethod
);
37114
ValidateAccessor(expected?.
GetMethod
, interfaceProperty.
GetMethod
);
37140
ValidateAccessor(m1.
GetMethod
, isAbstract, isStatic);
38032
ValidateAccessor(m1.
GetMethod
);
52533
if (i1p1.
GetMethod
is object)
52535
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
52536
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
52537
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
52539
else if (i2p1.
GetMethod
is object)
52541
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
52567
if (reabstracting.
GetMethod
is object)
52569
ValidateReabstraction(reabstracting.
GetMethod
, isStatic);
52732
if (i1p1.
GetMethod
is object)
52734
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
52735
Assert.Same(test12p1.
GetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
52887
if (i1p1.
GetMethod
is object)
52889
Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
52890
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53059
if (i1p1.
GetMethod
is object)
53061
Assert.Same(i3p1.
GetMethod
, i3.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53062
Assert.Same(i3p1.
GetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53222
if (i1p1.
GetMethod
is object)
53224
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53387
if (i1p1.
GetMethod
is object)
53389
Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53390
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53528
if (i1p1.
GetMethod
is object)
53530
Assert.Same(i4p1.
GetMethod
, i4.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53531
Assert.Same(i4p1.
GetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53615
if (i1p1.
GetMethod
is object)
53617
if (i2p1.
GetMethod
is object)
53619
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
53622
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53623
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53625
else if (i2p1.
GetMethod
is object)
53627
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
53749
var i2p1Get = i2p1.
GetMethod
;
53788
if (i1p1.
GetMethod
is object)
53790
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
53791
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53792
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53794
else if (i2p1.
GetMethod
is object)
53796
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
53888
var c2p1Get = c2p1.
GetMethod
;
53907
if (i1p1.
GetMethod
is object)
53909
Assert.Same(i1p1.
GetMethod
, c2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
53910
Assert.Same(c2p1Get, c2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
53912
else if (c2p1.
GetMethod
is object)
53914
Assert.Empty(c2p1.
GetMethod
.ExplicitInterfaceImplementations);
54223
if (i1p1.
GetMethod
is object)
54225
Assert.Same(i1p1.
GetMethod
, i2p1.
GetMethod
.ExplicitInterfaceImplementations.Single());
54226
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54227
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
GetMethod
));
54229
else if (i2p1.
GetMethod
is object)
54231
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
54391
Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
).ToTestDisplayString());
54464
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
54564
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
54635
Assert.Equal("System.Char I2.I1.get_F1()", test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
).ToTestDisplayString());
54703
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
54797
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
54891
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
54979
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
GetMethod
));
57047
if (i2p1.
GetMethod
is object)
57049
Assert.Empty(i2p1.
GetMethod
.ExplicitInterfaceImplementations);
63160
Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
63161
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63171
Assert.Same(c1i1P1get, test1.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
63172
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63182
Assert.Same(c1i1P1get, test4.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
63183
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63193
Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
63194
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63354
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63358
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63362
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63366
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63520
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63524
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63528
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63532
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63694
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63698
Assert.Same(c1i1P2get, test1.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63702
Assert.Same(c1i1P2get, test4.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
63706
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64095
Assert.Same(i2i1P1get, test2.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64096
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64106
Assert.Same(i2i1P1get, test3.FindImplementationForInterfaceMember(i1P1.
GetMethod
));
64107
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64225
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64229
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64341
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64345
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64461
Assert.Same(i2i1P2get, test2.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64465
Assert.Same(i2i1P2get, test3.FindImplementationForInterfaceMember(i1P2.
GetMethod
));
64539
Assert.Null(c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
64619
Assert.Null(c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
64694
Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
64773
Assert.Same(c1.GetMember("get_P1"), c2.FindImplementationForInterfaceMember(p1.
GetMethod
));
67334
Assert.Empty(m.
GetMethod
.ExplicitInterfaceImplementations);
67403
Assert.Same(m2.
GetMethod
, m1.
GetMethod
.ExplicitInterfaceImplementations.Single());
68014
Assert.True(p.
GetMethod
.IsMetadataVirtual());
68015
Assert.True(p.
GetMethod
.IsMetadataFinal);
68078
Assert.True(p.
GetMethod
.IsMetadataVirtual());
68079
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)
702
Assert.True(prop.PartialImplementationPart!.
GetMethod
!.GetPublicSymbol().IsExtern);
712
Assert.False(prop.
GetMethod
!.GetPublicSymbol().IsExtern);
778
verifyAccessor(prop.
GetMethod
!);
785
verifyAccessor(implPart.
GetMethod
!);
937
verifyAccessor(propDefinition.GetMethod!, propImplementation.
GetMethod
!);
1012
var implementationAccessor = propImplementation.
GetMethod
!;
1095
Assert.Null(propImplementation.
GetMethod
);
2680
validateAccessor(p.
GetMethod
);
2820
validateAccessor(p.
GetMethod
);
3934
verify(indexer.PartialImplementationPart!.
GetMethod
!.Parameters.Single());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
223
MethodSymbol testMethod = testProperty.
GetMethod
;
Symbols\Retargeting\RetargetingTests.cs (2)
1257
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
;
23167
Assert.Same(i6m.
GetMethod
, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).
GetMethod
);
23258
Assert.Same(i6m.
GetMethod
, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).
GetMethod
);
23471
var m01Get = m01.
GetMethod
;
23486
var cM01Get = cM01.
GetMethod
;
23566
var m01Get = m01.
GetMethod
;
23582
var cM01Get = cM01.
GetMethod
;
23657
var m01Get = m01.
GetMethod
;
23672
var cM01Get = cM01.
GetMethod
;
23769
Assert.Same(cM01.
GetMethod
, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
23773
Assert.Same(m01.
GetMethod
, cM01.
GetMethod
.ExplicitInterfaceImplementations.Single());
23925
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
23928
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
23933
Assert.Same(c1M01.
GetMethod
, c2.FindImplementationForInterfaceMember(m01.
GetMethod
));
23938
Assert.Same(c1M01.
GetMethod
, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
23943
Assert.Same(c1M01.
GetMethod
, c4.FindImplementationForInterfaceMember(m01.
GetMethod
));
23950
Assert.Same(c2M01.
GetMethod
, c5.FindImplementationForInterfaceMember(m01.
GetMethod
));
24025
Assert.Same(m01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24026
Assert.Same(m01.
GetMethod
, i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24068
Assert.Same(c1m01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24069
Assert.Same(m01.
GetMethod
, i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24105
Assert.Same(c1m01.
GetMethod
, c.FindImplementationForInterfaceMember(m01.
GetMethod
));
24159
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24160
Assert.Null(i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24191
var m01Get = m01.
GetMethod
;
24205
var cM01Get = cM01.
GetMethod
;
24250
var m01Get = m01.
GetMethod
;
24263
var cM01Get = cM01.
GetMethod
;
24329
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24332
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24354
var m01Get = m01.
GetMethod
;
24367
var cM01Get = cM01.
GetMethod
;
24422
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24455
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24511
Assert.Same(m01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24512
Assert.Same(m01.
GetMethod
, i1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24543
var m01Get = m01.
GetMethod
;
24570
Assert.Null(cM01.
GetMethod
);
24628
var cM01Get = cM01.
GetMethod
;
24640
var m01Get = m01.
GetMethod
;
24682
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24684
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24732
var m01Get = m01.
GetMethod
;
24774
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24807
Assert.Same(c1M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24810
Assert.Same(m01.
GetMethod
, c1M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24890
Assert.Same(i2M01.
GetMethod
, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
24891
Assert.Same(i2M01.
GetMethod
, i2.FindImplementationForInterfaceMember(m01.
GetMethod
));
24896
Assert.Same(m01.
GetMethod
, i2M01.
GetMethod
.ExplicitInterfaceImplementations.Single());
24936
var c2M01Get = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.
GetMethod
);
24959
Assert.Same(m01.
GetMethod
, c2M01Get.ExplicitInterfaceImplementations.Single());
24971
var c1M01Get = c1M01.
GetMethod
;
25013
Assert.Same(c2M01.
GetMethod
, c2M01Get);
25125
var c1M01Get = c1M01.
GetMethod
;
25142
Assert.Same(c1M01Get, c1.FindImplementationForInterfaceMember(m01.
GetMethod
));
25156
Assert.Same(m01.
GetMethod
, c1M01Get.ExplicitInterfaceImplementations.Single());
25179
var c2M01Get = c2M01.
GetMethod
;
25197
Assert.Same(m01.
GetMethod
, c2M01Get.ExplicitInterfaceImplementations.Single());
25198
Assert.Same(c2M01Get, c2.FindImplementationForInterfaceMember(m01.
GetMethod
));
25219
var c3M01Get = c3M01.
GetMethod
;
25237
Assert.Same(m01.
GetMethod
, c3M01Get.ExplicitInterfaceImplementations.Single());
25238
Assert.Same(c3M01Get, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
25336
var c1M01Get = c1M01.
GetMethod
;
25358
var c2M01Get = c3.FindImplementationForInterfaceMember(m01.
GetMethod
);
25370
Assert.Same(c1M01.
GetMethod
, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
25379
Assert.Same(c2M02.
GetMethod
, c3.FindImplementationForInterfaceMember(m02.
GetMethod
));
25458
var c2M01Get = c2M01.
GetMethod
;
25489
var c3M01Get = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.
GetMethod
);
25491
Assert.Same(m01.
GetMethod
, c3M01Get.ExplicitInterfaceImplementations.Single());
25500
Assert.Same(c2M01Get, c3.FindImplementationForInterfaceMember(m01.
GetMethod
));
Symbols\SymbolErrorTests.cs (2)
10310
Assert.False(classAProp1.
GetMethod
.IsVirtual); //NB: non-virtual since private
10363
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());