Example #1
0
 private static Func<byte[]> LoadDataFromReader(ObjectReader reader)
 {
     return () =>
     {
         var bytes = new byte[reader.Size];
         reader.Load(stream => stream.Read(bytes, 0, bytes.Length));
         return bytes;
     };
 }
Example #2
0
 private static Blob CreateBlob(string id, ObjectReader reader)
 {
     return new Blob(id, reader.Size, LoadDataFromReader(reader));
 }