-
Notifications
You must be signed in to change notification settings - Fork 37
Generic events
Anders Malmgren edited this page May 27, 2013
·
2 revisions
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);
};