Click or drag to resize
MimeKit

ImapFolderCommitStream Method


Namespace: MailKit.Net.Imap
Assembly: MailKit (in MailKit.dll) Version: 4.3.0
Syntax
C#
protected virtual Stream CommitStream(
	Stream stream,
	UniqueId uid,
	string section,
	int offset,
	int length
)

Parameters

stream  Stream
The stream.
uid  UniqueId
The unique identifier of the message.
section  String
The section of the message that the stream represents.
offset  Int32
The starting offset of the message section.
length  Int32
The length of the stream, measured in bytes.

Return Value

Stream
The stream.
Remarks

Commits a stream returned by CreateStream(NullableUniqueId, String, Int32, Int32).

This method is called only after both the message data has successfully been written to the stream returned by CreateStream(NullableUniqueId, String, Int32, Int32) and a UniqueId has been obtained for the associated message.

For subclasses implementing caching, this method should be used for committing the stream to their cache.

Note  Note
Subclass implementations may take advantage of the fact that CommitStream(Stream, UniqueId, String, Int32, Int32) allows returning a new Stream reference if they move a file on the file system and wish to return a new FileStream based on the new path, for example.
See Also