Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.42 KB

File metadata and controls

50 lines (36 loc) · 1.42 KB

REFL031

Use generic arguments that satisfies the type parameters

Topic Value
Id REFL031
Severity Warning
Enabled True
Category ReflectionAnalyzers.SystemReflection
Code MakeGenericAnalyzer

Description

Use generic arguments that satisfies the type parameters.

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 REFL031 // Use generic arguments that satisfies the type parameters
Code violating the rule here
#pragma warning restore REFL031 // Use generic arguments that satisfies the type parameters

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

#pragma warning disable REFL031 // Use generic arguments that satisfies the type parameters

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("ReflectionAnalyzers.SystemReflection", 
    "REFL031:Use generic arguments that satisfies the type parameters", 
    Justification = "Reason...")]