NetSamples.Common.IO
Class MessageReader

A reader class that reads XML serialized objects from a stream.

Field Summary
NetSamples.Common.IO.MessageReader.ReadDelegate readDelegate
System.IO.BinaryReader reader
System.Xml.Serialization.XmlSerializer[] serializers

Constructor Summary
MessageReader(System.Type[] messagetypes)
         Constructor
MessageReader(System.IO.Stream input, System.Type[] messagetypes)
         Constructor

Property Summary
System.IO.Stream BaseStream
         Gets / Sets the stream that the reader is using.

Method Summary
System.IAsyncResult BeginRead(System.AsyncCallback callback, object state)
         Starts an asynchronous read
object EndRead(System.IAsyncResult result)
         Ends an asynchronous read
object Read()
         Starts a read operation

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

readDelegate

private NetSamples.Common.IO.MessageReader.ReadDelegate readDelegate


reader

private System.IO.BinaryReader reader


serializers

private System.Xml.Serialization.XmlSerializer[] serializers

Constructor Detail

MessageReader

public MessageReader(System.Type[] messagetypes)

Constructor


MessageReader

public MessageReader(System.IO.Stream input,
                     System.Type[] messagetypes)

Constructor

Property Detail

BaseStream

public System.IO.Stream BaseStream

Gets / Sets the stream that the reader is using.

Method Detail

BeginRead

public System.IAsyncResult BeginRead(System.AsyncCallback callback,
                                     object state)

Starts an asynchronous read


EndRead

public object EndRead(System.IAsyncResult result)

Ends an asynchronous read


Read

public object Read()

Starts a read operation