Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.25 KB

WPF0105.md

File metadata and controls

50 lines (36 loc) · 1.25 KB

WPF0105

Call RemoveHandler in remove.

Topic Value
Id WPF0105
Severity Warning
Enabled True
Category WpfAnalyzers.RoutedEvent
Code RoutedEventEventDeclarationAnalyzer

Description

Call RemoveHandler in remove.

Motivation

ADD MOTIVATION HERE

How to fix violations

ADD HOW TO FIX VIOLATIONS HERE

Configure severity

Via ruleset file.

Configure the severity per project, for more info see MSDN.

Via #pragma directive.

#pragma warning disable WPF0105 // Call RemoveHandler in remove.
Code violating the rule here
#pragma warning restore WPF0105 // Call RemoveHandler in remove.

Or put this at the top of the file to disable all instances.

#pragma warning disable WPF0105 // Call RemoveHandler in remove.

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("WpfAnalyzers.RoutedEvent", 
    "WPF0105:Call RemoveHandler in remove.", 
    Justification = "Reason...")]