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 ...

Get Xamarin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.