WebOperationContext.CreateTextResponse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a text formatted message.
Overloads
CreateTextResponse(String, String, Encoding) |
Creates a text formatted message. |
CreateTextResponse(String, String) |
Creates a text formatted message. |
CreateTextResponse(Action<TextWriter>, String, Encoding) |
Creates a text formatted message. |
CreateTextResponse(String) |
Creates a text formatted response message. |
CreateTextResponse(Action<TextWriter>, String) |
Creates a text formatted message. |
CreateTextResponse(String, String, Encoding)
Creates a text formatted message.
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
Parameters
- text
- String
The text to write to the message.
- contentType
- String
The content type of the message.
- encoding
- Encoding
The encoding to use.
Returns
A text formatted message.
Applies to
CreateTextResponse(String, String)
Creates a text formatted message.
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
Parameters
- text
- String
The text to write to the message.
- contentType
- String
The content type of the message.
Returns
A text formatted message.
Applies to
CreateTextResponse(Action<TextWriter>, String, Encoding)
Creates a text formatted message.
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
Parameters
- textWriter
- Action<TextWriter>
A delegate that writes the text data.
- contentType
- String
The content type of the message.
- encoding
- Encoding
The encoding to use.
Returns
A text formatted message.
Applies to
CreateTextResponse(String)
Creates a text formatted response message.
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
Parameters
- text
- String
The text to write to the message.
Returns
A text formatted message.
Applies to
CreateTextResponse(Action<TextWriter>, String)
Creates a text formatted message.
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
Parameters
- textWriter
- Action<TextWriter>
A delegate that writes the text data.
- contentType
- String
The content type for the message.
Returns
A text formatted message.