2 implementations of IEventSymbol_RemoveMethod
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\EventSymbol.cs (1)
48IMethodSymbol? IEventSymbol.RemoveMethod
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\EventSymbol.vb (1)
296Private ReadOnly Property IEventSymbol_RemoveMethod As IMethodSymbol Implements IEventSymbol.RemoveMethod
44 references to IEventSymbol_RemoveMethod
ILLink.RoslynAnalyzer (13)
DataFlow\DynamicallyAccessedMembersBinder.cs (10)
309 (@event.RemoveMethod == null || @event.RemoveMethod.DeclaredAccessibility == Accessibility.Private)) 317 if ((@event.RemoveMethod != null) && !@event.RemoveMethod.IsStatic) continue; 322 if ((@event.RemoveMethod != null) && @event.RemoveMethod.IsStatic) continue; 327 && (@event.RemoveMethod == null || (@event.RemoveMethod.DeclaredAccessibility != Accessibility.Public))) 333 if ((@event.RemoveMethod != null) && @event.RemoveMethod.DeclaredAccessibility == Accessibility.Public) continue;
DataFlow\LocalDataFlowVisitor.cs (1)
441 IMethodSymbol? removeMethod = eventReference.Event.RemoveMethod;
TrimAnalysis\ReflectionAccessAnalyzer.cs (2)
178 if (eventSymbol.RemoveMethod is not null) 179 GetReflectionAccessDiagnosticsForMethod (location, eventSymbol.RemoveMethod);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
245removeMethod: GetEventAddOrRemoveMethod(@event, @event.RemoveMethod, throughMember, generator.RemoveEventHandler));
Microsoft.CodeAnalysis.CSharp (1)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
235var accessor = symbol.AddMethod ?? symbol.RemoveMethod;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (2)
106var declaration = !info.Context.GenerateMethodBodies || @event.IsAbstract || @event.AddMethod == null || @event.RemoveMethod == null 146GenerateAccessorDeclaration(@event, @event.RemoveMethod, SyntaxKind.RemoveAccessorDeclaration, destination, info),
Microsoft.CodeAnalysis.CSharp.Features (6)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (6)
1251if (oldEventSymbol.RemoveMethod != null || newEventSymbol.RemoveMethod != null) 1253if (DiffersInReadOnlyModifier(oldEventSymbol.RemoveMethod, newEventSymbol.RemoveMethod) || 1256result.Add((oldEventSymbol.RemoveMethod, newEventSymbol.RemoveMethod, editKind));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ReadOnlyStructsTests.cs (2)
1209Assert.True(getEvent(s1, "E").RemoveMethod.IsReadOnly); 1225Assert.True(getEvent(s2, "E").RemoveMethod.IsReadOnly);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
391Assert.Same(eventSymbol.RemoveMethod, model.GetDeclaredSymbol(accessorList[1]));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (2)
106var declaration = !info.Context.GenerateMethodBodies || @event.IsAbstract || @event.AddMethod == null || @event.RemoveMethod == null 146GenerateAccessorDeclaration(@event, @event.RemoveMethod, SyntaxKind.RemoveAccessorDeclaration, destination, info),
Microsoft.CodeAnalysis.Features (3)
PullMemberUp\MembersPuller.cs (2)
234(eventSymbol.RemoveMethod != null && !eventSymbol.RemoveMethod.IsImplicitlyDeclared);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
245removeMethod: GetEventAddOrRemoveMethod(@event, @event.RemoveMethod, throughMember, generator.RemoveEventHandler));
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\EventSymbol.vb (1)
296Private ReadOnly Property IEventSymbol_RemoveMethod As IMethodSymbol Implements IEventSymbol.RemoveMethod
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (3)
83([event].AddMethod IsNot Nothing OrElse [event].RemoveMethod IsNot Nothing OrElse [event].RaiseMethod IsNot Nothing) Then 99[event].RemoveMethod Is Nothing, 101GenerateStatements([event].RemoveMethod))
Microsoft.CodeAnalysis.VisualBasic.Features (4)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (4)
858If oldEventSymbol.RemoveMethod IsNot Nothing OrElse newEventSymbol.RemoveMethod IsNot Nothing Then 860result.Add((oldEventSymbol.RemoveMethod, newEventSymbol.RemoveMethod, editKind))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\GetSemanticInfoTests.vb (1)
3110Assert.Equal(handledEvent0.EventSymbol.RemoveMethod, commonEventSymbol.RemoveMethod)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (3)
83([event].AddMethod IsNot Nothing OrElse [event].RemoveMethod IsNot Nothing OrElse [event].RaiseMethod IsNot Nothing) Then 99[event].RemoveMethod Is Nothing, 101GenerateStatements([event].RemoveMethod))
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
131eventAccessor = eventSymbol?.RemoveMethod