/// <summary> /// Serialize streamble into a binary file /// </summary> /// <typeparam name="TKey"></typeparam> /// <typeparam name="TPayload"></typeparam> /// <param name="input"></param> /// <param name="fileName"></param> public static void ToBinaryStream <TKey, TPayload>(this IStreamable <TKey, TPayload> input, string fileName) { using (var buffer = new FileStream(fileName, FileMode.Create)) { input.ToBinaryStream(buffer); } }