public override object createChatViewModel(EViewModel viewModelName, IChatRoomViewModel mainChatViewModel) { switch (viewModelName) { case EViewModel.CHATDISCUSSION: return(new DiscussionViewModel(mainChatViewModel)); case EViewModel.CHATMESSAGE: return(new MessageViewModel(mainChatViewModel)); } return(null); }
public MessageViewModel(IChatRoomViewModel mainChatRoom) : this() { _mainChatRoom = mainChatRoom; this._page = _mainChatRoom.navigation; }
public virtual object createChatViewModel(EViewModel viewModelName, IChatRoomViewModel mainChatViewModel) { throw new NotApplicableException("Cannot create chat view model for the targeted object!"); }