예제 #1
0
 public ResultReadDataNode(int count, ConvertSetting convertSetting,
     ReadCompletedEventHandler Completed, ReadErrorEventHandler Error,
     ReadCompletedEventHandler resultCompleted, ReadErrorEventHandler resultError,
     object state)
     : base(new byte[count], 0, count, Completed, Error, state)
 {
     this.ConvertSetting = convertSetting;
     this.ResultCompleted = resultCompleted;
     this.ResultError = resultError;
 }
예제 #2
0
 public ResultReadDataNode(int count, BinaryConverter converter, Encoding encoding, 
     ReadCompletedEventHandler Completed, ReadErrorEventHandler Error,
     ReadCompletedEventHandler resultCompleted, ReadErrorEventHandler resultError,
     object state)
     : base(new byte[count], 0, count, Completed, Error, state)
 {
     this.ConvertSetting = new ConvertSetting(converter, encoding);
     this.ResultCompleted = resultCompleted;
     this.ResultError = resultError;
 }
예제 #3
0
 public ReadBytesNode(byte[] buffer, int offset, int count, ReadCompletedEventHandler dataCompleted, 
     ReadErrorEventHandler dataError, object state)
 {
     this.Buffer = buffer;
     this.Offset = offset;
     this.TotalCount = count;
     this.ReadCount = 0;
     this.DataCompleted = dataCompleted;
     this.DataError = dataError;
     this.State = state;
 }
예제 #4
0
 public void ReadDouble(ConvertSetting convertSetting, ReadCompletedEventHandler resultCompleted, ReadErrorEventHandler resultError, object state)
 {
     ReadBytes(new ResultReadDataNode(8, convertSetting, new ReadCompletedEventHandler(ReadDoubleCompleted), null, resultCompleted, resultError, state));
 }
예제 #5
0
 public ReadStringState(ReadCompletedEventHandler resultCompleted, ReadErrorEventHandler resultError, object state)
 {
     this.State = state;
     this.ResultCompleted = resultCompleted;
     this.ResultError = resultError;
 }
예제 #6
0
 public void ReadByte(ReadCompletedEventHandler resultCompleted, ReadErrorEventHandler resultError, object state)
 {
     ReadBytes(new ResultReadDataNode(1, null, new ReadCompletedEventHandler(ReadByteCompleted), null, resultCompleted, resultError, state));
 }
예제 #7
0
 public void ReadString(int count, ConvertSetting convertSetting, ReadCompletedEventHandler resultCompleted, 
     ReadErrorEventHandler resultError, object state)
 {
     ResultReadDataNode dataNode = new ResultReadDataNode(count, convertSetting,
         new ReadCompletedEventHandler(ReadStringCompleted), null, resultCompleted, resultError, state);
     if (count > 0)
     {
         ReadBytes(dataNode);
     }
     else
     {
         dataNode.DoResultCompleted();
     }
 }
예제 #8
0
 public void ReadString(ConvertSetting convertSetting, ReadCompletedEventHandler resultCompleted, ReadErrorEventHandler resultError, object state)
 {
     ReadInt32(convertSetting, new ReadCompletedEventHandler(ReadStringLengthCompleted), null, new ReadStringState(resultCompleted, resultError, state));
 }