예제 #1
0
 /// <summary>
 /// This constructor is only used on the Gateway HTTP path so that we can clean up the stream.
 /// </summary>
 /// <param name="stream">A stream which will be used as body stream.</param>
 /// <param name="streamDisposalResponsibility">Indicates if the stream passed in should be disposed by the
 /// client library, or by the calling application.</param>
 internal Message(Stream stream, StreamDisposalResponsibility streamDisposalResponsibility)
     : this(stream)
 {
     _streamDisposalResponsibility = streamDisposalResponsibility;
 }
예제 #2
0
 /// <summary>
 /// Constructor which uses the input byte array as the body.
 /// </summary>
 /// <remarks>User should treat the input byte array as immutable when sending the message.</remarks>
 /// <param name="byteArray">A byte array which will be used to form the body stream.</param>
 public Message(byte[] byteArray)
     : this(new MemoryStream(byteArray))
 {
     // Reset the owning of the stream
     _streamDisposalResponsibility = StreamDisposalResponsibility.Sdk;
 }