Exemple #1
0
 /// <summary>
 /// Registers the state handler to be invoked when the specified event is applied.
 /// </summary>
 /// <typeparam name="TEvent">The type of the event to register the handler for.</typeparam>
 /// <param name="handler">The state handler.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="handler"/> is null.</exception>
 protected void Register <TEvent>(Action <TEvent> handler)
 {
     if (handler == null)
     {
         throw new ArgumentNullException("handler");
     }
     _router.ConfigureRoute(handler);
 }
 public void ConfigureRouteGenericHandlerCannotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => _sut.ConfigureRoute <object>(null));
 }