WebOperationContext.CreateTextResponse 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立文字格式的訊息。
多載
| 名稱 | Description |
|---|---|
| CreateTextResponse(String, String, Encoding) |
建立文字格式的訊息。 |
| CreateTextResponse(String, String) |
建立文字格式的訊息。 |
| CreateTextResponse(Action<TextWriter>, String, Encoding) |
建立文字格式的訊息。 |
| CreateTextResponse(String) |
建立文字格式的回應訊息。 |
| CreateTextResponse(Action<TextWriter>, String) |
建立文字格式的訊息。 |
CreateTextResponse(String, String, Encoding)
建立文字格式的訊息。
public:
System::ServiceModel::Channels::Message ^ CreateTextResponse(System::String ^ text, System::String ^ contentType, System::Text::Encoding ^ encoding);
public System.ServiceModel.Channels.Message CreateTextResponse(string text, string contentType, System.Text.Encoding encoding);
member this.CreateTextResponse : string * string * System.Text.Encoding -> System.ServiceModel.Channels.Message
Public Function CreateTextResponse (text As String, contentType As String, encoding As Encoding) As Message
參數
- text
- String
要寫給訊息的文字。
- contentType
- String
訊息的內容類型。
- encoding
- Encoding
要用的編碼。
傳回
一則簡訊格式。
適用於
CreateTextResponse(String, String)
建立文字格式的訊息。
public:
System::ServiceModel::Channels::Message ^ CreateTextResponse(System::String ^ text, System::String ^ contentType);
public System.ServiceModel.Channels.Message CreateTextResponse(string text, string contentType);
member this.CreateTextResponse : string * string -> System.ServiceModel.Channels.Message
Public Function CreateTextResponse (text As String, contentType As String) As Message
參數
- text
- String
要寫給訊息的文字。
- contentType
- String
訊息的內容類型。
傳回
一則簡訊格式。
適用於
CreateTextResponse(Action<TextWriter>, String, Encoding)
建立文字格式的訊息。
public:
System::ServiceModel::Channels::Message ^ CreateTextResponse(Action<System::IO::TextWriter ^> ^ textWriter, System::String ^ contentType, System::Text::Encoding ^ encoding);
public System.ServiceModel.Channels.Message CreateTextResponse(Action<System.IO.TextWriter> textWriter, string contentType, System.Text.Encoding encoding);
member this.CreateTextResponse : Action<System.IO.TextWriter> * string * System.Text.Encoding -> System.ServiceModel.Channels.Message
Public Function CreateTextResponse (textWriter As Action(Of TextWriter), contentType As String, encoding As Encoding) As Message
參數
- textWriter
- Action<TextWriter>
一個負責撰寫文字資料的代表。
- contentType
- String
訊息的內容類型。
- encoding
- Encoding
要用的編碼。
傳回
一則簡訊格式。
適用於
CreateTextResponse(String)
建立文字格式的回應訊息。
public:
System::ServiceModel::Channels::Message ^ CreateTextResponse(System::String ^ text);
public System.ServiceModel.Channels.Message CreateTextResponse(string text);
member this.CreateTextResponse : string -> System.ServiceModel.Channels.Message
Public Function CreateTextResponse (text As String) As Message
參數
- text
- String
要寫給訊息的文字。
傳回
一則簡訊格式。
適用於
CreateTextResponse(Action<TextWriter>, String)
建立文字格式的訊息。
public:
System::ServiceModel::Channels::Message ^ CreateTextResponse(Action<System::IO::TextWriter ^> ^ textWriter, System::String ^ contentType);
public System.ServiceModel.Channels.Message CreateTextResponse(Action<System.IO.TextWriter> textWriter, string contentType);
member this.CreateTextResponse : Action<System.IO.TextWriter> * string -> System.ServiceModel.Channels.Message
Public Function CreateTextResponse (textWriter As Action(Of TextWriter), contentType As String) As Message
參數
- textWriter
- Action<TextWriter>
一個負責撰寫文字資料的代表。
- contentType
- String
訊息的內容類型。
傳回
一則簡訊格式。