/// <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; } } }