4 overrides of RemoveMethod
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Metadata\PE\PEEventSymbol.cs (1)
342public override MethodSymbol RemoveMethod
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
67public override MethodSymbol? RemoveMethod
Symbols\Source\SourceEventSymbol.cs (1)
92public abstract override MethodSymbol? RemoveMethod { get; }
Symbols\SubstitutedEventSymbol.cs (1)
68public override MethodSymbol? RemoveMethod
385 references to RemoveMethod
Microsoft.CodeAnalysis.CSharp (24)
Binder\Binder_Expressions.cs (2)
9398(eventSymbol.RemoveMethod is null || eventSymbol.RemoveMethod.CallerUnsafeMode == eventSymbol.CallerUnsafeMode));
Binder\Binder_Lookup.cs (1)
1610method2 = @event.RemoveMethod;
Binder\Binder_Operators.cs (1)
716MethodSymbol method = isAddition ? eventSymbol.AddMethod : eventSymbol.RemoveMethod;
Compilation\CSharpSemanticModel.cs (1)
3512var methodSymbol = eventAssignment.IsAddition ? eventSymbol.AddMethod : eventSymbol.RemoveMethod;
Emitter\Model\EventSymbolAdapter.cs (2)
38var removeMethod = AdaptedEventSymbol.RemoveMethod?.GetCciAdapter(); 62var removeMethod = AdaptedEventSymbol.RemoveMethod?.GetCciAdapter();
Emitter\NoPia\EmbeddedTypesManager.cs (1)
625var removeMethod = @event.AdaptedEventSymbol.RemoveMethod?.GetCciAdapter();
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
56MethodSymbol? method = node.IsAddition ? node.Event.AddMethod : node.Event.RemoveMethod; 109methodOpt: eventSymbol.RemoveMethod,
Symbols\EventSymbol.cs (1)
163MethodSymbol? accessor = AddMethod ?? RemoveMethod;
Symbols\MemberSymbolExtensions.cs (2)
385return isImplementableAndNotPublic(eventSymbol.AddMethod) || isImplementableAndNotPublic(eventSymbol.RemoveMethod); 767MethodSymbol removeMethod = @event.RemoveMethod;
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
352MethodSymbol correspondingAccessor = accessorIsAdder ? eventHiddenByEvent.AddMethod : eventHiddenByEvent.RemoveMethod;
Symbols\PublicModel\EventSymbol.cs (1)
52return _underlying.RemoveMethod.GetPublicSymbol();
Symbols\Retargeting\RetargetingEventSymbol.cs (2)
71return (object?)_underlyingEvent.RemoveMethod == null 73: this.RetargetingTranslator.Retarget(_underlyingEvent.RemoveMethod);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
361checkAccessorIsAccessibleIfImplementable(eventSymbol.RemoveMethod);
Symbols\Source\SourceEventAccessorSymbol.cs (1)
60MethodSymbol implementedAccessor = isAdder ? explicitlyImplementedEventOpt.AddMethod : explicitlyImplementedEventOpt.RemoveMethod;
Symbols\Source\SourceEventSymbol.cs (1)
885CheckExplicitImplementationAccessor(RemoveMethod, explicitlyImplementedEvent.RemoveMethod, explicitlyImplementedEvent, diagnostics);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4517var locationFrom = (Symbol?)(isAdder ? propertySymbol.AddMethod : propertySymbol.RemoveMethod) ?? propertySymbol;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
629var removeMethod = @event.RemoveMethod;
Symbols\SubstitutedEventSymbol.cs (1)
72MethodSymbol? originalRemoveMethod = OriginalDefinition.RemoveMethod;
Symbols\TypeSymbol.cs (1)
1424interfaceAccessor2 = interfaceEvent.RemoveMethod;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenReadonlyStructTests.cs (3)
1613verifyReadOnly(s1.GetEvent("E").RemoveMethod, true, RefKind.RefReadOnly); 1627verifyReadOnly(s2.GetEvent("E").RemoveMethod, true, RefKind.RefReadOnly); 2627Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)testStruct.GetEvent("E").RemoveMethod).Handle));
CodeGen\CodeGenTupleTest.cs (5)
13277Assert.True(m10I1E1.RemoveMethod.IsExplicitInterfaceImplementation); 13278Assert.Equal("void I1.E1.remove", m10I1E1.RemoveMethod.ExplicitInterfaceImplementations.Single().ToTestDisplayString()); 16063Assert.True(m1E1Remove.Equals(m1E1.RemoveMethod, TypeCompareKind.ConsiderEverything)); 16095Assert.NotSame(m1E2Remove, m1E2.RemoveMethod); 16096Assert.True(m1E2Remove.Equals(m1E2.RemoveMethod, TypeCompareKind.ConsiderEverything));
CodeGen\EventTests.cs (3)
221var removeMethod = @event.RemoveMethod; 721var removeMethod = @event.RemoveMethod; 793var removeMethod = @event.RemoveMethod;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (37)
Attributes\AttributeTests.cs (10)
2636AssertEx.SetEqual(accessorsExpected, GetAttributeNames(event1.RemoveMethod.GetAttributes())); 2646AssertEx.SetEqual(accessorsExpected, GetAttributeNames(event2.RemoveMethod.GetAttributes())); 2655AssertEx.SetEqual(accessorsExpected.Concat(new[] { "CC" }), GetAttributeNames(event3.RemoveMethod.GetAttributes())); 2664AssertEx.SetEqual(accessorsExpected, GetAttributeNames(event4.RemoveMethod.GetAttributes())); 2673AssertNoAttributes(event5.RemoveMethod); 2677AssertNoAttributes(event6.RemoveMethod); 2681AssertNoAttributes(event7.RemoveMethod); 2685AssertNoAttributes(event8.RemoveMethod); 2689AssertNoAttributes(event9.RemoveMethod); 2694AssertNoAttributes(event10.RemoveMethod);
Attributes\AttributeTests_Conditional.cs (1)
181attributesArrayBuilder.Add(eventE.RemoveMethod.GetAttributes());
Attributes\AttributeTests_Synthesized.cs (1)
253Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)e.RemoveMethod).Handle).Single().AttributeClass.Name);
OverloadResolutionPriorityTests.cs (1)
1651Assert.Equal(0, indexer!.RemoveMethod!.OverloadResolutionPriority);
PartialEventsAndConstructorsTests.cs (24)
1140validateAccessor(e.RemoveMethod!); 1298validateAccessor(e.RemoveMethod!); 1752Assert.True(ev.PartialImplementationPart!.RemoveMethod!.GetPublicSymbol().IsExtern); 1776Assert.False(ev.RemoveMethod!.GetPublicSymbol().IsExtern); 1883verifyAccessor(e.RemoveMethod!, "remove_E", "remove_E"); 1891verifyAccessor(eImpl.RemoveMethod!, "remove_E", "remove_E"); 1963Assert.False(ev.RemoveMethod!.GetPublicSymbol().IsExtern); 1964Assert.Null(ev.RemoveMethod!.GetDllImportData()); 1965Assert.Equal(MethodImplAttributes.InternalCall, ev.RemoveMethod.ImplementationAttributes); 1966Assert.False(ev.RemoveMethod.ImplementationAttributes.HasFlag(MethodImplAttributes.Synchronized)); 2083Assert.True(e.RemoveMethod!.ImplementationAttributes.HasFlag(MethodImplAttributes.Synchronized)); 2144var removeMethod = e.RemoveMethod!; 3567AssertEx.Equal(["A(4)", "A(14)"], e.RemoveMethod!.GetAttributes().ToStrings()); 3568AssertEx.Equal(["A(24)"], e.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3569AssertEx.Equal(["A(34)"], e.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 3578AssertEx.Equal(["A(4)", "A(14)"], eImpl.RemoveMethod!.GetAttributes().ToStrings()); 3579AssertEx.Equal(["A(24)"], eImpl.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3580AssertEx.Equal(["A(34)"], eImpl.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 3588AssertEx.Equal([.. compiledGeneratedAttr, "A(11)", "A(12)"], f.RemoveMethod!.GetAttributes().ToStrings()); 3589AssertEx.Equal(["A(22)", "A(21)"], f.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3590AssertEx.Equal([], f.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 3599AssertEx.Equal([.. compiledGeneratedAttr, "A(11)", "A(12)"], fImpl.RemoveMethod!.GetAttributes().ToStrings()); 3600AssertEx.Equal(["A(22)", "A(21)"], fImpl.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3601AssertEx.Equal([], fImpl.RemoveMethod.GetReturnTypeAttributes().ToStrings());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\InheritanceBindingTests.cs (3)
6651Assert.Equal(classEvent.RemoveMethod, @class.FindImplementationForInterfaceMember(interfaceEvent.RemoveMethod)); 6654Assert.True(classEvent.RemoveMethod.IsMetadataVirtual());
Semantics\InitOnlyMemberTests.cs (1)
2454Assert.False(eventSymbol.RemoveMethod.IsInitOnly);
Semantics\NullableReferenceTypesTests.cs (3)
12352Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12720Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12808Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (300)
DocumentationComments\EventDocumentationCommentTests.cs (2)
44Assert.Equal("M:Acme.Widget.remove_E(System.Action)", eventSymbol.RemoveMethod.GetDocumentationCommentId()); 53Assert.Equal("M:Acme.Widget.remove_F(System.Action)", eventSymbol.RemoveMethod.GetDocumentationCommentId());
SymbolDisplay\SymbolDisplayTests.cs (1)
5018eventSymbol.RemoveMethod.ToDisplayParts(format),
Symbols\CovariantReturnTests.cs (2)
334if (eventSymbol.RemoveMethod is MethodSymbol removeMethod && overriddenEvent.RemoveMethod is MethodSymbol overriddenRemoveMethod)
Symbols\CSharpCompilerFeatureRequiredTests.cs (2)
193Assert.False(onEventAdderEvent.RemoveMethod!.HasUnsupportedMetadata); 200Assert.True(onEventRemoverEvent.RemoveMethod!.HasUnsupportedMetadata);
Symbols\DefaultInterfaceImplementationTests.cs (151)
6430var rmvE1 = e1.RemoveMethod; 6522var rmvP1 = e1.RemoveMethod; 7024Assert.Same(e7.RemoveMethod, derived.FindImplementationForInterfaceMember(e7.RemoveMethod)); 7025Assert.Same(e8.RemoveMethod, derived.FindImplementationForInterfaceMember(e8.RemoveMethod)); 7200Assert.Equal("void Test.I1.E7.remove", derived.FindImplementationForInterfaceMember(e7.RemoveMethod).ToTestDisplayString()); 7201Assert.Equal("void Test.I1.E8.remove", derived.FindImplementationForInterfaceMember(e8.RemoveMethod).ToTestDisplayString()); 7307Assert.Equal("void Test.E7.remove", derived.FindImplementationForInterfaceMember(e7.RemoveMethod).ToTestDisplayString()); 7308Assert.Equal("void Test.E8.remove", derived.FindImplementationForInterfaceMember(e8.RemoveMethod).ToTestDisplayString()); 7428Assert.True(e7.RemoveMethod.IsVirtual); 7431Assert.True(e7.RemoveMethod.IsMetadataVirtual()); 7434Assert.False(e7.RemoveMethod.IsAbstract); 7437Assert.Same(e7.RemoveMethod, derived.FindImplementationForInterfaceMember(e7.RemoveMethod)); 7550Assert.Null(test2.FindImplementationForInterfaceMember(e7.RemoveMethod)); 7825Assert.False(e7.RemoveMethod.IsVirtual); 7828Assert.False(e7.RemoveMethod.IsMetadataVirtual()); 7831Assert.False(e7.RemoveMethod.IsAbstract); 7834Assert.True(e7.RemoveMethod.IsStatic); 7837Assert.Null(derived.FindImplementationForInterfaceMember(e7.RemoveMethod)); 27119ValidateP01Accessor(p01.RemoveMethod); 27155var p03set = p03.RemoveMethod; 27197var p05set = p05.RemoveMethod; 27239var p07set = p07.RemoveMethod; 27281var p09set = p09.RemoveMethod; 27335ValidateP11Accessor(p11.RemoveMethod); 27361ValidateP14Accessor(p14.RemoveMethod); 28019ValidateAccessor(p1.RemoveMethod, test1P1.RemoveMethod); 28092ValidateAccessor(p1.RemoveMethod); 28195ValidateAccessor(p1.RemoveMethod); 28407ValidateAccessor1(p1.RemoveMethod); 28434ValidateAccessor2(p2.RemoveMethod); 28461ValidateAccessor3(p3.RemoveMethod); 28568ValidateAccessor(p1.RemoveMethod); 28664ValidateP1Accessor(p1.RemoveMethod); 28691ValidateP2Accessor(p2.RemoveMethod); 28718ValidateP3Accessor(p3.RemoveMethod); 28745ValidateP4Accessor(p4.RemoveMethod); 28860var p1remove = p1.RemoveMethod; 28867Assert.Same(test1P1.RemoveMethod, test1.FindImplementationForInterfaceMember(p1remove)); 28905ValidateMethod(p1.RemoveMethod); 28961Assert.Null(test2.FindImplementationForInterfaceMember(p1.RemoveMethod)); 29103var p1Remove = p1.RemoveMethod; 29108Assert.Same(test1P1.RemoveMethod, test1.FindImplementationForInterfaceMember(p1Remove)); 29111Assert.True(test1P1.RemoveMethod.IsMetadataVirtual()); 29930Assert.Null(test1.FindImplementationForInterfaceMember(p1.RemoveMethod)); 30017ValidateAccessor(p1.RemoveMethod); 30133Validate1(p1.RemoveMethod); 30163Validate2(p2.RemoveMethod); 30193Validate3(p3.RemoveMethod); 30439ValidateAccessor(p2.RemoveMethod, test1P2.RemoveMethod); 30444Assert.Null(p2.RemoveMethod); 30449ValidateAccessor(p2.RemoveMethod, test1P2.RemoveMethod); 30546ValidateP1Accessor(p1.RemoveMethod, test2P1.RemoveMethod); 30576ValidateP2Accessor(p2.RemoveMethod, test2P2.RemoveMethod); 30606ValidateP3Accessor(p3.RemoveMethod); 30635ValidateP4Accessor(p4.RemoveMethod); 30664ValidateP5Accessor(p5.RemoveMethod); 30867ValidateP1Accessor(p1.RemoveMethod, test2P1.RemoveMethod); 30897ValidateP2Accessor(p2.RemoveMethod, test2P2.RemoveMethod); 30927ValidateP3Accessor(p3.RemoveMethod); 30956ValidateP4Accessor(p4.RemoveMethod); 31088ValidateP1Accessor(p1.RemoveMethod, test2P1.RemoveMethod); 31118ValidateP2Accessor(p2.RemoveMethod, test2P2.RemoveMethod); 31148ValidateP3Accessor(p3.RemoveMethod); 31178ValidateP4Accessor(p4.RemoveMethod); 31207ValidateP5Accessor(p5.RemoveMethod); 31288var p1remove = p1.RemoveMethod; 31334ValidateMethod(p1.RemoveMethod); 31649ValidateAccessor(p1.RemoveMethod); 40525ValidateAccessor(expected?.RemoveMethod, interfaceEvent.RemoveMethod); 40544ValidateAccessor(expected?.RemoveMethod, interfaceEvent.RemoveMethod); 40570ValidateAccessor(m1.RemoveMethod, isAbstract); 58352Assert.Same(i1p1.RemoveMethod, i2p1.RemoveMethod.ExplicitInterfaceImplementations.Single()); 58353Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58354Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58373if (reabstracting.RemoveMethod is object) 58375ValidateReabstraction(reabstracting.RemoveMethod, isStatic); 58530Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58531Assert.Same(test12p1.RemoveMethod, test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58678Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58679Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58838Assert.Same(i3p1.RemoveMethod, i3.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58839Assert.Same(i3p1.RemoveMethod, test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 58985Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59140Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59141Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59270Assert.Same(i4p1.RemoveMethod, i4.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59271Assert.Same(i4p1.RemoveMethod, test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59355if (i1p1.RemoveMethod is object) 59357if (i2p1.RemoveMethod is object) 59359Assert.Same(i1p1.RemoveMethod, i2p1.RemoveMethod.ExplicitInterfaceImplementations.Single()); 59362Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59363Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59365else if (i2p1.RemoveMethod is object) 59367Assert.Empty(i2p1.RemoveMethod.ExplicitInterfaceImplementations); 59546var c2p1Remove = c2p1.RemoveMethod; 59553Assert.Same(i1p1.RemoveMethod, c2p1Remove.ExplicitInterfaceImplementations.Single()); 59554Assert.Same(c2p1Remove, c2.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 59558Assert.Null(c2.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 60116Assert.Same(i1p1.RemoveMethod, i2p1.RemoveMethod.ExplicitInterfaceImplementations.Single()); 60117Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 60118Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.RemoveMethod)); 60169Assert.Empty(i2p1.RemoveMethod.ExplicitInterfaceImplementations); 63570Assert.Same(i1Normal.RemoveMethod, i1.FindImplementationForInterfaceMember(baseInterfaceNormal.RemoveMethod)); 63573Assert.Same(i1WinRT.RemoveMethod, i1.FindImplementationForInterfaceMember(baseInterfaceWinRT.RemoveMethod)); 63577Assert.Same(i1Normal.RemoveMethod, c1.FindImplementationForInterfaceMember(baseInterfaceNormal.RemoveMethod)); 63580Assert.Same(i1WinRT.RemoveMethod, c1.FindImplementationForInterfaceMember(baseInterfaceWinRT.RemoveMethod)); 63583Assert.Equal("void I1.Interface<System.Int32>.Normal.remove", i1Normal.RemoveMethod.ToTestDisplayString()); 63585Assert.Equal("void I1.Interface<System.Int32>.WinRT.remove", i1WinRT.RemoveMethod.ToTestDisplayString()); 63632Assert.Same(i1WinRT.RemoveMethod, c1.FindImplementationForInterfaceMember(i1WinRT.RemoveMethod)); 63635Assert.Equal("void I1.WinRT.remove", i1WinRT.RemoveMethod.ToTestDisplayString()); 63692Assert.Same(i1WinRT.RemoveMethod, i1.FindImplementationForInterfaceMember(baseInterfaceWinRT.RemoveMethod)); 63696Assert.Same(i1WinRT.RemoveMethod, c1.FindImplementationForInterfaceMember(baseInterfaceWinRT.RemoveMethod)); 63699Assert.Equal("void I1.Interface.WinRT.remove", i1WinRT.RemoveMethod.ToTestDisplayString()); 64002Assert.Same(i2i1E1remove, test2.FindImplementationForInterfaceMember(i1E1.RemoveMethod)); 64013Assert.Same(c1i1E1remove, test1.FindImplementationForInterfaceMember(i1E1.RemoveMethod)); 64024Assert.Same(c1i1E1remove, test4.FindImplementationForInterfaceMember(i1E1.RemoveMethod)); 64035Assert.Same(i2i1E1remove, test3.FindImplementationForInterfaceMember(i1E1.RemoveMethod)); 64937Assert.Same(i2i1E1remove, test2.FindImplementationForInterfaceMember(i1E1.RemoveMethod)); 64948Assert.Same(i2i1E1remove, test3.FindImplementationForInterfaceMember(i1E1.RemoveMethod)); 68360Assert.Empty(m.RemoveMethod.ExplicitInterfaceImplementations); 68432Assert.Same(m2.RemoveMethod, m1.RemoveMethod.ExplicitInterfaceImplementations.Single());
Symbols\Metadata\PE\LoadingEvents.cs (6)
80CheckAccessorShape(instanceEvent.RemoveMethod, instanceEvent); 89CheckAccessorShape(staticEvent.RemoveMethod, staticEvent); 102Assert.Same(@event.RemoveMethod, accessor); 138Assert.NotEqual(mismatchedRemoveEvent.Type, mismatchedRemoveEvent.RemoveMethod.Parameters.Single().Type); 161Assert.Equal(0, noParamRemoveEvent.RemoveMethod.Parameters.Length); 447var removeMethod = @event.RemoveMethod;
Symbols\Source\EventTests.cs (30)
93var removeMethod = @event.RemoveMethod; 131var removeMethod = @event.RemoveMethod; 170var removeMethod = @event.RemoveMethod; 205var removeMethod = @event.RemoveMethod; 329Assert.True(fevent.RemoveMethod.IsImplicitlyDeclared, "FieldLikeEvent RemoveAccessor"); 357Assert.Equal(1, e1.RemoveMethod.ParameterTypesWithAnnotations.Length); 358Assert.Equal("System.Action<dynamic>", e1.RemoveMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 363Assert.Equal(1, e2.RemoveMethod.ParameterTypesWithAnnotations.Length); 364Assert.Equal("System.Action<dynamic>", e2.RemoveMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 1869Assert.NotNull(event1.RemoveMethod); 1870Assert.Equal(Accessibility.Public, event1.RemoveMethod.DeclaredAccessibility); 1874Assert.NotNull(event2.RemoveMethod); 1875Assert.Equal(Accessibility.Public, event2.RemoveMethod.DeclaredAccessibility); 1879Assert.NotNull(event3.RemoveMethod); 1880Assert.Equal(Accessibility.Public, event3.RemoveMethod.DeclaredAccessibility); 2270Assert.Equal(baseEventType, event1.RemoveMethod.ParameterTypesWithAnnotations.Single().Type); 2277Assert.Equal(baseEventType, event2.RemoveMethod.ParameterTypesWithAnnotations.Single().Type); 2343Assert.Equal("myRemove", event1.RemoveMethod.Name); 2348Assert.Equal("myRemove", event2.RemoveMethod.Name); 2389Assert.Equal("remove_E", event1.RemoveMethod.Name); 2394Assert.Equal("remove_E", event2.RemoveMethod.Name); 2862AssertEx.Equal([.. compiledGeneratedAttr, "A(2)"], e.RemoveMethod!.GetAttributes().ToStrings()); 2863AssertEx.Equal(["A(3)"], e.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 2864AssertEx.Equal([], e.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 2872AssertEx.Equal([.. compiledGeneratedAttr, "A(2)"], f.RemoveMethod!.GetAttributes().ToStrings()); 2873AssertEx.Equal(["A(3)"], f.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 2874AssertEx.Equal([], f.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 2881AssertEx.Equal(["A(31)", "A(32)"], g.RemoveMethod!.GetAttributes().ToStrings()); 2882AssertEx.Equal(["A(33)"], g.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 2883AssertEx.Equal(["A(34)"], g.RemoveMethod.GetReturnTypeAttributes().ToStrings());
Symbols\StaticAbstractMembersInInterfacesTests.cs (106)
2748return addAccessor ? e.AddMethod : e.RemoveMethod; 25870Assert.Same(i6m.RemoveMethod, ((EventSymbol)i6.FindImplementationForInterfaceMember(m)).RemoveMethod); 25959Assert.Same(i6m.RemoveMethod, ((EventSymbol)i6.FindImplementationForInterfaceMember(m)).RemoveMethod); 26172var m01Remove = m01.RemoveMethod; 26201var cM01Remove = cM01.RemoveMethod; 26267var m01Remove = m01.RemoveMethod; 26296var cM01Remove = cM01.RemoveMethod; 26379Assert.Same(cM01.RemoveMethod, c3.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26383Assert.Same(m01.RemoveMethod, cM01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 26540Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26543Assert.Same(m01.RemoveMethod, c1M01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 26548Assert.Same(c1M01.RemoveMethod, c2.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26553Assert.Same(c1M01.RemoveMethod, c3.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26558Assert.Same(c1M01.RemoveMethod, c4.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26565Assert.Same(c2M01.RemoveMethod, c5.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26642Assert.Same(m01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26643Assert.Same(m01.RemoveMethod, i1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26681Assert.Same(c1m01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26682Assert.Same(m01.RemoveMethod, i1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26708Assert.Same(c1m01.RemoveMethod, c.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26765Assert.Same(m01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26766Assert.Same(m01.RemoveMethod, i1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26793Assert.Same(m01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26842var cM01Remove = cM01.RemoveMethod; 26854Assert.Same(cM01Remove, c.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26860Assert.Same(m01.RemoveMethod, cM01Remove.ExplicitInterfaceImplementations.Single()); 26891Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26894Assert.Same(m01.RemoveMethod, c1M01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 26921Assert.Same(m01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26951Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26981Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 26983Assert.Same(m01.RemoveMethod, c1M01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 27037Assert.Null(c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27038Assert.Null(i1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27066Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27069Assert.Same(m01.RemoveMethod, c1M01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 27090var m01Remove = m01.RemoveMethod; 27103var cM01Remove = cM01.RemoveMethod; 27164Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27167Assert.Same(m01.RemoveMethod, c1M01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 27194Assert.Same(c1M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27225Assert.Null(c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27255Assert.Null(c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27342Assert.Same(i2M01.RemoveMethod, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27343Assert.Same(i2M01.RemoveMethod, i2.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27347Assert.Same(m01.RemoveMethod, i2M01.RemoveMethod.ExplicitInterfaceImplementations.Single()); 27387var c2M01Remove = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.RemoveMethod); 27415Assert.Same(m01.RemoveMethod, c2M01Remove.ExplicitInterfaceImplementations.Single()); 27422var c1M01Remove = c1M01.RemoveMethod; 27469Assert.Same(c2M01.RemoveMethod, c2M01Remove); 27588var c1M01Remove = c1M01.RemoveMethod; 27632c1M01Remove = (MethodSymbol)c1.FindImplementationForInterfaceMember(m01.RemoveMethod); 27635Assert.Same(m01.RemoveMethod, c1M01Remove.ExplicitInterfaceImplementations.Single()); 27651Assert.Same(c1M01Remove, c1.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27658var c2M01Remove = c2M01.RemoveMethod; 27688Assert.Same(m01.RemoveMethod, c2M01Remove.ExplicitInterfaceImplementations.Single()); 27689Assert.Same(c2M01Remove, c2.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27699var c3M02Remove = c3M02.RemoveMethod; 27743c3M02Remove = (MethodSymbol)c3.FindImplementationForInterfaceMember(m02.RemoveMethod); 27746Assert.Same(m02.RemoveMethod, c3M02Remove.ExplicitInterfaceImplementations.Single()); 27762Assert.Same(c3M02Remove, c3.FindImplementationForInterfaceMember(m02.RemoveMethod)); 27769var c4M02Remove = c4M02.RemoveMethod; 27803Assert.Same(m02.RemoveMethod, c4M02Remove.ExplicitInterfaceImplementations.Single()); 27804Assert.Same(c4M02Remove, c4.FindImplementationForInterfaceMember(m02.RemoveMethod)); 27933var c1M01Remove = c1M01.RemoveMethod; 27948var c2M01Remove = c3.FindImplementationForInterfaceMember(m01.RemoveMethod); 27958Assert.Same(c1M01.RemoveMethod, c3.FindImplementationForInterfaceMember(m01.RemoveMethod)); 27967Assert.Same(c2M02.RemoveMethod, c3.FindImplementationForInterfaceMember(m02.RemoveMethod)); 28047var c2M01Remove = c2M01.RemoveMethod; 28081var c3M01Remove = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.RemoveMethod); 28083Assert.Same(m01.RemoveMethod, c3M01Remove.ExplicitInterfaceImplementations.Single()); 28089Assert.Same(c2M01Remove, c3.FindImplementationForInterfaceMember(m01.RemoveMethod));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
LifetimeAnnotationAttributesVisitor.cs (1)
64Visit(@event.RemoveMethod);
TestAttributesVisitor.cs (1)
64Visit(@event.RemoveMethod);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdEventTests.cs (4)
3507Assert.True(instanceEvent.RemoveMethod.IsStatic); 3512Assert.False(staticEvent.RemoveMethod.IsStatic); 3585var removeMethod = @event.RemoveMethod; 3616var removeMethod = @event.RemoveMethod;