Ejemplo n.º 1
0
        public void BlobPartialReadTest()
        {
            var blob = new byte[30];

            for (var i = 0; i < 30; i++)
            {
                blob[i] = (byte)i;
            }
            var value  = _ionValueFactory.NewBlob(blob);
            var reader = new UserTreeReader(value);

            ReaderTestCommon.Blob_PartialRead(30, 7, reader);
        }
Ejemplo n.º 2
0
        public void Blob_PartialRead(int size, int step)
        {
            var blob = new byte[size];

            for (var i = 0; i < size; i++)
            {
                blob[i] = (byte)i;
            }

            var text   = "{{" + Convert.ToBase64String(blob) + "}}";
            var reader = new UserTextReader(text);

            ReaderTestCommon.Blob_PartialRead(size, step, reader);
        }
Ejemplo n.º 3
0
        public void Blob_PartialRead(int size, int step)
        {
            var blob = new byte[size];
            for (var i = 0; i < size; i++)
            {
                blob[i] = (byte)i;
            }

            var memStream = new MemoryStream();
            using (var writer = IonBinaryWriterBuilder.Build(memStream))
            {
                writer.WriteBlob(blob);
                writer.Finish();
            }
            var output = memStream.ToArray();
            var reader = IonReaderBuilder.Build(new MemoryStream(output));
            ReaderTestCommon.Blob_PartialRead(size, step, reader);
        }