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实例。

适用于