Beispiel #1
0
        public override void Close()
        {
            CrossStream other = OtherSide;

            CloseBase();
            if (other != null)
            {
                other.CloseBase();
            }
        }
Beispiel #2
0
        public override void Write(byte[] buffer, int offset, int count)
        {
            CrossStream other = OtherSide;

            if (other == null)
            {
                throw new ObjectDisposedException("CrossStream", "The stream has been closed");
            }
            other.AddReadBufferCopy(buffer, offset, count);
        }
Beispiel #3
0
 public static CrossStream CreatePair(out CrossStream stream1, out CrossStream stream2)
 {
     return(stream1 = CreatePair(out stream2));
 }
Beispiel #4
0
 protected CrossStream(CrossStream other)
 {
     OtherSide = other;
 }
Beispiel #5
0
 public CrossStream()
 {
     OtherSide = new CrossStream(this);
 }
Beispiel #6
0
 public static CrossStream CreatePair(out CrossStream stream2)
 {
     stream2 = new CrossStream();
     return(stream2.OtherSide);
 }