So I have this sort of scheme:
table Request {
a:Sample;
b:Sample;
}
Where table Sample has multiple string vectors and instances of it are pretty big. I have a lot of files on my filesystem with Sample instances, which took me some time to create. Now I want to take 2 files at random, read them into memory and create a new Request which encapsulates them.
I'm working with c# and this line works:
var a = Sample.GetRootAsSample(new ByteBuffer(System.IO.File.ReadAllBytes(pathToA)));
var b = Sample.GetRootAsSample(new ByteBuffer(System.IO.File.ReadAllBytes(pathTob)));
but I can't seem to find a way to just reference them in a new Request instance. I need some way of adding those buffers as is to a new builder and then pass their Offset to the new Request all in the same builder. Building them all over again in a new builder wouldn't be efficient.
How can I achieve this?