public void Struct_OneBlob() { var data = DirStructure.OwnTestFileAsBytes("binary/struct_oneblob.bindat"); var reader = new UserBinaryReader(new MemoryStream(data)); ReaderTestCommon.Struct_OneBlob(reader); }
public void Struct_OneBlob() { var data = DirStructure.OwnTestFileAsBytes("text/struct_oneblob.ion"); var reader = new UserTextReader(new MemoryStream(data)); ReaderTestCommon.Struct_OneBlob(reader); reader = new UserTextReader(Encoding.UTF8.GetString(data)); ReaderTestCommon.Struct_OneBlob(reader); }
public void BlobTest() { //Must be in a struct: // { blobbbb: {{data}} } var arrayOfbytes = Enumerable.Repeat <byte>(1, 100).ToArray(); ReadOnlySpan <byte> bytes = new ReadOnlySpan <byte>(arrayOfbytes); var blob = _ionValueFactory.NewBlob(bytes); var value = new IonStruct { { "blobbbb", blob } }; var reader = new UserTreeReader(value); ReaderTestCommon.Struct_OneBlob(reader); }