ServiceHealthBehavior.TryParseHttpStatusCodeQueryParameter 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试分析查询字符串变量的 HTTP 状态代码,并返回一个值,该值指示分析操作是否成功。
protected:
static bool TryParseHttpStatusCodeQueryParameter(System::String ^ parameterName, System::String ^ parameter, System::Net::HttpStatusCode defaultErrorCode, [Runtime::InteropServices::Out] System::Net::HttpStatusCode % result);
protected static bool TryParseHttpStatusCodeQueryParameter (string parameterName, string parameter, System.Net.HttpStatusCode defaultErrorCode, out System.Net.HttpStatusCode result);
static member TryParseHttpStatusCodeQueryParameter : string * string * System.Net.HttpStatusCode * HttpStatusCode -> bool
Protected Shared Function TryParseHttpStatusCodeQueryParameter (parameterName As String, parameter As String, defaultErrorCode As HttpStatusCode, ByRef result As HttpStatusCode) As Boolean
参数
- parameterName
- String
此方法尝试分析值的参数名。
- parameter
- String
查询字符串的字段/值对。
- defaultErrorCode
- HttpStatusCode
如果分析操作失败,则为要分配给参数的值。
- result
- HttpStatusCode
返回方法时,分析的 HTTP 状态代码参数的值。
返回
如果分析操作成功,则为 true;否则为 false。