Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        public void Deserialization(IPersistable persistable)
        {
            Stream         stream        = File.OpenRead(filename);
            IMemento       memento       = new Memento();
            IMementoReader mementoReader = new XmlMementoReader();

            stream.Seek(0, SeekOrigin.Begin);
            mementoReader.Read(memento, stream);
            persistable.LoadState(memento);
            stream.Close();
        }