Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public MessageViewModel(IEventAggregator eventAggregator, Message model)
 {
     this.eventAggregator = eventAggregator;
     this.model = model;
     this.WireUpCommands();
 }