Ejemplo n.º 1
0
 public void Write(IPtpIpCommand container)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         container.Write(ms);
         _inerStream.Write(ms.ToArray(), 0, (int)ms.Length);
         //if(container.Header.Length!=ms.Length)
         //    throw new Exception("Wrong length");
         _inerStream.Flush();
     }
 }
Ejemplo n.º 2
0
 public void Write(IPtpIpCommand container)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         container.Write(ms);
         _inerStream.Write(ms.ToArray(), 0, (int)ms.Length);
         //if(container.Header.Length!=ms.Length)
         //    throw new Exception("Wrong length");
         _inerStream.Flush();
     }
 }