4 overrides of AddMethod
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Metadata\PE\PEEventSymbol.cs (1)
334public override MethodSymbol AddMethod
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
57public override MethodSymbol? AddMethod
Symbols\Source\SourceEventSymbol.cs (1)
80public abstract override MethodSymbol? AddMethod { get; }
Symbols\SubstitutedEventSymbol.cs (1)
59public override MethodSymbol? AddMethod
355 references to AddMethod
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder_Lookup.cs (1)
1559method1 = @event.AddMethod;
Binder\Binder_Operators.cs (1)
284MethodSymbol method = isAddition ? eventSymbol.AddMethod : eventSymbol.RemoveMethod;
Compilation\CSharpSemanticModel.cs (1)
3492var methodSymbol = eventAssignment.IsAddition ? eventSymbol.AddMethod : eventSymbol.RemoveMethod;
Emitter\Model\EventSymbolAdapter.cs (2)
28var addMethod = AdaptedEventSymbol.AddMethod?.GetCciAdapter(); 48var addMethod = AdaptedEventSymbol.AddMethod?.GetCciAdapter();
Emitter\NoPia\EmbeddedTypesManager.cs (1)
556var addMethod = @event.AdaptedEventSymbol.AddMethod?.GetCciAdapter();
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
46MethodSymbol? method = node.IsAddition ? node.Event.AddMethod : node.Event.RemoveMethod; 136methodOpt: eventSymbol.AddMethod,
Symbols\EventSymbol.cs (1)
162MethodSymbol? accessor = AddMethod ?? RemoveMethod;
Symbols\MemberSymbolExtensions.cs (2)
139return isImplementableAndNotPublic(eventSymbol.AddMethod) || isImplementableAndNotPublic(eventSymbol.RemoveMethod); 497MethodSymbol addMethod = @event.AddMethod;
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
352MethodSymbol correspondingAccessor = accessorIsAdder ? eventHiddenByEvent.AddMethod : eventHiddenByEvent.RemoveMethod;
Symbols\PublicModel\EventSymbol.cs (1)
44return _underlying.AddMethod.GetPublicSymbol();
Symbols\Retargeting\RetargetingEventSymbol.cs (2)
61return (object?)_underlyingEvent.AddMethod == null 63: this.RetargetingTranslator.Retarget(_underlyingEvent.AddMethod);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
324checkAccessorIsAccessibleIfImplementable(eventSymbol.AddMethod);
Symbols\Source\SourceEventAccessorSymbol.cs (1)
46MethodSymbol implementedAccessor = isAdder ? explicitlyImplementedEventOpt.AddMethod : explicitlyImplementedEventOpt.RemoveMethod;
Symbols\Source\SourceEventSymbol.cs (1)
763CheckExplicitImplementationAccessor(AddMethod, explicitlyImplementedEvent.AddMethod, explicitlyImplementedEvent, diagnostics);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3663var locationFrom = (Symbol?)(isAdder ? propertySymbol.AddMethod : propertySymbol.RemoveMethod) ?? propertySymbol;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
612var addMethod = @event.AddMethod;
Symbols\SubstitutedEventSymbol.cs (1)
63MethodSymbol? originalAddMethod = OriginalDefinition.AddMethod;
Symbols\TypeSymbol.cs (1)
1411interfaceAccessor1 = interfaceEvent.AddMethod;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenReadonlyStructTests.cs (3)
1588verifyReadOnly(s1.GetEvent("E").AddMethod, true, RefKind.RefReadOnly); 1602verifyReadOnly(s2.GetEvent("E").AddMethod, true, RefKind.RefReadOnly); 2602Assert.True(peModule.Module.HasIsReadOnlyAttribute(((PEMethodSymbol)testStruct.GetEvent("E").AddMethod).Handle));
CodeGen\CodeGenTupleTest.cs (5)
13280Assert.True(m10I1E1.AddMethod.IsExplicitInterfaceImplementation); 13281Assert.Equal("void I1.E1.add", m10I1E1.AddMethod.ExplicitInterfaceImplementations.Single().ToTestDisplayString()); 16067Assert.True(m1E1Add.Equals(m1E1.AddMethod, TypeCompareKind.ConsiderEverything)); 16098Assert.NotSame(m1E2Add, m1E2.AddMethod); 16099Assert.True(m1E2Add.Equals(m1E2.AddMethod, TypeCompareKind.ConsiderEverything));
CodeGen\EventTests.cs (3)
215var addMethod = @event.AddMethod; 718var addMethod = @event.AddMethod; 790var addMethod = @event.AddMethod;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (14)
Attributes\AttributeTests.cs (12)
2597AssertEx.SetEqual(accessorsExpected, GetAttributeNames(event1.AddMethod.GetAttributes())); 2607AssertEx.SetEqual(accessorsExpected, GetAttributeNames(event2.AddMethod.GetAttributes())); 2616AssertEx.SetEqual(accessorsExpected.Concat(new[] { "CC" }), GetAttributeNames(event3.AddMethod.GetAttributes())); 2625AssertEx.SetEqual(accessorsExpected, GetAttributeNames(event4.AddMethod.GetAttributes())); 2634AssertNoAttributes(event5.AddMethod); 2638AssertNoAttributes(event6.AddMethod); 2642Assert.Equal("GG", GetSingleAttributeName(event7.AddMethod)); 2646Assert.Equal("HH", GetSingleAttributeName(event8.AddMethod)); 2650AssertNoAttributes(event9.AddMethod); 2652Assert.Equal("II", GetSingleAttributeName(event9.AddMethod.Parameters.Single())); 2655AssertNoAttributes(event10.AddMethod); 2657Assert.Equal("JJ", event10.AddMethod.GetReturnTypeAttributes().Single().AttributeClass.Name);
Attributes\AttributeTests_Conditional.cs (1)
180attributesArrayBuilder.Add(eventE.AddMethod.GetAttributes());
Attributes\AttributeTests_Synthesized.cs (1)
238Assert.Equal("CompilerGeneratedAttribute", peModule.GetCustomAttributesForToken(((PEMethodSymbol)e.AddMethod).Handle).Single().AttributeClass.Name);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\InheritanceBindingTests.cs (3)
6650Assert.Equal(classEvent.AddMethod, @class.FindImplementationForInterfaceMember(interfaceEvent.AddMethod)); 6653Assert.True(classEvent.AddMethod.IsMetadataVirtual());
Semantics\InitOnlyMemberTests.cs (1)
2447Assert.False(eventSymbol.AddMethod.IsInitOnly);
Semantics\NullableReferenceTypesTests.cs (3)
12335Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12703Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12791Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (295)
DocumentationComments\EventDocumentationCommentTests.cs (2)
43Assert.Equal("M:Acme.Widget.add_E(System.Action)", eventSymbol.AddMethod.GetDocumentationCommentId()); 52Assert.Equal("M:Acme.Widget.add_F(System.Action)", eventSymbol.AddMethod.GetDocumentationCommentId());
SymbolDisplay\SymbolDisplayTests.cs (1)
4584eventSymbol.AddMethod.ToDisplayParts(format),
Symbols\CovariantReturnTests.cs (2)
330if (eventSymbol.AddMethod is MethodSymbol addMethod && overriddenEvent.AddMethod is MethodSymbol overriddenAddMethod)
Symbols\CSharpCompilerFeatureRequiredTests.cs (2)
192Assert.True(onEventAdderEvent.AddMethod!.HasUnsupportedMetadata); 199Assert.False(onEventRemoverEvent.AddMethod!.HasUnsupportedMetadata);
Symbols\DefaultInterfaceImplementationTests.cs (152)
6203var addE1 = e1.AddMethod; 6290var addP1 = e1.AddMethod; 6796Assert.Same(e7.AddMethod, derived.FindImplementationForInterfaceMember(e7.AddMethod)); 6797Assert.Same(e8.AddMethod, derived.FindImplementationForInterfaceMember(e8.AddMethod)); 6972Assert.Equal("void Test.I1.E7.add", derived.FindImplementationForInterfaceMember(e7.AddMethod).ToTestDisplayString()); 6973Assert.Equal("void Test.I1.E8.add", derived.FindImplementationForInterfaceMember(e8.AddMethod).ToTestDisplayString()); 7079Assert.Equal("void Test.E7.add", derived.FindImplementationForInterfaceMember(e7.AddMethod).ToTestDisplayString()); 7080Assert.Equal("void Test.E8.add", derived.FindImplementationForInterfaceMember(e8.AddMethod).ToTestDisplayString()); 7201Assert.True(e7.AddMethod.IsVirtual); 7204Assert.True(e7.AddMethod.IsMetadataVirtual()); 7207Assert.False(e7.AddMethod.IsAbstract); 7210Assert.Same(e7.AddMethod, derived.FindImplementationForInterfaceMember(e7.AddMethod)); 7323Assert.Null(test2.FindImplementationForInterfaceMember(e7.AddMethod)); 7598Assert.False(e7.AddMethod.IsVirtual); 7601Assert.False(e7.AddMethod.IsMetadataVirtual()); 7604Assert.False(e7.AddMethod.IsAbstract); 7607Assert.True(e7.AddMethod.IsStatic); 7610Assert.Null(derived.FindImplementationForInterfaceMember(e7.AddMethod)); 26664ValidateP01Accessor(p01.AddMethod); 26680var p02get = p02.AddMethod; 26722var p04get = p04.AddMethod; 26764var p06get = p06.AddMethod; 26806var p08get = p08.AddMethod; 26848var p10get = p10.AddMethod; 26880ValidateP11Accessor(p11.AddMethod); 26906ValidateP14Accessor(p14.AddMethod); 27463ValidateAccessor(p1.AddMethod, test1P1.AddMethod); 27536ValidateAccessor(p1.AddMethod); 27637ValidateAccessor(p1.AddMethod); 27805ValidateAccessor1(p1.AddMethod); 27832ValidateAccessor2(p2.AddMethod); 27859ValidateAccessor3(p3.AddMethod); 27966ValidateAccessor(p1.AddMethod); 28062ValidateP1Accessor(p1.AddMethod); 28089ValidateP2Accessor(p2.AddMethod); 28116ValidateP3Accessor(p3.AddMethod); 28143ValidateP4Accessor(p4.AddMethod); 28258var p1add = p1.AddMethod; 28265Assert.Same(test1P1.AddMethod, test1.FindImplementationForInterfaceMember(p1add)); 28303ValidateMethod(p1.AddMethod); 28359Assert.Null(test2.FindImplementationForInterfaceMember(p1.AddMethod)); 28501var p1Add = p1.AddMethod; 28506Assert.Same(test1P1.AddMethod, test1.FindImplementationForInterfaceMember(p1Add)); 28509Assert.True(test1P1.AddMethod.IsMetadataVirtual()); 29328Assert.Null(test1.FindImplementationForInterfaceMember(p1.AddMethod)); 29415ValidateAccessor(p1.AddMethod); 29531Validate1(p1.AddMethod); 29561Validate2(p2.AddMethod); 29591Validate3(p3.AddMethod); 29837Assert.Null(p2.AddMethod); 29844ValidateAccessor(p2.AddMethod, test1P2.AddMethod); 29847ValidateAccessor(p2.AddMethod, test1P2.AddMethod); 29944ValidateP1Accessor(p1.AddMethod, test2P1.AddMethod); 29974ValidateP2Accessor(p2.AddMethod, test2P2.AddMethod); 30004ValidateP3Accessor(p3.AddMethod); 30033ValidateP4Accessor(p4.AddMethod); 30062ValidateP5Accessor(p5.AddMethod); 30274ValidateP1Accessor(p1.AddMethod, test2P1.AddMethod); 30304ValidateP2Accessor(p2.AddMethod, test2P2.AddMethod); 30334ValidateP3Accessor(p3.AddMethod); 30363ValidateP4Accessor(p4.AddMethod); 30495ValidateP1Accessor(p1.AddMethod, test2P1.AddMethod); 30525ValidateP2Accessor(p2.AddMethod, test2P2.AddMethod); 30555ValidateP3Accessor(p3.AddMethod); 30585ValidateP4Accessor(p4.AddMethod); 30614ValidateP5Accessor(p5.AddMethod); 30695var p1add = p1.AddMethod; 30741ValidateMethod(p1.AddMethod); 31056ValidateAccessor(p1.AddMethod); 39932ValidateAccessor(expected?.AddMethod, interfaceEvent.AddMethod); 39951ValidateAccessor(expected?.AddMethod, interfaceEvent.AddMethod); 39977ValidateAccessor(m1.AddMethod, isAbstract); 57324Assert.Same(i1p1.AddMethod, i2p1.AddMethod.ExplicitInterfaceImplementations.Single()); 57325Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57326Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57344if (reabstracting.AddMethod is object) 57346ValidateReabstraction(reabstracting.AddMethod, isStatic); 57503Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57504Assert.Same(test12p1.AddMethod, test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57651Assert.Null(i3.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57652Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57811Assert.Same(i3p1.AddMethod, i3.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57812Assert.Same(i3p1.AddMethod, test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 57960Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58113Assert.Null(i4.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58114Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58243Assert.Same(i4p1.AddMethod, i4.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58244Assert.Same(i4p1.AddMethod, test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58316if (i1p1.AddMethod is object) 58318if (i2p1.AddMethod is object) 58320Assert.Same(i1p1.AddMethod, i2p1.AddMethod.ExplicitInterfaceImplementations.Single()); 58323Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58324Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58326else if (i2p1.AddMethod is object) 58328Assert.Empty(i2p1.AddMethod.ExplicitInterfaceImplementations); 58507var c2p1Add = c2p1.AddMethod; 58514Assert.Same(i1p1.AddMethod, c2p1Add.ExplicitInterfaceImplementations.Single()); 58515Assert.Same(c2p1Add, c2.FindImplementationForInterfaceMember(i1p1.AddMethod)); 58519Assert.Null(c2.FindImplementationForInterfaceMember(i1p1.AddMethod)); 59088Assert.Same(i1p1.AddMethod, i2p1.AddMethod.ExplicitInterfaceImplementations.Single()); 59089Assert.Null(i2.FindImplementationForInterfaceMember(i1p1.AddMethod)); 59090Assert.Null(test1.FindImplementationForInterfaceMember(i1p1.AddMethod)); 59144Assert.Empty(i2p1.AddMethod.ExplicitInterfaceImplementations); 62545Assert.Same(i1Normal.AddMethod, i1.FindImplementationForInterfaceMember(baseInterfaceNormal.AddMethod)); 62548Assert.Same(i1WinRT.AddMethod, i1.FindImplementationForInterfaceMember(baseInterfaceWinRT.AddMethod)); 62552Assert.Same(i1Normal.AddMethod, c1.FindImplementationForInterfaceMember(baseInterfaceNormal.AddMethod)); 62555Assert.Same(i1WinRT.AddMethod, c1.FindImplementationForInterfaceMember(baseInterfaceWinRT.AddMethod)); 62558Assert.Equal("void I1.Interface<System.Int32>.Normal.add", i1Normal.AddMethod.ToTestDisplayString()); 62560Assert.Equal("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken I1.Interface<System.Int32>.WinRT.add", i1WinRT.AddMethod.ToTestDisplayString()); 62607Assert.Same(i1WinRT.AddMethod, c1.FindImplementationForInterfaceMember(i1WinRT.AddMethod)); 62610Assert.Equal("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken I1.WinRT.add", i1WinRT.AddMethod.ToTestDisplayString()); 62667Assert.Same(i1WinRT.AddMethod, i1.FindImplementationForInterfaceMember(baseInterfaceWinRT.AddMethod)); 62671Assert.Same(i1WinRT.AddMethod, c1.FindImplementationForInterfaceMember(baseInterfaceWinRT.AddMethod)); 62674Assert.Equal("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken I1.Interface.WinRT.add", i1WinRT.AddMethod.ToTestDisplayString()); 62977Assert.Same(i2i1E1add, test2.FindImplementationForInterfaceMember(i1E1.AddMethod)); 62988Assert.Same(c1i1E1add, test1.FindImplementationForInterfaceMember(i1E1.AddMethod)); 62999Assert.Same(c1i1E1add, test4.FindImplementationForInterfaceMember(i1E1.AddMethod)); 63010Assert.Same(i2i1E1add, test3.FindImplementationForInterfaceMember(i1E1.AddMethod)); 63912Assert.Same(i2i1E1add, test2.FindImplementationForInterfaceMember(i1E1.AddMethod)); 63923Assert.Same(i2i1E1add, test3.FindImplementationForInterfaceMember(i1E1.AddMethod)); 67335Assert.Empty(m.AddMethod.ExplicitInterfaceImplementations); 67407Assert.Same(m2.AddMethod, m1.AddMethod.ExplicitInterfaceImplementations.Single());
Symbols\InterfaceImplementationTests.cs (1)
2217var interfaceAdder = interfaceEvent.AddMethod;
Symbols\Metadata\PE\LoadingEvents.cs (6)
80CheckAccessorShape(instanceEvent.AddMethod, instanceEvent); 89CheckAccessorShape(staticEvent.AddMethod, staticEvent); 100Assert.Same(@event.AddMethod, accessor); 136Assert.NotEqual(mismatchedAddEvent.Type, mismatchedAddEvent.AddMethod.Parameters.Single().Type); 159Assert.Equal(0, noParamAddEvent.AddMethod.Parameters.Length); 447var addMethod = @event.AddMethod;
Symbols\Source\EventTests.cs (23)
88var addMethod = @event.AddMethod; 126var addMethod = @event.AddMethod; 165var addMethod = @event.AddMethod; 200var addMethod = @event.AddMethod; 326Assert.NotNull(fevent.AddMethod); 327Assert.True(fevent.AddMethod.IsImplicitlyDeclared, "FieldLikeEvent AddAccessor"); 328Assert.NotNull(fevent.AddMethod); 354Assert.Equal(1, e1.AddMethod.ParameterTypesWithAnnotations.Length); 355Assert.Equal("System.Action<dynamic>", e1.AddMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 360Assert.Equal(1, e2.AddMethod.ParameterTypesWithAnnotations.Length); 361Assert.Equal("System.Action<dynamic>", e2.AddMethod.ParameterTypesWithAnnotations[0].ToTestDisplayString()); 1867Assert.NotNull(event1.AddMethod); 1868Assert.Equal(Accessibility.Private, event1.AddMethod.DeclaredAccessibility); 1872Assert.NotNull(event2.AddMethod); 1873Assert.Equal(Accessibility.Protected, event2.AddMethod.DeclaredAccessibility); 1877Assert.NotNull(event3.AddMethod); 1878Assert.Equal(Accessibility.Internal, event3.AddMethod.DeclaredAccessibility); 2269Assert.Equal(baseEventType, event1.AddMethod.ParameterTypesWithAnnotations.Single().Type); 2276Assert.Equal(baseEventType, event2.AddMethod.ParameterTypesWithAnnotations.Single().Type); 2342Assert.Equal("myAdd", event1.AddMethod.Name); 2347Assert.Equal("myAdd", event2.AddMethod.Name); 2388Assert.Equal("add_E", event1.AddMethod.Name); 2393Assert.Equal("add_E", event2.AddMethod.Name);
Symbols\StaticAbstractMembersInInterfacesTests.cs (106)
2766return addAccessor ? e.AddMethod : e.RemoveMethod; 25433Assert.Same(i6m.AddMethod, ((EventSymbol)i6.FindImplementationForInterfaceMember(m)).AddMethod); 25522Assert.Same(i6m.AddMethod, ((EventSymbol)i6.FindImplementationForInterfaceMember(m)).AddMethod); 25735var m01Add = m01.AddMethod; 25750var cM01Add = cM01.AddMethod; 25830var m01Add = m01.AddMethod; 25845var cM01Add = cM01.AddMethod; 25942Assert.Same(cM01.AddMethod, c3.FindImplementationForInterfaceMember(m01.AddMethod)); 25946Assert.Same(m01.AddMethod, cM01.AddMethod.ExplicitInterfaceImplementations.Single()); 26103Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26106Assert.Same(m01.AddMethod, c1M01.AddMethod.ExplicitInterfaceImplementations.Single()); 26111Assert.Same(c1M01.AddMethod, c2.FindImplementationForInterfaceMember(m01.AddMethod)); 26116Assert.Same(c1M01.AddMethod, c3.FindImplementationForInterfaceMember(m01.AddMethod)); 26121Assert.Same(c1M01.AddMethod, c4.FindImplementationForInterfaceMember(m01.AddMethod)); 26128Assert.Same(c2M01.AddMethod, c5.FindImplementationForInterfaceMember(m01.AddMethod)); 26204Assert.Same(m01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26205Assert.Same(m01.AddMethod, i1.FindImplementationForInterfaceMember(m01.AddMethod)); 26243Assert.Same(c1m01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26244Assert.Same(m01.AddMethod, i1.FindImplementationForInterfaceMember(m01.AddMethod)); 26271Assert.Same(c1m01.AddMethod, c.FindImplementationForInterfaceMember(m01.AddMethod)); 26327Assert.Null(c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26328Assert.Null(i1.FindImplementationForInterfaceMember(m01.AddMethod)); 26356Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26359Assert.Same(m01.AddMethod, c1M01.AddMethod.ExplicitInterfaceImplementations.Single()); 26380var m01Add = m01.AddMethod; 26393var cM01Add = cM01.AddMethod; 26454Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26457Assert.Same(m01.AddMethod, c1M01.AddMethod.ExplicitInterfaceImplementations.Single()); 26484Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26514Assert.Null(c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26544Assert.Null(c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26603Assert.Same(m01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26604Assert.Same(m01.AddMethod, i1.FindImplementationForInterfaceMember(m01.AddMethod)); 26631Assert.Same(m01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26680var cM01Add = cM01.AddMethod; 26692Assert.Same(cM01Add, c.FindImplementationForInterfaceMember(m01.AddMethod)); 26698Assert.Same(m01.AddMethod, cM01Add.ExplicitInterfaceImplementations.Single()); 26729Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26732Assert.Same(m01.AddMethod, c1M01.AddMethod.ExplicitInterfaceImplementations.Single()); 26759Assert.Same(m01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26788Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26818Assert.Same(c1M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26821Assert.Same(m01.AddMethod, c1M01.AddMethod.ExplicitInterfaceImplementations.Single()); 26904Assert.Same(i2M01.AddMethod, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 26905Assert.Same(i2M01.AddMethod, i2.FindImplementationForInterfaceMember(m01.AddMethod)); 26910Assert.Same(m01.AddMethod, i2M01.AddMethod.ExplicitInterfaceImplementations.Single()); 26950var c2M01Add = (MethodSymbol)c2.FindImplementationForInterfaceMember(m01.AddMethod); 26973Assert.Same(m01.AddMethod, c2M01Add.ExplicitInterfaceImplementations.Single()); 26985var c1M01Add = c1M01.AddMethod; 27027Assert.Same(c2M01.AddMethod, c2M01Add); 27151var c1M01Add = c1M01.AddMethod; 27184c1M01Add = (MethodSymbol)c1.FindImplementationForInterfaceMember(m01.AddMethod); 27187Assert.Same(m01.AddMethod, c1M01Add.ExplicitInterfaceImplementations.Single()); 27214Assert.Same(c1M01Add, c1.FindImplementationForInterfaceMember(m01.AddMethod)); 27221var c2M01Add = c2M01.AddMethod; 27240Assert.Same(m01.AddMethod, c2M01Add.ExplicitInterfaceImplementations.Single()); 27241Assert.Same(c2M01Add, c2.FindImplementationForInterfaceMember(m01.AddMethod)); 27262var c3M02Add = c3M02.AddMethod; 27295c3M02Add = (MethodSymbol)c3.FindImplementationForInterfaceMember(m02.AddMethod); 27298Assert.Same(m02.AddMethod, c3M02Add.ExplicitInterfaceImplementations.Single()); 27325Assert.Same(c3M02Add, c3.FindImplementationForInterfaceMember(m02.AddMethod)); 27332var c4M02Add = c4M02.AddMethod; 27354Assert.Same(m02.AddMethod, c4M02Add.ExplicitInterfaceImplementations.Single()); 27355Assert.Same(c4M02Add, c4.FindImplementationForInterfaceMember(m02.AddMethod)); 27487var c1M01Add = c1M01.AddMethod; 27509var c2M01Add = c3.FindImplementationForInterfaceMember(m01.AddMethod); 27521Assert.Same(c1M01.AddMethod, c3.FindImplementationForInterfaceMember(m01.AddMethod)); 27530Assert.Same(c2M02.AddMethod, c3.FindImplementationForInterfaceMember(m02.AddMethod)); 27610var c2M01Add = c2M01.AddMethod; 27641var c3M01Add = (MethodSymbol)c3.FindImplementationForInterfaceMember(m01.AddMethod); 27643Assert.Same(m01.AddMethod, c3M01Add.ExplicitInterfaceImplementations.Single()); 27652Assert.Same(c2M01Add, c3.FindImplementationForInterfaceMember(m01.AddMethod));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
LifetimeAnnotationAttributesVisitor.cs (1)
63Visit(@event.AddMethod);
TestAttributesVisitor.cs (1)
63Visit(@event.AddMethod);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdEventTests.cs (4)
3506Assert.False(instanceEvent.AddMethod.IsStatic); 3511Assert.True(staticEvent.AddMethod.IsStatic); 3579var addMethod = @event.AddMethod; 3610var addMethod = @event.AddMethod;