Пример #1
0
        public void SalvarEventoCache(EventoSalvar eve)
        {
            BinaryFormatter formato = new BinaryFormatter();
            Stream          stream  = File.Create(@"Evento.bin");

            formato.Serialize(stream, eve);
            stream.Close();
        }
Пример #2
0
        public EventoSalvar RecuperarEventoCache()
        {
            BinaryFormatter formato = new BinaryFormatter();
            Stream          stream  = File.OpenRead(@"Evento.bin");
            EventoSalvar    eve     = (EventoSalvar)formato.Deserialize(stream);

            stream.Close();
            return(eve);
        }
Пример #3
0
        public void RestaurarEventoCache(Memento memento)
        {
            EventoSalvar eve = memento.RecuperarEventoCache();

            CommonBC.Syncronize(eve, this);
        }