예제 #1
0
파일: DataHelper.cs 프로젝트: elluvium/Foxy
        public static void SerializeBS(BusinessSystem bs, string fullPath)
        {
            BinaryFormatter formatter = new BinaryFormatter();

            using (FileStream fs = new FileStream(fullPath, FileMode.OpenOrCreate))
            {
                formatter.Serialize(fs, bs);
            }
        }
예제 #2
0
파일: DataHelper.cs 프로젝트: elluvium/Foxy
        public static BusinessSystem DeserializeBS(string fullPath)
        {
            BinaryFormatter formatter      = new BinaryFormatter();
            BusinessSystem  deserializedBS = new BusinessSystem();

            using (FileStream fs = new FileStream(fullPath, FileMode.OpenOrCreate))
            {
                deserializedBS = (BusinessSystem)formatter.Deserialize(fs);
            }

            return(deserializedBS);
        }