Ejemplo n.º 1
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                ConferenceNotice newFact = new ConferenceNotice(memento);

                // Create a memory stream from the memento data.
                using (MemoryStream data = new MemoryStream(memento.Data))
                {
                    using (BinaryReader output = new BinaryReader(data))
                    {
                        newFact._timeSent = (DateTime)_fieldSerializerByType[typeof(DateTime)].ReadData(output);
                        newFact._text = (string)_fieldSerializerByType[typeof(string)].ReadData(output);
                    }
                }

                return newFact;
            }
 public ConferenceNoticeViewModel(ConferenceNotice notice, Clock clock)
 {
     _notice = notice;
     _clock = clock;
 }