public MessageViewModel(Message message) { _message = message; }
public CorrespondenceFact CreateFact(FactMemento memento) { Message newFact = new Message(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output); newFact._text = (string)_fieldSerializerByType[typeof(string)].ReadData(output); } } return newFact; }