IOutputChannelStore.CreateChannelAsync Method

Definition

Creates a new output channel and supplies the Stream used to write to it.

public:
 System::Threading::Tasks::Task ^ CreateChannelAsync(System::String ^ id, System::String ^ displayNameResourceId, System::IO::Pipelines::PipeReader ^ pipeReader, System::Text::Encoding ^ encoding, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task CreateChannelAsync (string id, string displayNameResourceId, System.IO.Pipelines.PipeReader pipeReader, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken);
abstract member CreateChannelAsync : string * string * System.IO.Pipelines.PipeReader * System.Text.Encoding * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CreateChannelAsync (id As String, displayNameResourceId As String, pipeReader As PipeReader, encoding As Encoding, cancellationToken As CancellationToken) As Task

Parameters

id
String

A non-localized, unique string used to identify the created channel.

displayNameResourceId
String

The ID of the resource that should be used as the DisplayName for this channel. This ID will be exchanged for the actual DisplayName value by calling back to the client via the IStringResourceDictionary interface.

pipeReader
PipeReader

The reader for the pipe that the store will use to receive data from the channel. When the writer of the pipe is completed, the channel will close.

encoding
Encoding

The WebName from the Encoding the caller will use for encoding characters over the pipeReader.

cancellationToken
CancellationToken

A cancellation token.

Returns

A task that represents the completion of creating the channel.

Exceptions

Thrown when id conflicts with an open channel.

Applies to