Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.23 KB

GU0050.md

File metadata and controls

50 lines (36 loc) · 1.23 KB

GU0050

Ignore events when serializing

Topic Value
Id GU0050
Severity Warning
Enabled True
Category Gu.Analyzers.Correctness
Code GU0050IgnoreEventsWhenSerializing

Description

Ignore events when serializing.

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 GU0050 // Ignore events when serializing
Code violating the rule here
#pragma warning restore GU0050 // Ignore events when serializing

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

#pragma warning disable GU0050 // Ignore events when serializing

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness", 
    "GU0050:Ignore events when serializing", 
    Justification = "Reason...")]