In Chapter 8, Building a WPF .NET Client, we had some help for doing MVVM from a package called Bifrost. This package does not yet support Xamarin, so we are going to borrow some of the concepts from it, although a bit more naïvely implemented. I would recommend taking a look at the source code for Bifrost (, for a fully featured version. For now, however, it will do.


The publish/subscribe mechanism we have is fairly simple to implement. Let's add the interface that represents the functionality we need:

  1. Add an interface called IMessenger in the common SignalRChat.Mobile project.
  2. Make the interface look as follows:
    public interface IMessenger { void Publish<T>(T content); void SubscribeTo<T>(Action<T> ...

Get SignalR - Real-time Application Development - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.