C# Класс SIL.Utils.TextWriterStream

Implementation of the COM IStream interface that wraps a C# TextWriter object. This is useful for calling the ITsString.WriteAsXml method from C# code.
Наследование: IStream
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Clone ( IStream &pstm ) : void

Creates a new stream object with its own seek pointer that references the same bytes as the original stream.

Commit ( int grfCommitFlags ) : void

Ensures that any changes made to a stream object opened in transacted mode are reflected in the parent storage object. If the stream object is opened in direct mode, this method has no effect other than flushing all memory buffers to the next level storage object. The OLE compound file implementation of streams does not support opening streams in transacted mode.

CopyTo ( IStream pstm, long cb, System pcbRead, System pcbWritten ) : void

Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.

LockRegion ( System.Int64 libOffset, System.Int64 cb, int dwLockType ) : void

Restricts access to a specified range of bytes in the stream. Supporting this functionality is optional because some file systems do not provide it.

Read ( byte pv, int cb, System pcbRead ) : void

Reads a specified number of bytes from the stream object into memory, starting at the current seek pointer.

Revert ( ) : void

Discards all changes that have been made to a transacted stream since the last IStream::Commit call. This method has no effect on streams open in direct mode and streams using the OLE compound file implementation of IStream::Revert.

Seek ( long dlibMove, int dwOrigin, System plibNewPosition ) : void

Changes the seek pointer to a new location relative to the current seek pointer or the beginning or end of the stream.

SetSize ( long libNewSize ) : void

Resizes of the stream object.

Stat ( STATSTG &pstatstg, int grfStatFlag ) : void

Retrieves the STATSTG structure for this stream object.

TextWriterStream ( TextWriter writer ) : System

Constructor.

UnlockRegion ( long libOffset, long cb, int dwLockType ) : void

Removes the access restriction on a range of bytes previously restricted with IStream::LockRegion.

Write ( byte pv, int cb, System pcbWritten ) : void

Writes a specified number of bytes into the stream object starting at the current seek pointer.

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

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

Creates a new stream object with its own seek pointer that references the same bytes as the original stream.
public Clone ( IStream &pstm ) : void
pstm IStream
Результат void

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

Ensures that any changes made to a stream object opened in transacted mode are reflected in the parent storage object. If the stream object is opened in direct mode, this method has no effect other than flushing all memory buffers to the next level storage object. The OLE compound file implementation of streams does not support opening streams in transacted mode.
public Commit ( int grfCommitFlags ) : void
grfCommitFlags int
Результат void

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

Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
public CopyTo ( IStream pstm, long cb, System pcbRead, System pcbWritten ) : void
pstm IStream
cb long
pcbRead System
pcbWritten System
Результат void

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

Restricts access to a specified range of bytes in the stream. Supporting this functionality is optional because some file systems do not provide it.
public LockRegion ( System.Int64 libOffset, System.Int64 cb, int dwLockType ) : void
libOffset System.Int64
cb System.Int64
dwLockType int
Результат void

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

Reads a specified number of bytes from the stream object into memory, starting at the current seek pointer.
public Read ( byte pv, int cb, System pcbRead ) : void
pv byte
cb int
pcbRead System
Результат void

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

Discards all changes that have been made to a transacted stream since the last IStream::Commit call. This method has no effect on streams open in direct mode and streams using the OLE compound file implementation of IStream::Revert.
public Revert ( ) : void
Результат void

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

Changes the seek pointer to a new location relative to the current seek pointer or the beginning or end of the stream.
public Seek ( long dlibMove, int dwOrigin, System plibNewPosition ) : void
dlibMove long
dwOrigin int
plibNewPosition System
Результат void

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

Resizes of the stream object.
public SetSize ( long libNewSize ) : void
libNewSize long
Результат void

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

Retrieves the STATSTG structure for this stream object.
public Stat ( STATSTG &pstatstg, int grfStatFlag ) : void
pstatstg System.Runtime.InteropServices.ComTypes.STATSTG
grfStatFlag int
Результат void

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

Constructor.
public TextWriterStream ( TextWriter writer ) : System
writer System.IO.TextWriter
Результат System

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

Removes the access restriction on a range of bytes previously restricted with IStream::LockRegion.
public UnlockRegion ( long libOffset, long cb, int dwLockType ) : void
libOffset long
cb long
dwLockType int
Результат void

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

Writes a specified number of bytes into the stream object starting at the current seek pointer.
public Write ( byte pv, int cb, System pcbWritten ) : void
pv byte
cb int
pcbWritten System
Результат void