MimePart.SetContentStream method (ContentTransferEncoding, Stream, CachingMode)
The SetContentStream method sets the content of this MimePart object.
Namespace: Microsoft.Exchange.Data.Mime
Assembly: Microsoft.Exchange.Data.Common (in Microsoft.Exchange.Data.Common.dll)
Syntax
'Declaration
Public Sub SetContentStream ( _
transferEncoding As ContentTransferEncoding, _
contentStream As Stream, _
cachingMode As CachingMode _
)
'Usage
Dim instance As MimePart
Dim transferEncoding As ContentTransferEncoding
Dim contentStream As Stream
Dim cachingMode As CachingMode
instance.SetContentStream(transferEncoding, _
contentStream, cachingMode)
public void SetContentStream(
ContentTransferEncoding transferEncoding,
Stream contentStream,
CachingMode cachingMode
)
Parameters
transferEncoding
Type: Microsoft.Exchange.Data.Mime.ContentTransferEncodingA ContentTransferEncoding enumeration value that specifies the content transfer encoding to use when setting the content by using contentStream.
contentStream
Type: System.IO.StreamA stream that contains the content.
cachingMode
Type: Microsoft.Exchange.Data.Mime.CachingModeA CachingMode enumeration value that specifies how to treat contentStream.
Remarks
The Content-Transfer-Encoding header will be updated to match the value of transferEncoding. If transferEncoding is ContentTransferEncoding.Unknown, no change will be made to the current content-transfer-encoding header.