public override void Write(byte[] buffer, int offset, int count)
 {
     WriteCalledWithParameters = new BufferOffsetCountParameters
     {
         buffer = buffer,
         offset = offset,
         count  = count
     };
     WriteTestCallback(buffer, offset, count);
 }
        public override int Read(byte[] buffer, int offset, int count)
        {
            ReadCalledWithParameters = new BufferOffsetCountParameters
            {
                buffer = buffer,
                offset = offset,
                count  = count
            };
            var contentBytes = ReadTestCallback(buffer, offset, count);

            for (int index = 0; index < contentBytes.Length; index++)
            {
                buffer[index] = contentBytes[index];
            }
            return(contentBytes.Length);
        }
 public override void Write(byte[] buffer, int offset, int count)
 {
     WriteCalledWithParameters = new BufferOffsetCountParameters
                                     {
                                         buffer = buffer,
                                         offset = offset,
                                         count = count
                                     };
     WriteTestCallback(buffer, offset, count);
 }
 public override int Read(byte[] buffer, int offset, int count)
 {
     ReadCalledWithParameters = new BufferOffsetCountParameters
     {
         buffer = buffer,
         offset = offset,
         count = count
     };
     var contentBytes = ReadTestCallback(buffer, offset, count);
     for (int index = 0; index < contentBytes.Length; index++)
     {
         buffer[index] = contentBytes[index];
     }
     return contentBytes.Length;
 }