This commit suppresses some warnings from the fields that represent
imported functions from C.
Depends on D8612
I was looking at the kind of warnings you are suppressing and I came across these docs:
It talks about NativeMethods classes which are treated specially by StyleCop. Have you tried that? If all native delegates are put inside an internal NativeMethods class, code might be much cleaner (and you won't need to suppress so many warnings for each native method).
If that does not work, won't it still be shorter to group all native delegates inside a #pragma warning block?
#pragma warning disable SA1307 // AccessibleFieldsMustBeginWithUpperCaseLetter ... #pragma warning restore SA1307
This tab belongs to line 62 below (otherwise there are two tabs here and none in front of public delegate).