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
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

공개 메소드들

메소드 설명
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