共用方式為


HttpResponseMessageExtensionMethods.ToMessage(HttpResponseMessage) 方法

定義

Message 執行個體建立 HttpResponseMessage 執行個體。

public:
[System::Runtime::CompilerServices::Extension]
 static System::ServiceModel::Channels::Message ^ ToMessage(System::Net::Http::HttpResponseMessage ^ httpResponseMessage);
public static System.ServiceModel.Channels.Message ToMessage (this System.Net.Http.HttpResponseMessage httpResponseMessage);
static member ToMessage : System.Net.Http.HttpResponseMessage -> System.ServiceModel.Channels.Message
<Extension()>
Public Function ToMessage (httpResponseMessage As HttpResponseMessage) As Message

參數

httpResponseMessage
HttpResponseMessage

要從其中建立 HttpResponseMessage 執行個體的 Message

傳回

Message 執行個體。

備註

實例 Message 可以讀取、寫入和複製,就像傳統 ByteStreamMessage 實例一樣。 實例Message也可以「讀取」,藉由呼叫ToHttpResponseMessage擴充方法來擷取原始HttpResponseMessage實例。

適用於