/// <summary>
 /// Creates a pair of streams that can be passed to two parties
 /// to allow for interaction with each other.
 /// </summary>
 /// <returns>A pair of streams.</returns>
 public static Tuple<Stream, Stream> CreateStreams()
 {
     var stream1 = new MyStream();
     var stream2 = new MyStream();
     stream1.SetOtherStream(stream2);
     stream2.SetOtherStream(stream1);
     return Tuple.Create<Stream, Stream>(stream1, stream2);
 }
        /// <summary>
        /// Creates a pair of streams that can be passed to two parties
        /// to allow for interaction with each other.
        /// </summary>
        /// <returns>A pair of streams.</returns>
        public static Tuple <Stream, Stream> CreateStreams()
        {
            var stream1 = new MyStream();
            var stream2 = new MyStream();

            stream1.SetOtherStream(stream2);
            stream2.SetOtherStream(stream1);
            return(Tuple.Create <Stream, Stream>(stream1, stream2));
        }