10 overrides of SetMethod
Microsoft.CodeAnalysis.CSharp (10)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
76
public override MethodSymbol
SetMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
146
public override MethodSymbol
SetMethod
Symbols\ErrorPropertySymbol.cs (1)
60
public override MethodSymbol
SetMethod
{ get { return null; } }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
700
public override MethodSymbol
SetMethod
Symbols\NativeIntegerTypeSymbol.cs (1)
510
public override MethodSymbol?
SetMethod
{ get; }
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
133
public override MethodSymbol
SetMethod
Symbols\SignatureOnlyPropertySymbol.cs (1)
100
public override MethodSymbol
SetMethod
{ get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourcePropertySymbolBase.cs (1)
653
public sealed override MethodSymbol?
SetMethod
Symbols\SubstitutedPropertySymbol.cs (1)
95
public override MethodSymbol
SetMethod
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
45
public override MethodSymbol?
SetMethod
{ get; }
662 references to SetMethod
Microsoft.CodeAnalysis.CSharp (57)
Binder\Binder_Attributes.cs (1)
640
var setMethod = propertySymbol.
SetMethod
;
Binder\Binder_Invocation.cs (1)
1381
var method = property.GetMethod ?? property.
SetMethod
;
Binder\Binder_Lookup.cs (1)
1623
method2 = property.
SetMethod
;
Binder\Binder_Statements.cs (2)
1610
case BoundPropertyAccess { PropertySymbol.
SetMethod
: { } propSet, ReceiverOpt: var receiver } when propSet.GetIsNewExtensionMember():
1614
case BoundIndexerAccess { Indexer.
SetMethod
: { } indexerSet } indexer when indexerSet.GetIsNewExtensionMember():
Binder\BinderFactory.BinderFactoryVisitor.cs (3)
1290
if ((object)property.
SetMethod
!= null)
1292
Debug.Assert(property.
SetMethod
.ParameterCount > 0);
1293
parameters = parameters.Add(property.
SetMethod
.Parameters.Last());
Emitter\Model\PropertySymbolAdapter.cs (2)
41
var setMethod = AdaptedPropertySymbol.
SetMethod
?.GetCciAdapter();
127
MethodSymbol setMethod = AdaptedPropertySymbol.
SetMethod
;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
537
var setMethod = property.AdaptedPropertySymbol.
SetMethod
?.GetCciAdapter();
FlowAnalysis\AbstractFlowPass.cs (1)
3722
property.GetOwnOrInheritedGetMethod() ?? property.
SetMethod
;
FlowAnalysis\NullableWalker.cs (3)
674
return property.
SetMethod
?.NotNullMembers ?? property.NotNullMembers;
1017
foreach (var notNullMemberName in (property.
SetMethod
?.NotNullMembers ?? property.NotNullMembers))
11385
ApplyMemberPostConditions(node.ReceiverOpt, property.
SetMethod
);
Symbols\Attributes\AttributeData.cs (2)
561
(object)property.
SetMethod
!= null && property.
SetMethod
.DeclaredAccessibility == Accessibility.Public)
Symbols\MemberSymbolExtensions.cs (1)
370
return isImplementableAndNotPublic(propertySymbol.GetMethod) || isImplementableAndNotPublic(propertySymbol.
SetMethod
);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
500
MethodSymbol setMethod = curr.
SetMethod
;
811
if (!prop.
SetMethod
.IsImplementable() || propertiesWithImplementedSetters.Contains(prop))
Symbols\NativeIntegerTypeSymbol.cs (1)
496
SetMethod = getAccessor(container, this, underlyingProperty.
SetMethod
);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
260
MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.GetMethod : propertyHiddenByProperty.
SetMethod
;
Symbols\PropertySymbol.cs (2)
170
return (object)property.
SetMethod
== null;
257
MethodSymbol accessor = GetMethod ??
SetMethod
;
Symbols\PropertySymbolExtensions.cs (1)
46
MethodSymbol setMethod = property.
SetMethod
;
Symbols\PublicModel\PropertySymbol.cs (1)
58
get { return _underlying.
SetMethod
.GetPublicSymbol(); }
Symbols\Retargeting\RetargetingPropertySymbol.cs (2)
137
return (object)_underlyingProperty.
SetMethod
== null
139
: this.RetargetingTranslator.Retarget(_underlyingProperty.
SetMethod
);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
319
checkAccessorIsAccessibleIfImplementable(propertySymbol.
SetMethod
);
Symbols\Source\ModifierUtils.cs (2)
522
case PropertySymbol {
SetMethod
: { } method } when !method.IsAsRestrictive(symbol.ContainingType, ref useSiteInfo):
527
case PropertySymbol {
SetMethod
: null }:
Symbols\Source\SourceMemberContainerSymbol.cs (2)
4356
MethodSymbol accessor = getNotSet ? propertySymbol.GetMethod : propertySymbol.
SetMethod
;
4437
var locationFrom = (Symbol)(getNotSet ? propertySymbol.GetMethod : propertySymbol.
SetMethod
) ?? propertySymbol;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (10)
573
var setMethod = property.
SetMethod
;
822
else if (associatedProperty.
SetMethod
== overridingMember && (object)overriddenProperty.
SetMethod
== null)
1063
else if (overridingProperty.
SetMethod
is null ?
1072
if (overridingProperty.
SetMethod
is null &&
1110
if (overridingProperty.
SetMethod
is object)
1114
overridingProperty.
SetMethod
.GetFirstLocation(),
1116
overridingProperty.
SetMethod
,
1120
overridingProperty.
SetMethod
.IsInitOnly != ownOrInheritedOverriddenSetMethod.IsInitOnly)
1141
if (overridingProperty.
SetMethod
!= ownOrInheritedSetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedSetMethod, overridingType, ref useSiteInfo))
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
624
: explicitlyImplementedPropertyOpt.
SetMethod
;
696
: explicitlyImplementedPropertyOpt.
SetMethod
;
Symbols\Source\SourcePropertySymbolBase.cs (2)
915
(overriddenProperty.
SetMethod
is { } && SetMethod is null))
1014
CheckExplicitImplementationAccessor(SetMethod, explicitlyImplementedProperty.
SetMethod
, explicitlyImplementedProperty, diagnostics);
Symbols\SubstitutedPropertySymbol.cs (1)
99
MethodSymbol originalSetMethod = OriginalDefinition.
SetMethod
;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
115
Debug.Assert(property is { GetMethod: not null,
SetMethod
: null });
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (3)
21
Debug.Assert(setAccessorBody is null == interfaceProperty.
SetMethod
is null);
28
SetMethod = interfaceProperty.
SetMethod
is null ? null : new SynthesizedReadOnlyListMethod(containingType, interfaceProperty.
SetMethod
, setAccessorBody!);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
733
builder.AddIfNotNull(property.
SetMethod
);
Symbols\TypeSymbol.cs (3)
1425
interfaceAccessor2 = interfaceProperty.
SetMethod
;
1935
var implementingSetMethod = implementedProperty.
SetMethod
.IsImplementable() ?
1952
implementedProperty.
SetMethod
,
Symbols\VarianceSafety.cs (1)
196
bool hasSetter = (object)property.
SetMethod
!= null;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (41)
BreakingChanges.cs (2)
107
Assert.Equal(Accessibility.ProtectedOrInternal, baseProperty1.
SetMethod
.DeclaredAccessibility);
111
Assert.Equal(Accessibility.Public, baseProperty2.
SetMethod
.DeclaredAccessibility);
CodeGen\CodeGenFunctionPointersTests.cs (1)
800
verifier(property.
SetMethod
.GetParameterType(0));
CodeGen\CodeGenReadonlyStructTests.cs (20)
1363
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
SetMethod
).Handle));
1364
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.
SetMethod
).Signature.ReturnParam.Handle));
1373
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
SetMethod
).Handle));
1374
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
SetMethod
).Signature.ReturnParam.Handle));
1379
Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
SetMethod
).Handle));
1380
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
SetMethod
).Signature.ReturnParam.Handle));
1385
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
SetMethod
).Handle));
1386
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
SetMethod
).Signature.ReturnParam.Handle));
1509
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
SetMethod
).Handle));
1510
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.
SetMethod
).Signature.ReturnParam.Handle));
1515
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
SetMethod
).Handle));
1516
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.
SetMethod
).Signature.ReturnParam.Handle));
1521
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
SetMethod
).Handle));
1522
Assert.False(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.
SetMethod
).Signature.ReturnParam.Handle));
1575
verifyReadOnly(s1.GetProperty("P1").
SetMethod
, false, RefKind.Ref);
1580
verifyReadOnly(s1.GetProperty("P3").
SetMethod
, false, RefKind.Ref);
1583
verifyReadOnly(s1.GetProperty("P4").
SetMethod
, true, RefKind.RefReadOnly);
1586
verifyReadOnly(s1.GetProperty("P5").
SetMethod
, false, null);
1597
verifyReadOnly(s2.GetProperty("P3").
SetMethod
, true, RefKind.RefReadOnly);
1600
verifyReadOnly(s2.GetProperty("P4").
SetMethod
, false, null);
CodeGen\CodeGenTupleTest.cs (4)
13264
Assert.True(m10I1P1.
SetMethod
.IsExplicitInterfaceImplementation);
13265
Assert.Equal("void I1.P1.set", m10I1P1.
SetMethod
.ExplicitInterfaceImplementations.Single().ToTestDisplayString());
15832
Assert.True(m1P1Set.Equals(m1P1.
SetMethod
, TypeCompareKind.ConsiderEverything));
15862
Assert.Null(m1this.
SetMethod
);
CodeGen\IndexerTests.cs (2)
166
var setMethod = indexer.
SetMethod
;
275
var setMethod = indexer.
SetMethod
;
Emit\EmitMetadataTests.cs (12)
815
Assert.NotNull(property.
SetMethod
);
823
Assert.NotNull(property.
SetMethod
);
1090
Assert.False(propertyP.
SetMethod
.IsVirtual);
1091
Assert.False(propertyP.
SetMethod
.IsOverride);
1096
Assert.Null(propertyP.
SetMethod
);
1104
Assert.True(propertyQ.
SetMethod
.IsVirtual);
1105
Assert.False(propertyQ.
SetMethod
.IsOverride);
1123
Assert.False(propertyQ.
SetMethod
.IsVirtual);
1124
Assert.True(propertyQ.
SetMethod
.IsOverride);
1139
Assert.Same(overriddenAccessor, propertyQ.
SetMethod
.OverriddenMethod);
1172
CheckPropertyAccessorAccessibility(property, propertyAccessibility, property.
SetMethod
, setterAccessibility);
1311
VerifyAutoPropertyAccessor(property, property.
SetMethod
);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
3942
SemanticEdit.Create(SemanticEditKind.Insert, null, q2.
SetMethod
))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (26)
Attributes\AttributeTests.cs (9)
1722
attrs = prop.
SetMethod
.GetAttributes();
1806
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.
SetMethod
.GetAttributes()));
1814
Assert.Null(prop2.
SetMethod
);
1822
Assert.Null(prop3.
SetMethod
);
1830
Assert.Null(prop4.
SetMethod
);
2466
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop1.
SetMethod
.GetAttributes()));
2476
AssertEx.SetEqual(propAttributesExpected, GetAttributeStrings(prop2.
SetMethod
.GetAttributes()));
3798
var setter = property.
SetMethod
;
4007
var setter = property.
SetMethod
;
Attributes\AttributeTests_Conditional.cs (2)
159
var propSetMethod = propP1.
SetMethod
;
174
propSetMethod = propP3.
SetMethod
;
Attributes\AttributeTests_Dynamic.cs (4)
407
ValidateDynamicAttribute(prop2.
SetMethod
.Parameters[0].GetAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags);
430
ValidateDynamicAttribute(indexer.
SetMethod
.GetReturnTypeAttributes(), expectedDynamicAttribute: false);
431
ValidateDynamicAttribute(indexer.
SetMethod
.Parameters[0].GetAttributes(), expectedDynamicAttribute: true);
432
ValidateDynamicAttribute(indexer.
SetMethod
.Parameters[1].GetAttributes(), expectedDynamicAttribute: true);
Attributes\AttributeTests_Synthesized.cs (2)
230
Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)p.
SetMethod
).Handle).Single().AttributeClass.Name);
235
Assert.Empty(peModule.GetCustomAttributesForToken(((PEMethodSymbol)q.
SetMethod
).Handle));
OverloadResolutionPriorityTests.cs (4)
1453
Assert.Equal(0, indexer.
SetMethod
.OverloadResolutionPriority);
1576
Assert.Equal(0, indexer.
SetMethod
.OverloadResolutionPriority);
1582
Assert.Equal(0, indexer.
SetMethod
.OverloadResolutionPriority);
1617
Assert.Equal(0, indexer.
SetMethod
.OverloadResolutionPriority);
Semantics\ParamsCollectionTests.cs (2)
9015
if (prop.
SetMethod
is MethodSymbol setMethod)
9060
if (prop.
SetMethod
is MethodSymbol setMethod)
Semantics\RecordTests.cs (3)
12438
VerifyAccessor(property.
SetMethod
, setterName);
12543
verifyReturnType(property.
SetMethod
,
12546
verifyParameterType(property.
SetMethod
,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (38)
Semantics\ArglistTests.cs (4)
1262
var setter = indexer.
SetMethod
;
1288
var setter = indexer.
SetMethod
;
1314
var setter = indexer.
SetMethod
;
1340
var setter = indexer.
SetMethod
;
Semantics\InitOnlyMemberTests.cs (22)
49
Assert.True(property.
SetMethod
.IsInitOnly);
415
Assert.False(property.
SetMethod
.IsInitOnly);
419
Assert.True(property2.
SetMethod
.IsInitOnly);
423
Assert.True(property3.
SetMethod
.IsInitOnly);
614
Assert.True(property.
SetMethod
.IsInitOnly);
645
Assert.True(property.
SetMethod
.IsInitOnly);
904
Assert.True(property.
SetMethod
.IsInitOnly);
1159
Assert.False(property.
SetMethod
.IsInitOnly);
1475
var setter = property.
SetMethod
;
1478
var setterAttributes = property.
SetMethod
.GetAttributes().Select(a => a.ToString());
1479
var modifier = property.
SetMethod
.ReturnTypeWithAnnotations.CustomModifiers.Single();
3285
Assert.False(property1.
SetMethod
.HasUseSiteError);
3286
Assert.False(property1.
SetMethod
.Parameters[0].Type.IsErrorType());
3290
Assert.False(property2.
SetMethod
.HasUseSiteError);
3291
Assert.False(property2.
SetMethod
.Parameters[0].Type.IsErrorType());
3377
Assert.False(property1.
SetMethod
.HasUseSiteError);
3378
Assert.False(property1.
SetMethod
.Parameters[0].Type.IsErrorType());
3383
Assert.False(property2.
SetMethod
.HasUseSiteError);
3384
Assert.False(property2.
SetMethod
.Parameters[0].Type.IsErrorType());
4205
var setter = (RetargetingMethodSymbol)property.
SetMethod
;
4383
Assert.True(((Symbols.PublicModel.PropertySymbol)i).GetSymbol<PropertySymbol>().
SetMethod
.IsDeclaredReadOnly);
4406
Assert.True(((Symbols.PublicModel.PropertySymbol)i).GetSymbol<PropertySymbol>().
SetMethod
.IsDeclaredReadOnly);
Semantics\NativeIntegerTests.cs (1)
1830
Assert.Null(property.
SetMethod
);
Semantics\NullableReferenceTypesTests.cs (10)
12900
Assert.True(property.TypeWithAnnotations.Equals(property.
SetMethod
.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
13052
Assert.True(property.TypeWithAnnotations.Equals(property.
SetMethod
.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
13143
Assert.True(property.TypeWithAnnotations.Equals(property.
SetMethod
.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16651
Assert.True(property.TypeWithAnnotations.Equals(property.
SetMethod
.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16736
Assert.True(property.TypeWithAnnotations.Equals(property.
SetMethod
.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
16821
Assert.True(property.TypeWithAnnotations.Equals(property.
SetMethod
.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
30215
var setter = property.
SetMethod
;
40981
var setter = property.
SetMethod
;
41042
var setter = property.
SetMethod
;
44662
var setter = property.
SetMethod
;
Semantics\RefFieldTests.cs (1)
11997
VerifyParameterSymbol(property.
SetMethod
.Parameters[0], expectedDisplayString, expectedRefKind, expectedScope);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (497)
DocumentationComments\ParameterTests.cs (2)
140
var parameter = property.
SetMethod
.Parameters.Single().ISymbol;
165
var parameter = indexer.
SetMethod
.Parameters.Last().ISymbol;
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (19)
47
var baseSetter = baseProperty.
SetMethod
;
52
var derivedSetter = derivedProperty.
SetMethod
;
106
var baseSetter = baseProperty.
SetMethod
;
111
Assert.Null(derived1Property.
SetMethod
);
116
var derived2Setter = derived2Property.
SetMethod
;
157
var baseSetter = baseProperty.
SetMethod
;
162
var derivedSetter = derivedProperty.
SetMethod
;
216
Assert.Null(derived1Property.
SetMethod
);
221
var derived2Setter = derived2Property.
SetMethod
;
424
var interfaceSetter = interfaceProperty.
SetMethod
;
429
var baseSetter = baseProperty.
SetMethod
;
571
var interfaceSetter = interfaceProperty.
SetMethod
;
576
var baseSetter = baseProperty.
SetMethod
;
581
Assert.Null(derivedProperty.
SetMethod
);
639
var interfaceSetter = interfaceProperty.
SetMethod
;
648
var derived2Setter = derived2Property.
SetMethod
;
699
var interface1Setter = interface1Property.
SetMethod
;
704
var interface2Setter = interface2Property.
SetMethod
;
712
var interface4Setter = interface4Property.
SetMethod
;
Symbols\CovariantReturnTests.cs (2)
320
if (property.
SetMethod
is MethodSymbol setMethod && overriddenProperty.
SetMethod
is MethodSymbol overriddenSetMethod)
Symbols\CSharpCompilerFeatureRequiredTests.cs (2)
174
Assert.False(onPropertyGetterProperty.
SetMethod
.HasUnsupportedMetadata);
181
Assert.True(onPropertySetterProperty.
SetMethod
.HasUnsupportedMetadata);
Symbols\CustomModifiersTests.cs (1)
1235
Assert.True(test.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.SequenceEqual(test.
SetMethod
.Parameters.First().TypeWithAnnotations.CustomModifiers));
Symbols\DefaultInterfaceImplementationTests.cs (284)
2685
ValidateAccessor(p1.
SetMethod
);
2689
Assert.Null(p1.
SetMethod
);
2727
peModule.Module.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.
SetMethod
).Handle, out _, out _, out _, out rva);
2743
Assert.Same(p1.
SetMethod
, test1.FindImplementationForInterfaceMember(p1.
SetMethod
));
2763
var setP1 = p1.
SetMethod
;
2997
Assert.Null(p1.
SetMethod
);
3033
Assert.Null(p1.
SetMethod
);
3069
Assert.Null(p1.
SetMethod
);
3099
Assert.True(p1.
SetMethod
.IsAbstract);
3124
Assert.True(p1.
SetMethod
.IsAbstract);
3149
Assert.True(p1.
SetMethod
.IsVirtual);
3188
Assert.Null(p1.
SetMethod
);
3222
Assert.Null(p1.
SetMethod
);
3256
Assert.Null(p1.
SetMethod
);
3286
Assert.True(p1.
SetMethod
.IsAbstract);
3311
Assert.True(p1.
SetMethod
.IsAbstract);
3332
Assert.True(p1.
SetMethod
.IsVirtual);
3407
var setP1 = p1.
SetMethod
;
3477
var setP1 = p1.
SetMethod
;
3566
var setP1 = p1.
SetMethod
;
3632
var setP1 = p1.
SetMethod
;
3790
Assert.Same(p5.
SetMethod
, derived.FindImplementationForInterfaceMember(p5.
SetMethod
));
3791
Assert.Same(p6.
SetMethod
, derived.FindImplementationForInterfaceMember(p6.
SetMethod
));
3794
Assert.Same(p7.
SetMethod
, derived.FindImplementationForInterfaceMember(p7.
SetMethod
));
3795
Assert.Same(p8.
SetMethod
, derived.FindImplementationForInterfaceMember(p8.
SetMethod
));
4025
Assert.Equal("void Test.I1.P5.set", derived.FindImplementationForInterfaceMember(p5.
SetMethod
).ToTestDisplayString());
4026
Assert.Equal("void Test.I1.P6.set", derived.FindImplementationForInterfaceMember(p6.
SetMethod
).ToTestDisplayString());
4029
Assert.Equal("void Test.I1.P7.set", derived.FindImplementationForInterfaceMember(p7.
SetMethod
).ToTestDisplayString());
4030
Assert.Equal("void Test.I1.P8.set", derived.FindImplementationForInterfaceMember(p8.
SetMethod
).ToTestDisplayString());
4177
Assert.Equal("void Test.P5.set", derived.FindImplementationForInterfaceMember(p5.
SetMethod
).ToTestDisplayString());
4178
Assert.Equal("void Test.P6.set", derived.FindImplementationForInterfaceMember(p6.
SetMethod
).ToTestDisplayString());
4181
Assert.Equal("void Test.P7.set", derived.FindImplementationForInterfaceMember(p7.
SetMethod
).ToTestDisplayString());
4182
Assert.Equal("void Test.P8.set", derived.FindImplementationForInterfaceMember(p8.
SetMethod
).ToTestDisplayString());
4364
Assert.True(p5.
SetMethod
.IsVirtual);
4366
Assert.True(p7.
SetMethod
.IsVirtual);
4370
Assert.True(p5.
SetMethod
.IsMetadataVirtual());
4372
Assert.True(p7.
SetMethod
.IsMetadataVirtual());
4376
Assert.False(p5.
SetMethod
.IsAbstract);
4378
Assert.False(p7.
SetMethod
.IsAbstract);
4382
Assert.Same(p5.
SetMethod
, derived.FindImplementationForInterfaceMember(p5.
SetMethod
));
4384
Assert.Same(p7.
SetMethod
, derived.FindImplementationForInterfaceMember(p7.
SetMethod
));
4521
Assert.Null(test2.FindImplementationForInterfaceMember(p5.
SetMethod
));
4523
Assert.Null(test2.FindImplementationForInterfaceMember(p7.
SetMethod
));
4929
Assert.True(p5.
SetMethod
.IsStatic);
4931
Assert.True(p7.
SetMethod
.IsStatic);
4935
Assert.False(p5.
SetMethod
.IsVirtual);
4937
Assert.False(p7.
SetMethod
.IsVirtual);
4941
Assert.False(p5.
SetMethod
.IsMetadataVirtual());
4943
Assert.False(p7.
SetMethod
.IsMetadataVirtual());
4947
Assert.False(p5.
SetMethod
.IsAbstract);
4949
Assert.False(p7.
SetMethod
.IsAbstract);
4953
Assert.Null(derived.FindImplementationForInterfaceMember(p5.
SetMethod
));
4955
Assert.Null(derived.FindImplementationForInterfaceMember(p7.
SetMethod
));
5136
Assert.Null(p1.
SetMethod
);
5164
Assert.True(p1.
SetMethod
.IsAbstract);
5201
Assert.Null(p1.
SetMethod
);
5229
Assert.True(p1.
SetMethod
.IsAbstract);
5270
var setP1 = p1.
SetMethod
;
5323
var setP1 = p1.
SetMethod
;
5453
Assert.Same(p5.
SetMethod
, derived.FindImplementationForInterfaceMember(p5.
SetMethod
));
5454
Assert.Same(p6.
SetMethod
, derived.FindImplementationForInterfaceMember(p6.
SetMethod
));
5457
Assert.Same(p7.
SetMethod
, derived.FindImplementationForInterfaceMember(p7.
SetMethod
));
5458
Assert.Same(p8.
SetMethod
, derived.FindImplementationForInterfaceMember(p8.
SetMethod
));
5640
Assert.Equal("void Test.I1.set_Item(System.Int32 i, System.Int32 value)", derived.FindImplementationForInterfaceMember(p5.
SetMethod
).ToTestDisplayString());
5641
Assert.Equal("void Test.I1.set_Item(System.UInt32 i, System.Int32 value)", derived.FindImplementationForInterfaceMember(p6.
SetMethod
).ToTestDisplayString());
5644
Assert.Equal("void Test.I1.set_Item(System.Int64 i, System.Int32 value)", derived.FindImplementationForInterfaceMember(p7.
SetMethod
).ToTestDisplayString());
5645
Assert.Equal("void Test.I1.set_Item(System.UInt64 i, System.Int32 value)", derived.FindImplementationForInterfaceMember(p8.
SetMethod
).ToTestDisplayString());
5653
Assert.Equal("void Test.I1.this[System.Int32 i].set", derived.FindImplementationForInterfaceMember(p5.
SetMethod
).ToTestDisplayString());
5654
Assert.Equal("void Test.I1.this[System.UInt32 i].set", derived.FindImplementationForInterfaceMember(p6.
SetMethod
).ToTestDisplayString());
5657
Assert.Equal("void Test.I1.this[System.Int64 i].set", derived.FindImplementationForInterfaceMember(p7.
SetMethod
).ToTestDisplayString());
5658
Assert.Equal("void Test.I1.this[System.UInt64 i].set", derived.FindImplementationForInterfaceMember(p8.
SetMethod
).ToTestDisplayString());
5781
Assert.Equal("void Test.this[System.Int32 i].set", derived.FindImplementationForInterfaceMember(p5.
SetMethod
).ToTestDisplayString());
5782
Assert.Equal("void Test.this[System.UInt32 i].set", derived.FindImplementationForInterfaceMember(p6.
SetMethod
).ToTestDisplayString());
5785
Assert.Equal("void Test.this[System.Int64 i].set", derived.FindImplementationForInterfaceMember(p7.
SetMethod
).ToTestDisplayString());
5786
Assert.Equal("void Test.this[System.UInt64 i].set", derived.FindImplementationForInterfaceMember(p8.
SetMethod
).ToTestDisplayString());
5921
Assert.True(p5.
SetMethod
.IsVirtual);
5923
Assert.True(p7.
SetMethod
.IsVirtual);
5927
Assert.True(p5.
SetMethod
.IsMetadataVirtual());
5929
Assert.True(p7.
SetMethod
.IsMetadataVirtual());
5933
Assert.False(p5.
SetMethod
.IsAbstract);
5935
Assert.False(p7.
SetMethod
.IsAbstract);
5939
Assert.Same(p5.
SetMethod
, derived.FindImplementationForInterfaceMember(p5.
SetMethod
));
5941
Assert.Same(p7.
SetMethod
, derived.FindImplementationForInterfaceMember(p7.
SetMethod
));
6063
Assert.Null(test2.FindImplementationForInterfaceMember(p5.
SetMethod
));
6065
Assert.Null(test2.FindImplementationForInterfaceMember(p7.
SetMethod
));
13139
ValidateP01Accessor(p01.
SetMethod
);
13175
var p03set = p03.
SetMethod
;
13217
var p05set = p05.
SetMethod
;
13259
var p07set = p07.
SetMethod
;
13301
var p09set = p09.
SetMethod
;
13353
ValidateP11Accessor(p11.
SetMethod
);
13378
ValidateP12Accessor(p12.
SetMethod
);
13403
ValidateP13Accessor(p13.
SetMethod
, Accessibility.Protected);
13428
ValidateP14Accessor(p14.
SetMethod
, Accessibility.Public);
13453
ValidateP15Accessor(p15.
SetMethod
, Accessibility.Internal);
13478
ValidateP16Accessor(p16.
SetMethod
, Accessibility.Public);
13545
ValidateP13Accessor(p19.
SetMethod
, Accessibility.ProtectedAndInternal);
14032
ValidateAccessor(p1.
SetMethod
, test1P1.
SetMethod
);
14105
ValidateAccessor(p1.
SetMethod
);
14312
ValidateAccessor(p1.
SetMethod
);
14317
Assert.Null(p1.
SetMethod
);
14322
ValidateAccessor(p1.
SetMethod
);
14430
var p2set = p2.
SetMethod
;
14661
ValidateAccessor(p1.
SetMethod
);
14666
Assert.Null(p1.
SetMethod
);
14671
ValidateAccessor(p1.
SetMethod
);
14806
ValidateP3Accessor(p3.
SetMethod
);
14953
var p1set = p1.
SetMethod
;
15013
var p1set = p1.
SetMethod
;
15020
Assert.Same(test1P1.
SetMethod
, test1.FindImplementationForInterfaceMember(p1set));
15054
Assert.Null(test2.FindImplementationForInterfaceMember(p1.
SetMethod
));
15194
var p1set = p1.
SetMethod
;
15199
Assert.Same(test1P1.
SetMethod
, test1.FindImplementationForInterfaceMember(p1set));
15203
Assert.True(test1P1.
SetMethod
.IsMetadataVirtual());
16027
Assert.Null(test1.FindImplementationForInterfaceMember(p1.
SetMethod
));
16213
ValidateAccessor(p1.
SetMethod
);
16218
Assert.Null(p1.
SetMethod
);
16223
ValidateAccessor(p1.
SetMethod
);
16379
var p3set = p3.
SetMethod
;
16620
ValidateAccessor(p2.
SetMethod
, test1P2.
SetMethod
);
16626
Assert.Null(p2.
SetMethod
);
16631
ValidateAccessor(p2.
SetMethod
, test1P2.
SetMethod
);
16819
var p2set = p2.
SetMethod
;
16841
Assert.Same(test2P2.
SetMethod
, test2.FindImplementationForInterfaceMember(p2set));
16860
ValidateP3Accessor(p3.
SetMethod
);
16903
var p5set = p5.
SetMethod
;
17100
ValidateP3Accessor(p3.
SetMethod
, p3.IsIndexer ? test2P3.
SetMethod
: null);
17129
ValidateP4Accessor(p4.
SetMethod
);
17298
ValidateP1Accessor(p1.
SetMethod
, test2P1.
SetMethod
);
17354
ValidateP3Accessor(p3.
SetMethod
, p3.IsIndexer ? test2P3.
SetMethod
: null);
17384
ValidateP4Accessor(p4.
SetMethod
, p4.IsIndexer ? test2P4.
SetMethod
: null);
17487
var p1set = p1.
SetMethod
;
17531
var p1set = p1.
SetMethod
;
17780
ValidateAccessor(p1.
SetMethod
, Accessibility.Public);
17785
ValidateAccessor(p1.
SetMethod
, accessibility);
18368
implementingProperty.
SetMethod
?.ExplicitInterfaceImplementations.Length > 0)
18379
ValidateMethod23(p1, p1.
SetMethod
, isAbstract, setAccess, test1, implementingProperty?.
SetMethod
);
19868
var p1set = p1.
SetMethod
;
19912
var p1set = p1.
SetMethod
;
20544
validateAccessor(p1.
SetMethod
, tuple.setAccess);
21616
ValidateP01Accessor(p01.
SetMethod
);
21652
var p03set = p03.
SetMethod
;
21694
var p05set = p05.
SetMethod
;
21736
var p07set = p07.
SetMethod
;
21778
var p09set = p09.
SetMethod
;
21830
ValidateP11Accessor(p11.
SetMethod
);
21855
ValidateP12Accessor(p12.
SetMethod
);
21880
ValidateP13Accessor(p13.
SetMethod
, Accessibility.Protected);
21905
ValidateP14Accessor(p14.
SetMethod
, Accessibility.Public);
21930
ValidateP15Accessor(p15.
SetMethod
, Accessibility.Internal);
21955
ValidateP16Accessor(p16.
SetMethod
, Accessibility.Public);
22022
ValidateP13Accessor(p19.
SetMethod
, Accessibility.ProtectedAndInternal);
23406
Assert.Null(test1.FindImplementationForInterfaceMember(p1.
SetMethod
));
37096
ValidateAccessor(expected?.
SetMethod
, interfaceProperty.
SetMethod
);
37115
ValidateAccessor(expected?.
SetMethod
, interfaceProperty.
SetMethod
);
37141
ValidateAccessor(m1.
SetMethod
, isAbstract, isStatic);
38033
ValidateAccessor(m1.
SetMethod
);
45371
Assert.Equal(Accessibility.Private, f1.
SetMethod
.DeclaredAccessibility);
45372
Assert.Equal(Accessibility.Private, f2.
SetMethod
.DeclaredAccessibility);
45373
Assert.Equal(Accessibility.Private, f3.
SetMethod
.DeclaredAccessibility);
52544
if (i1p1.
SetMethod
is object)
52546
Assert.Same(i1p1.
SetMethod
, i2p1.
SetMethod
.ExplicitInterfaceImplementations.Single());
52547
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
52548
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
52550
else if (i2p1.
SetMethod
is object)
52552
Assert.Empty(i2p1.
SetMethod
.ExplicitInterfaceImplementations);
52572
if (reabstracting.
SetMethod
is object)
52574
ValidateReabstraction(reabstracting.
SetMethod
, isStatic);
52738
if (i1p1.
SetMethod
is object)
52740
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
52741
Assert.Same(test12p1.
SetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
52893
if (i1p1.
SetMethod
is object)
52895
Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
52896
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53065
if (i1p1.
SetMethod
is object)
53067
Assert.Same(i3p1.
SetMethod
, i3.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53068
Assert.Same(i3p1.
SetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53226
if (i1p1.
SetMethod
is object)
53228
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53392
if (i1p1.
SetMethod
is object)
53394
Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53395
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53534
if (i1p1.
SetMethod
is object)
53536
Assert.Same(i4p1.
SetMethod
, i4.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53537
Assert.Same(i4p1.
SetMethod
, test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53630
if (i1p1.
SetMethod
is object)
53632
if (i2p1.
SetMethod
is object)
53634
Assert.Same(i1p1.
SetMethod
, i2p1.
SetMethod
.ExplicitInterfaceImplementations.Single());
53637
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53638
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53640
else if (i2p1.
SetMethod
is object)
53642
Assert.Empty(i2p1.
SetMethod
.ExplicitInterfaceImplementations);
53766
var i2p1Set = i2p1.
SetMethod
;
53799
if (i1p1.
SetMethod
is object)
53801
Assert.Same(i1p1.
SetMethod
, i2p1.
SetMethod
.ExplicitInterfaceImplementations.Single());
53802
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53803
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53805
else if (i2p1.
SetMethod
is object)
53807
Assert.Empty(i2p1.
SetMethod
.ExplicitInterfaceImplementations);
53896
var c2p1Set = c2p1.
SetMethod
;
53917
if (i1p1.
SetMethod
is object)
53919
Assert.Same(i1p1.
SetMethod
, c2p1.
SetMethod
.ExplicitInterfaceImplementations.Single());
53920
Assert.Same(c2p1Set, c2.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
53922
else if (c2p1.
SetMethod
is object)
53924
Assert.Empty(c2p1.
SetMethod
.ExplicitInterfaceImplementations);
54234
if (i1p1.
SetMethod
is object)
54236
Assert.Same(i1p1.
SetMethod
, i2p1.
SetMethod
.ExplicitInterfaceImplementations.Single());
54237
Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
54238
Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.
SetMethod
));
54240
else if (i2p1.
SetMethod
is object)
54242
Assert.Empty(i2p1.
SetMethod
.ExplicitInterfaceImplementations);
54390
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
));
54463
Assert.Equal("void I2.I1.set_F1(System.Char value)", test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
).ToTestDisplayString());
54563
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
));
54634
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
));
54702
Assert.Equal("void I2.I1.set_F1(System.Char value)", test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
).ToTestDisplayString());
54796
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
));
54890
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
));
54978
Assert.Null(test2.FindImplementationForInterfaceMember(i1F1.
SetMethod
));
57052
if (i2p1.
SetMethod
is object)
57054
Assert.Empty(i2p1.
SetMethod
.ExplicitInterfaceImplementations);
63162
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63163
Assert.Same(i2i1P3set, test2.FindImplementationForInterfaceMember(i1P3.
SetMethod
));
63173
Assert.Same(c1i1P2set, test1.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63174
Assert.Same(c1i1P3set, test1.FindImplementationForInterfaceMember(i1P3.
SetMethod
));
63184
Assert.Same(c1i1P2set, test4.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63185
Assert.Same(c1i1P3set, test4.FindImplementationForInterfaceMember(i1P3.
SetMethod
));
63195
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63196
Assert.Same(i2i1P3set, test3.FindImplementationForInterfaceMember(i1P3.
SetMethod
));
63355
Assert.Same(c1i1P2set, test1.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63359
Assert.Same(c1i1P2set, test4.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63363
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63367
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63521
Assert.Same(c1i1P2set, test1.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63525
Assert.Same(c1i1P2set, test4.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63529
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63533
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63695
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63699
Assert.Same(c1i1P2set, test1.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63703
Assert.Same(c1i1P2set, test4.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
63707
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64097
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64098
Assert.Same(i2i1P3set, test2.FindImplementationForInterfaceMember(i1P3.
SetMethod
));
64108
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64109
Assert.Same(i2i1P3set, test3.FindImplementationForInterfaceMember(i1P3.
SetMethod
));
64226
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64230
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64342
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64346
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64462
Assert.Same(i2i1P2set, test2.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
64466
Assert.Same(i2i1P2set, test3.FindImplementationForInterfaceMember(i1P2.
SetMethod
));
Symbols\IndexedPropertyTests.cs (6)
993
Assert.True(property.
SetMethod
.CanBeReferencedByName);
994
Assert.True(property.
SetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
1001
Assert.True(property.
SetMethod
.CanBeReferencedByName);
1002
Assert.True(property.
SetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
1009
Assert.False(property.
SetMethod
.CanBeReferencedByName);
1010
Assert.False(property.
SetMethod
.CanBeReferencedByNameIgnoringIllegalCharacters);
Symbols\IndexerTests.cs (5)
196
var setter = property.
SetMethod
;
209
Assert.Equal(property.
SetMethod
!= null, hasSet);
1441
Assert.Equal("set_A", indexer.
SetMethod
.Name);
1442
Assert.Equal("set_A", indexer.
SetMethod
.MetadataName);
1464
Assert.Equal("set_@indexer", indexer.
SetMethod
.MetadataName);
Symbols\InterfaceImplementationTests.cs (5)
915
var interfacePropertySetter = interfaceProperty.
SetMethod
;
923
var baseClassPropertySetter = baseClassProperty.
SetMethod
;
984
var interfacePropertySetter = interfaceProperty.
SetMethod
;
992
var baseClassPropertySetter = baseClassProperty.
SetMethod
;
1772
var interfaceSetter = interfaceProperty.
SetMethod
;
Symbols\Metadata\MetadataMemberTests.cs (2)
497
Assert.NotNull(propWithoutGetter.
SetMethod
);
503
Assert.Null(propWithoutSetter.
SetMethod
);
Symbols\Metadata\PE\DynamicTransformsTests.cs (2)
318
Assert.Equal(SpecialType.System_Void, prop2.
SetMethod
.ReturnType.SpecialType);
319
Assert.Equal(complicatedInnerInnerArrayOfArray, prop2.
SetMethod
.GetParameterType(0));
Symbols\Metadata\PE\LoadingAttributes.cs (2)
391
Assert.Equal(0, property1.
SetMethod
.GetReturnTypeAttributes().Length);
1122
Assert.Equal(1, prop.
SetMethod
.GetAttributes().Length);
Symbols\Metadata\PE\LoadingIndexers.cs (2)
1051
CheckAccessorShape(property.
SetMethod
, false, property, expectIndexer, suppressAssociatedPropertyCheck);
1055
Assert.Null(property.
SetMethod
);
Symbols\Metadata\PE\LoadingProperties.cs (14)
237
Assert.NotNull(interfaceProperty1.
SetMethod
);
240
Assert.NotNull(interfaceProperty2.
SetMethod
);
243
Assert.NotNull(interfaceProperty3.
SetMethod
);
246
Assert.Null(interfaceProperty4.
SetMethod
);
249
Assert.NotNull(interfaceProperty5.
SetMethod
);
258
Assert.NotNull(classProperty1.
SetMethod
);
261
Assert.NotNull(classProperty2.
SetMethod
);
271
var implementedBySetter1 = ImmutableArray.Create<MethodSymbol>(interfaceProperty1.
SetMethod
, interfaceProperty3.
SetMethod
, interfaceProperty5.
SetMethod
);
272
Assert.True(implementedBySetter1.SetEquals(classProperty1.
SetMethod
.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance));
277
var implementedBySetter2 = ImmutableArray.Create<MethodSymbol>(interfaceProperty2.
SetMethod
);
278
Assert.True(implementedBySetter2.SetEquals(classProperty2.
SetMethod
.ExplicitInterfaceImplementations, ReferenceEqualityComparer.Instance));
361
var setter = property.
SetMethod
;
Symbols\PartialPropertiesTests.cs (10)
703
Assert.True(prop.PartialImplementationPart!.
SetMethod
!.GetPublicSymbol().IsExtern);
713
Assert.False(prop.
SetMethod
!.GetPublicSymbol().IsExtern);
779
verifyAccessor(prop.
SetMethod
!);
786
verifyAccessor(implPart.
SetMethod
!);
938
verifyAccessor(propDefinition.SetMethod!, propImplementation.
SetMethod
!);
1009
Assert.Null(propImplementation.
SetMethod
);
1098
var implementationAccessor = propImplementation.
SetMethod
!;
2681
validateAccessor(p.
SetMethod
);
2821
validateAccessor(p.
SetMethod
);
3935
verify(indexer.PartialImplementationPart!.
SetMethod
!.Parameters[0]);
Symbols\Retargeting\RetargetingTests.cs (2)
1258
CheckSymbols(a.
SetMethod
, b.
SetMethod
, true);
Symbols\Source\CustomModifierCopyTests.cs (22)
376
property.
SetMethod
,
430
property.
SetMethod
,
1795
Assert.Equal(int16Type, baseProperty.
SetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
1796
Assert.Equal(int16Type, derivedProperty.
SetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
1804
Assert.Equal(int32Type, baseIndexer.
SetMethod
.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier());
1805
Assert.Equal(int32Type, derivedIndexer.
SetMethod
.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier());
1807
Assert.Equal(int64Type, baseIndexer.
SetMethod
.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier());
1808
Assert.Equal(int64Type, derivedIndexer.
SetMethod
.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier());
1903
Assert.Equal(0, baseProperty.
SetMethod
.CustomModifierCount());
1905
Assert.Equal(0, baseIndexer.
SetMethod
.CustomModifierCount());
1907
Assert.Equal(0, derivedProperty.
SetMethod
.CustomModifierCount());
1909
Assert.Equal(0, derivedIndexer.
SetMethod
.CustomModifierCount());
2009
Assert.Equal(int16Type, interfaceProperty.
SetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
2010
Assert.Equal(int16Type, implementationProperty.
SetMethod
.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier());
2018
Assert.Equal(int32Type, interfaceIndexer.
SetMethod
.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier());
2019
Assert.Equal(int32Type, implementationIndexer.
SetMethod
.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier());
2021
Assert.Equal(int64Type, interfaceIndexer.
SetMethod
.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier());
2022
Assert.Equal(int64Type, implementationIndexer.
SetMethod
.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier());
2102
Assert.Equal(0, interfaceProperty.
SetMethod
.CustomModifierCount());
2104
Assert.Equal(0, interfaceIndexer.
SetMethod
.CustomModifierCount());
2106
Assert.Equal(0, implementationProperty.
SetMethod
.CustomModifierCount());
2108
Assert.Equal(0, implementationIndexer.
SetMethod
.CustomModifierCount());
Symbols\Source\PropertyTests.cs (14)
187
Assert.NotNull(p.
SetMethod
);
191
Assert.Null(q.
SetMethod
);
195
Assert.Null(r.
SetMethod
);
248
Assert.NotNull(p.
SetMethod
);
252
Assert.Null(q.
SetMethod
);
256
Assert.Null(r.
SetMethod
);
365
Assert.False(p.
SetMethod
.IsImplicitlyDeclared);
369
Assert.False(p.
SetMethod
.IsImplicitlyDeclared);
373
Assert.False(q.
SetMethod
.IsImplicitlyDeclared);
592
VerifyMethodAndAccessorSame(type, property, property.
SetMethod
);
2492
var interfacePropertySetter = interfaceProperty.
SetMethod
;
2499
var classPropertySetter = classProperty.
SetMethod
;
2531
var interfacePropertySetter = interfaceProperty.
SetMethod
;
2538
var classPropertySetter = classProperty.
SetMethod
;
Symbols\StaticAbstractMembersInInterfacesTests.cs (99)
23168
Assert.Same(i6m.
SetMethod
, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).
SetMethod
);
23259
Assert.Same(i6m.
SetMethod
, ((PropertySymbol)i6.FindImplementationForInterfaceMember(m)).
SetMethod
);
23472
var m01Set = m01.
SetMethod
;
23501
var cM01Set = cM01.
SetMethod
;
23567
Assert.Null(m01.
SetMethod
);
23595
var cM01Set = cM01.
SetMethod
;
23658
var m01Set = m01.
SetMethod
;
23687
var cM01Set = cM01.
SetMethod
;
23770
Assert.Same(cM01.
SetMethod
, c3.FindImplementationForInterfaceMember(m01.
SetMethod
));
23774
Assert.Same(m01.
SetMethod
, cM01.
SetMethod
.ExplicitInterfaceImplementations.Single());
23926
Assert.Same(c1M01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
23929
Assert.Same(m01.
SetMethod
, c1M01.
SetMethod
.ExplicitInterfaceImplementations.Single());
23934
Assert.Same(c1M01.
SetMethod
, c2.FindImplementationForInterfaceMember(m01.
SetMethod
));
23939
Assert.Same(c1M01.
SetMethod
, c3.FindImplementationForInterfaceMember(m01.
SetMethod
));
23944
Assert.Same(c1M01.
SetMethod
, c4.FindImplementationForInterfaceMember(m01.
SetMethod
));
23951
Assert.Same(c2M01.
SetMethod
, c5.FindImplementationForInterfaceMember(m01.
SetMethod
));
24027
Assert.Same(m01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24028
Assert.Same(m01.
SetMethod
, i1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24070
Assert.Same(c1m01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24071
Assert.Same(m01.
SetMethod
, i1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24106
Assert.Same(c1m01.
SetMethod
, c.FindImplementationForInterfaceMember(m01.
SetMethod
));
24161
Assert.Same(m01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24162
Assert.Same(m01.
SetMethod
, i1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24192
var m01Set = m01.
SetMethod
;
24218
Assert.Null(cM01.
SetMethod
);
24276
var cM01Set = cM01.
SetMethod
;
24288
var m01Set = m01.
SetMethod
;
24330
Assert.Same(c1M01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24333
Assert.Same(m01.
SetMethod
, c1M01.
SetMethod
.ExplicitInterfaceImplementations.Single());
24380
var m01Set = m01.
SetMethod
;
24423
Assert.Same(c1M01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24456
Assert.Same(c1M01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24458
Assert.Same(m01.
SetMethod
, c1M01.
SetMethod
.ExplicitInterfaceImplementations.Single());
24513
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24514
Assert.Null(i1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24544
var m01Set = m01.
SetMethod
;
24557
var cM01Set = cM01.
SetMethod
;
24602
var m01Set = m01.
SetMethod
;
24615
var cM01Set = cM01.
SetMethod
;
24681
Assert.Same(c1M01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24685
Assert.Same(m01.
SetMethod
, c1M01.
SetMethod
.ExplicitInterfaceImplementations.Single());
24706
var m01Set = m01.
SetMethod
;
24719
var cM01Set = cM01.
SetMethod
;
24775
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24808
Assert.Null(c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24892
Assert.Same(i2M01.
SetMethod
, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
24893
Assert.Same(i2M01.
SetMethod
, i2.FindImplementationForInterfaceMember(m01.
SetMethod
));
24897
Assert.Same(m01.
SetMethod
, i2M01.
SetMethod
.ExplicitInterfaceImplementations.Single());
24937
var c2M01Set = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.
SetMethod
);
24965
Assert.Same(m01.
SetMethod
, c2M01Set.ExplicitInterfaceImplementations.Single());
24972
var c1M01Set = c1M01.
SetMethod
;
25019
Assert.Same(c2M01.
SetMethod
, c2M01Set);
25126
var c1M01Set = c1M01.
SetMethod
;
25158
c1M01Set = (MethodSymbol)c1.FindImplementationForInterfaceMember(m01.
SetMethod
);
25161
Assert.Same(m01.
SetMethod
, c1M01Set.ExplicitInterfaceImplementations.Single());
25173
Assert.Same(c1M01Set, c1.FindImplementationForInterfaceMember(m01.
SetMethod
));
25180
var c2M01Set = c2M01.
SetMethod
;
25209
Assert.Same(m01.
SetMethod
, c2M01Set.ExplicitInterfaceImplementations.Single());
25210
Assert.Same(c2M01Set, c2.FindImplementationForInterfaceMember(m01.
SetMethod
));
25220
var c3M01Set = c3M01.
SetMethod
;
25249
Assert.Same(m01.
SetMethod
, c3M01Set.ExplicitInterfaceImplementations.Single());
25250
Assert.Same(c3M01Set, c3.FindImplementationForInterfaceMember(m01.
SetMethod
));
25346
var c1M01Set = c1M01.
SetMethod
;
25361
var c2M01Set = c3.FindImplementationForInterfaceMember(m01.
SetMethod
);
25371
Assert.Same(c1M01.
SetMethod
, c3.FindImplementationForInterfaceMember(m01.
SetMethod
));
25380
Assert.Same(c2M02.
SetMethod
, c3.FindImplementationForInterfaceMember(m02.
SetMethod
));
25459
var c2M01Set = c2M01.
SetMethod
;
25493
var c3M01Set = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.
SetMethod
);
25495
Assert.Same(m01.
SetMethod
, c3M01Set.ExplicitInterfaceImplementations.Single());
25501
Assert.Same(c2M01Set, c3.FindImplementationForInterfaceMember(m01.
SetMethod
));
Symbols\SymbolErrorTests.cs (2)
10309
Assert.True(classAProp1.
SetMethod
.IsVirtual);
10364
Assert.False(classAProp1.
SetMethod
.IsVirtual); //NB: non-virtual since private
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
LifetimeAnnotationAttributesVisitor.cs (1)
70
Visit(property.
SetMethod
);
TestAttributesVisitor.cs (1)
72
Visit(property.
SetMethod
);