共用方式為


DataServiceContext.SetSaveStream 方法 (Object, String, Stream, Boolean, String)

為指定的實體設定二進位資料流。

命名空間:  System.Data.Services.Client
組件:  Microsoft.Data.Services.Client (在 Microsoft.Data.Services.Client.dll 中)

語法

'宣告
Public Sub SetSaveStream ( _
    entity As Object, _
    name As String, _
    stream As Stream, _
    closeStream As Boolean, _
    contentType As String _
)
'用途
Dim instance As DataServiceContext
Dim entity As Object
Dim name As String
Dim stream As Stream
Dim closeStream As Boolean
Dim contentType As String

instance.SetSaveStream(entity, name, stream, _
    closeStream, contentType)
public void SetSaveStream(
    Object entity,
    string name,
    Stream stream,
    bool closeStream,
    string contentType
)
public:
void SetSaveStream(
    Object^ entity, 
    String^ name, 
    Stream^ stream, 
    bool closeStream, 
    String^ contentType
)
member SetSaveStream : 
        entity:Object * 
        name:string * 
        stream:Stream * 
        closeStream:bool * 
        contentType:string -> unit 
public function SetSaveStream(
    entity : Object, 
    name : String, 
    stream : Stream, 
    closeStream : boolean, 
    contentType : String
)

參數

  • entity
    型別:System.Object
    二進位資料流所屬的實體。
  • name
    型別:System.String
    要儲存之二進位資料流的名稱。
  • contentType
    型別:System.String
    要求訊息的 Content-Type 標頭值。

備註

SetSaveStream 方法儲存的二進位資料流是屬於 entity 的具名媒體資源,此實體稱為媒體連結項目。

SetSaveStream(Object, String, Stream, Boolean, String) 方法是用來儲存具名資料流。

請參閱

參考

DataServiceContext 類別

SetSaveStream 多載

System.Data.Services.Client 命名空間