示例#1
0
文件: Message.cs 项目: nistec/MQueue
 /// <summary>
 /// Set the given stream to body stream.
 /// </summary>
 /// <param name="ns"></param>
 /// <param name="typeName"></param>
 /// <param name="copy"></param>
 public void SetBody(NetStream ns, string typeName, bool copy = true)
 {
     _TypeName = (!string.IsNullOrEmpty(typeName)) ? typeName : typeof(object).FullName;
     if (ns != null)
     {
         if (copy)
         {
             ns.CopyTo(m_BodyStream);
         }
         else
         {
             m_BodyStream = ns;
         }
     }
 }