ImapFolderCommitStream Method

Definition

Namespace: MailKit.Net.Imap
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
protected virtual Stream CommitStream(
	Stream stream,
	UniqueId uid,
	string section,
	long offset,
	long 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  Int64
The starting offset of the message section.
length  Int64
The length of the stream, measured in bytes.

Return Value

Stream
The stream.

Remarks

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

This method is called only after both the message data has successfully been written to the stream returned by CreateStream(NullableUniqueId, String, Int64, Int64) 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

Subclass implementations may take advantage of the fact that CommitStream(Stream, UniqueId, String, Int64, Int64) 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