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
。