C# 클래스 wpf_player.ObservableStream

This class extends memory stream to allow waiting state management and position change notify. Using the WaitForMore method, a event will be launched when the needed data has been read. Position Changed event will be launched when more data has been written on the stream: the maximum resolution for this events is 1024 byte; if the position changed for less than 1024 byte the event won't be raised.
상속: System.IO.MemoryStream
파일 보기 프로젝트 열기: zencoders/sambatyon 1 사용 예제들

공개 메소드들

메소드 설명
ObservableStream ( ) : System

Default constructor

ObservableStream ( byte buffer ) : System

Byte-buffer constructor

ObservableStream ( byte buffer, bool writable ) : System

See MSDN Reference for Memory Stream for Details

ObservableStream ( byte buffer, int index, int count ) : System

See MSDN Reference for Memory Stream for Details

ObservableStream ( byte buffer, int index, int count, bool writable ) : System

See MSDN Reference for Memory Stream for Details

ObservableStream ( byte buffer, int index, int count, bool writable, bool isVisible ) : System

See MSDN Reference for Memory Stream for Details

ObservableStream ( int capacity ) : System

Capacity contructor. Create a buffer with the given capacity

WaitForMore ( int how_many = 15000 ) : void

Sets the waiting state for the stream and sets the position waited.

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

This method after the call of the base class implementation uses the launchEvent method to raise the right event See MSDN Reference for Memory Stream for Details.

WriteByte ( byte value ) : void

This method after the call of the base class implementation uses the launchEvent method to raise the right event See MSDN Reference for Memory Stream for Details.

보호된 메소드들

메소드 설명
OnPositionChanges ( EventArgs args ) : void

This method calls the event handler for the position changed event

OnWaitedPositionReached ( EventArgs args ) : void

This method calls the event handler for the waited position reached event

비공개 메소드들

메소드 설명
launchEvent ( ) : void

This method is used to launch stream events. This performs check for waiting state and last launched position and raise the right event in the right moment.

메소드 상세

ObservableStream() 공개 메소드

Default constructor
public ObservableStream ( ) : System
리턴 System

ObservableStream() 공개 메소드

Byte-buffer constructor
public ObservableStream ( byte buffer ) : System
buffer byte Byte buffer used by the stream
리턴 System

ObservableStream() 공개 메소드

See MSDN Reference for Memory Stream for Details
public ObservableStream ( byte buffer, bool writable ) : System
buffer byte
writable bool
리턴 System

ObservableStream() 공개 메소드

See MSDN Reference for Memory Stream for Details
public ObservableStream ( byte buffer, int index, int count ) : System
buffer byte
index int
count int
리턴 System

ObservableStream() 공개 메소드

See MSDN Reference for Memory Stream for Details
public ObservableStream ( byte buffer, int index, int count, bool writable ) : System
buffer byte
index int
count int
writable bool
리턴 System

ObservableStream() 공개 메소드

See MSDN Reference for Memory Stream for Details
public ObservableStream ( byte buffer, int index, int count, bool writable, bool isVisible ) : System
buffer byte
index int
count int
writable bool
isVisible bool
리턴 System

ObservableStream() 공개 메소드

Capacity contructor. Create a buffer with the given capacity
public ObservableStream ( int capacity ) : System
capacity int Capacity of the stream buffer
리턴 System

OnPositionChanges() 보호된 메소드

This method calls the event handler for the position changed event
protected OnPositionChanges ( EventArgs args ) : void
args System.EventArgs Arguments that will be passed to the handler
리턴 void

OnWaitedPositionReached() 보호된 메소드

This method calls the event handler for the waited position reached event
protected OnWaitedPositionReached ( EventArgs args ) : void
args System.EventArgs Arguments that will be passed to the handler
리턴 void

WaitForMore() 공개 메소드

Sets the waiting state for the stream and sets the position waited.
public WaitForMore ( int how_many = 15000 ) : void
how_many int Number of bytes needed. Default is 15000
리턴 void

Write() 공개 메소드

This method after the call of the base class implementation uses the launchEvent method to raise the right event See MSDN Reference for Memory Stream for Details.
public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
리턴 void

WriteByte() 공개 메소드

This method after the call of the base class implementation uses the launchEvent method to raise the right event See MSDN Reference for Memory Stream for Details.
public WriteByte ( byte value ) : void
value byte
리턴 void