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; }
public SessionNoticeViewModel(SessionNotice notice, ImageCache imageCache, Clock clock) { _notice = notice; _imageCache = imageCache; _clock = clock; }