Generic events - AndersMalmgren/SignalR.EventAggregatorProxy GitHub Wiki
You can use events with generic arguments from version 0.2.21.0
- Declare a generic event server side that inherits your base event.
public class MyGenericEvent<T> : EventBase
{
public T Value { get; set; }
}
- The event proxy cant discover the types used as generic arguments so these are specified with strings.
ViewModel = function() {
signalR.eventAggregator.subscribe(MyApp.Events.MyGenericEvent.of("System.String"), this.onMyGenericEvent, this);
};