Export (0) Print
Expand All

DataServiceContext.SetSaveStream Method (Object, String, Stream, Boolean, DataServiceRequestArgs)

WCF Data Services 5.0

Sets a named binary data stream that belongs to the specified entity, with the specified headers in the request message.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

public void SetSaveStream(
	Object entity,
	string name,
	Stream stream,
	bool closeStream,
	DataServiceRequestArgs args
)

Parameters

entity
Type: System.Object
The entity to which the binary stream belongs.
name
Type: System.String
The name of the binary stream to save.
stream
Type: System.IO.Stream
The Stream from which to read the binary data.
closeStream
Type: System.Boolean
A Boolean value that determines whether the data stream is closed when the SaveChanges method is completed.
args
Type: System.Data.Services.Client.DataServiceRequestArgs
An instance of the DataServiceRequestArgs class that contains settings for the HTTP request message.

The SetSaveStream method saves a binary stream that is a named Media Resource that belongs to the entity, which is called a Media Link Entry.

The SetSaveStream(Object, String, Stream, Boolean, DataServiceRequestArgs) method is used to save a named stream.

Show:
© 2014 Microsoft