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