private MessageViewModel Create() { var guid = Guid.NewGuid(); var numberOfMessageTypes = Enum.GetValues(typeof(MessageType)).Length; var random = new Random().Next(1, numberOfMessageTypes); var message = new Message(guid, Enum.GetName(typeof(MessageType), random), MESSAGE_TEXT, (MessageType)random); return new MessageViewModel(eventAggregator, message); }
public MessageViewModel(IEventAggregator eventAggregator, Message model) { this.eventAggregator = eventAggregator; this.model = model; this.WireUpCommands(); }