Beispiel #1
0
 public static IReadOnlyList <T> FactoryByLazyParse <T>(
     ReadOnlyMemorySlice <byte> mem,
     BinaryOverlayFactoryPackage package,
     byte countLength,
     PluginBinaryOverlay.Factory <T> getter)
 {
     return(FactoryByLazyParse(mem.Slice(countLength), package, getter));
 }
Beispiel #2
0
 public static IReadOnlyList <T> FactoryByLazyParse <T>(
     ReadOnlyMemorySlice <byte> mem,
     BinaryOverlayFactoryPackage package,
     PluginBinaryOverlay.Factory <T> getter)
 {
     return(new BinaryOverlayLazyList <T>(
                mem,
                package,
                (m, p) =>
     {
         var ret = new List <T>();
         using (var stream = new OverlayStream(m, package))
         {
             while (!stream.Complete)
             {
                 ret.Add(getter(stream, p));
             }
         }
         return ret;
     }));
 }