Exemple #1
0
 public static byte[] ToBytes(this IBFast bf)
 {
     using (var mem = new MemoryStream()) {
         bf.Write(mem);
         return(mem.ToArray());
     }
 }
Exemple #2
0
 public static void WriteToFile(this IBFast bf, string path)
 {
     using (var f = File.OpenWrite(path))
         bf.Write(f);
 }
Exemple #3
0
 public static Stream Write(this IBFast bf, Stream stream)
 {
     using (var bw = new BinaryWriter(stream))
         bf.Write(bw);
     return(stream);
 }