WebOperationContext.CreateStreamResponse Method

Definition

Creates a stream formatted message.

Overloads

CreateStreamResponse(Action<Stream>, String)

Creates a stream formatted message.

CreateStreamResponse(Stream, String)

Creates a stream formatted message.

CreateStreamResponse(StreamBodyWriter, String)

Creates a stream formatted message.

CreateStreamResponse(Action<Stream>, String)

Creates a stream formatted message.

C#
public System.ServiceModel.Channels.Message CreateStreamResponse (Action<System.IO.Stream> streamWriter, string contentType);

Parameters

streamWriter
Action<Stream>

The stream writer containing the data to write to the stream.

contentType
String

The content type for the message.

Returns

A stream formatted message.

Applies to

.NET Framework 4.8.1 和其他版本
产品 版本
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CreateStreamResponse(Stream, String)

Creates a stream formatted message.

C#
public System.ServiceModel.Channels.Message CreateStreamResponse (System.IO.Stream stream, string contentType);

Parameters

stream
Stream

The stream containing the data to write to the stream.

contentType
String

The content type of the message.

Returns

A stream formatted message.

Applies to

.NET Framework 4.8.1 和其他版本
产品 版本
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CreateStreamResponse(StreamBodyWriter, String)

Creates a stream formatted message.

C#
public System.ServiceModel.Channels.Message CreateStreamResponse (System.ServiceModel.Channels.StreamBodyWriter bodyWriter, string contentType);

Parameters

bodyWriter
StreamBodyWriter

The stream body writer containing the data to write to the message.

contentType
String

The content type of the message.

Returns

A stream formatted message.

Applies to

.NET Framework 4.8.1 和其他版本
产品 版本
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1