System.Diagnostics.CodeAnalysis Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains classes for interaction with code analysis tools. These tools are used to analyze code for conformance to coding conventions such as naming or security rules.
Classes
AllowNullAttribute |
Specifies that |
ConstantExpectedAttribute |
Indicates that the specified method parameter expects a constant. |
DisallowNullAttribute |
Specifies that |
DoesNotReturnAttribute |
Specifies that a method will never return under any circumstance. |
DoesNotReturnIfAttribute |
Specifies that the method will not return if the associated Boolean parameter is passed the specified value. |
DynamicallyAccessedMembersAttribute |
Indicates that certain members on a specified Type are accessed dynamically, for example, through System.Reflection. |
DynamicDependencyAttribute |
States a dependency that one member has on another. |
ExcludeFromCodeCoverageAttribute |
Specifies that the attributed code should be excluded from code coverage information. |
ExperimentalAttribute |
Indicates that an API is experimental and it may change in the future. |
FeatureGuardAttribute |
Indicates that the specified public static boolean get-only property guards access to the specified feature. |
FeatureSwitchDefinitionAttribute |
Indicates that the specified public static boolean get-only property corresponds to the feature switch specified by name. |
MaybeNullAttribute |
Specifies that an output may be |
MaybeNullWhenAttribute |
Specifies that when a method returns ReturnValue, the parameter may be |
MemberNotNullAttribute |
Specifies that the method or property will ensure that the listed field and property members have values that aren't |
MemberNotNullWhenAttribute |
Specifies that the method or property will ensure that the listed field and property members have non-null values when returning with the specified return value condition. |
NotNullAttribute |
Specifies that an output is not |
NotNullIfNotNullAttribute |
Specifies that the output will be non-null if the named parameter is non-null. |
NotNullWhenAttribute |
Specifies that when a method returns ReturnValue, the parameter will not be |
RequiresAssemblyFilesAttribute |
Indicates that the specified member requires assembly files to be on disk. |
RequiresDynamicCodeAttribute |
Indicates that the specified method requires the ability to generate new code at runtime, for example through System.Reflection. |
RequiresUnreferencedCodeAttribute |
Indicates that the specified method requires dynamic access to code that is not referenced statically, for example, through System.Reflection. |
SetsRequiredMembersAttribute |
Specifies that this constructor sets all required members for the current type, and callers do not need to set any required members themselves. |
StringSyntaxAttribute |
Specifies the syntax used in a string. |
SuppressMessageAttribute |
Suppresses reporting of a specific code analysis rule violation, allowing multiple suppressions on a single code artifact. Does not apply to compiler diagnostics. |
UnconditionalSuppressMessageAttribute |
Suppresses reporting of a specific rule violation, allowing multiple suppressions on a single code artifact. |
UnscopedRefAttribute |
Used to indicate a byref escapes and is not scoped. |
Enums
DynamicallyAccessedMemberTypes |
Specifies the types of members that are dynamically accessed. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values. |