Ejemplo n.º 1
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                SessionNotice newFact = new SessionNotice(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;
            }
Ejemplo n.º 2
0
 public SessionNoticeViewModel(SessionNotice notice, ImageCache imageCache, Clock clock)
 {
     _notice = notice;
     _imageCache = imageCache;
     _clock = clock;
 }