Building the ChatPresenter
Now we move on to the next screen; this will be our chat window in which we will be passing messages between different clients connected to the server Hub. Our first step is to build the ChatPresenter
:
public class ChatPresenter : BasePresenter { #region Private Properties private Client _client; private IChatView _view; #endregion #region IChatView public interface IChatView : IView { void NotifyChatMessageReceived(string message); } #endregion }
We are going to start by inheriting the BasePresenter
class. It will include two private
properties, one for the Client
selected from the previous ClientListView
screen and another for the IChatView
interface. The IChatView
interface inherits the IView
interface and it will include one function for handling messages received from the receiving Client...