C#


ROSLYN.DESIGN.CA1060 : Move pinvokes to native methods class (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

Platform Invocation methods, such as those that are marked by using the System.Runtime.InteropServices.DllImportAttribute attribute, or methods that are defined by using the Declare keyword in Visual Basic, access unmanaged code. These methods should be of the NativeMethods, SafeNativeMethods, or UnsafeNativeMethods class.

This check corresponds to Roslyn rule CA1060. For full rule details, see the Microsoft website: CA1060.

Properties

Class Name Move pinvokes to native methods class (C#)
Significance reliability
Mnemonic ROSLYN.DESIGN.CA1060
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Move pinvokes to native methods class (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.