コード例 #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();
     }
 }
コード例 #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();
     }
 }