C# Класс MailKit.DuplexStream

A duplex stream.
Наследование: Stream
Показать файл Открыть проект

Открытые методы

Метод Описание
DuplexStream ( Stream istream, Stream ostream ) : System

Initializes a new instance of the MailKit.DuplexStream class.

Flush ( ) : void

Clears all output buffers for this stream and causes any buffered data to be written to the underlying device.

Read ( byte buffer, int offset, int count ) : int

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.

Seek ( long offset, SeekOrigin origin ) : long

Sets the position within the current stream.

SetLength ( long value ) : void

Sets the length of the stream.

Write ( byte buffer, int offset, int count ) : void

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the DuplexStream and optionally releases the managed resources.

Приватные методы

Метод Описание
CheckDisposed ( ) : void
ValidateArguments ( byte buffer, int offset, int count ) : void

Описание методов

Dispose() защищенный Метод

Releases the unmanaged resources used by the DuplexStream and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only the unmanaged resources.
Результат void

DuplexStream() публичный Метод

Initializes a new instance of the MailKit.DuplexStream class.
/// is null. /// -or- /// is null. ///
public DuplexStream ( Stream istream, Stream ostream ) : System
istream Stream The stream to use for input.
ostream Stream The stream to use for output.
Результат System

Flush() публичный Метод

Clears all output buffers for this stream and causes any buffered data to be written to the underlying device.
/// The stream has been disposed. /// /// The stream does not support writing. /// /// An I/O error occurred. ///
public Flush ( ) : void
Результат void

Read() публичный Метод

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.
/// is null. /// /// is less than zero or greater than the length of . /// -or- /// The is not large enough to contain bytes strting /// at the specified . /// /// The stream has been disposed. /// /// An I/O error occurred. ///
public Read ( byte buffer, int offset, int count ) : int
buffer byte The buffer.
offset int The buffer offset.
count int The number of bytes to read.
Результат int

Seek() публичный Метод

Sets the position within the current stream.
/// The stream does not support seeking. ///
public Seek ( long offset, SeekOrigin origin ) : long
offset long The offset into the stream relative to the .
origin SeekOrigin The origin to seek from.
Результат long

SetLength() публичный Метод

Sets the length of the stream.
/// The stream does not support setting the length. ///
public SetLength ( long value ) : void
value long The desired length of the stream in bytes.
Результат void

Write() публичный Метод

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.
/// is null. /// /// is less than zero or greater than the length of . /// -or- /// The is not large enough to contain bytes strting /// at the specified . /// /// The stream has been disposed. /// /// The stream does not support writing. /// /// An I/O error occurred. ///
public Write ( byte buffer, int offset, int count ) : void
buffer byte The buffer to write.
offset int The offset of the first byte to write.
count int The number of bytes to write.
Результат void