title: SignalR Client - IHubProxy.On<> and Invoke<> accepting an interface
body: <p>I am building a windows service that will act as a client to an existing site that's employing SignalR.</p>
  
  <p>I have <code>IHubProxy.On&lt;&gt;</code> and <code>IHubProxy.Invoke</code> methods working when passing around concrete classes.</p>
  
  <p>For example, this works:</p>
  
  <pre><code> hubProxy.On&lt;MigrationRequest&gt;("iSWindowsServiceRequest", request =&gt;
       MigrateData.Invoke(request));
  </code></pre>
  
  <p>And the MigrationRequest looks like this:</p>
  
  <pre><code>public class MigrationRequest : IISWindowsServiceRequest
  {
      public MigrateWhat What { get; set; }
      public MigrationFor For { get; set; }
      public Guid EntityFor_Id { get; set; }
  }
  </code></pre>
  
  <p>Now, If i try this:</p>
  
  <pre><code>hubProxy.On&lt;IISWindowsServiceRequest&gt;("iSWindowsServiceRequest", request =&gt; 
  Handshake.HandleRequest(request));
  </code></pre>
  
  <p>my request is never picked up.</p>
  
  <p>what I was hoping to achieve was creating single pub-sub methods, rather than one for each concrete class that this service would accept.</p>
  
  <p>Is it possible to pass in an interface into the <code>On&lt;&gt;()</code> methods?</p>
  
  <p>The same goes for the <code>Invoke&lt;&gt;()</code> - if the object I am passing contains any properties that are of an interface, the call never makes it.</p>
  
  <p>so this will not work:</p>
  
  <pre><code>public class ISWindowsServiceResponse
  {
      public IISWindowsServiceRequest OriginalRequest { get; set; }
      public bool Success { get; set; }
      public string Message { get; set; }
  }
  </code></pre>
  
  <p>but this will</p>
  
  <pre><code>public class ISWindowsServiceResponse
  {
      public MigrationRequest OriginalRequest { get; set; }
      public bool Success { get; set; }
      public string Message { get; set; }
  }
  </code></pre>