From 756e5bf4d7bc9958e394a93cfa0a4a90c06d68ff Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 13 Oct 2016 17:40:59 -0700 Subject: [PATCH] [DatFile] Remove serialization code --- SabreTools.Helper/Objects/Dat/DatFile.cs | 42 ------------------------ 1 file changed, 42 deletions(-) diff --git a/SabreTools.Helper/Objects/Dat/DatFile.cs b/SabreTools.Helper/Objects/Dat/DatFile.cs index 03bca9d0..34b88947 100644 --- a/SabreTools.Helper/Objects/Dat/DatFile.cs +++ b/SabreTools.Helper/Objects/Dat/DatFile.cs @@ -6254,48 +6254,6 @@ namespace SabreTools.Helper #endregion - #region Serialization - - /// - /// Serialze object to file - /// - /// DatFile to serialize - /// File to write out to - /// Name of the outputted file - public static string Serialize(DatFile df, string output) - { - BinaryFormatter bf = new BinaryFormatter(); - string filename = (String.IsNullOrEmpty(output) ? "default.bin" : output); - Stream outStream = File.Open(filename, FileMode.Create); - bf.Serialize(outStream, df); - outStream.Flush(); - outStream.Dispose(); - return filename; - } - - /// - /// Repopulate object from a file - /// - /// Name of the input file to populate from - /// DatFile populated from the input file - public static DatFile Deserialize(string input) - { - if (!File.Exists(input)) - { - return new DatFile(); - } - - BinaryFormatter bf = new BinaryFormatter(); - Stream output = File.Open(input, FileMode.Open); - DatFile df = (DatFile)bf.Deserialize(output); - - output.Flush(); - output.Dispose(); - return df; - } - - #endregion - #region Statistics ///