最佳答案
我在 C # 项目中有一个 httpsystemdefinitions.cs 文件,它基本上描述了旧的 windows ISAPI,可以通过托管代码使用。
这包括与 ISAPI 相关的结构的完整集合,而不是全部或由代码使用。在编译时,这些结构的所有字段成员都会发出如下警告:-
警告字段‘ UnionSquare.ISAPI.HTTP _ FILTER _ PREPROC _ HEADERS. SetHeader’永远不会被分配,并且它的默认值始终为 null
或者
警告字段“ UnionSquare.ISAPI.HTTP _ FILTER _ PREPROC _ HEADERS. HttpStatus”从不使用
Can these be disabled with #pragma warning disable
? If so what would the corresponding error numbers be? If not is there anything else I can do? Bear in mind that I only what to do this for this file, its important that I get see warnings like these coming from other files.
剪辑
示例结构:-
struct HTTP_FILTER_PREPROC_HEADERS
{
//
// For SF_NOTIFY_PREPROC_HEADERS, retrieves the specified header value.
// Header names should include the trailing ':'. The special values
// 'method', 'url' and 'version' can be used to retrieve the individual
// portions of the request line
//
internal GetHeaderDelegate GetHeader;
internal SetHeaderDelegate SetHeader;
internal AddHeaderDelegate AddHeader;
UInt32 HttpStatus; // New in 4.0, status for SEND_RESPONSE
UInt32 dwReserved; // New in 4.0
}