示例#1
0
 /// <summary>
 /// Routes the specified <paramref name="event"/> to a configured state handler, if any.
 /// </summary>
 /// <param name="event">The event to route.</param>
 /// <exception cref="ArgumentNullException">Thrown when the <paramref name="event"/> is null.</exception>
 public void Route(object @event)
 {
     if (@event == null)
     {
         throw new ArgumentNullException("event");
     }
     _router.Route(@event);
 }
示例#2
0
文件: Entity.cs 项目: osoykan/DDDify
        /// <summary>
        ///     Routes the specified <paramref name="event" /> to a configured state handler, if any.
        /// </summary>
        /// <param name="event">The event to route.</param>
        /// <exception cref="ArgumentNullException">Thrown when the <paramref name="event" /> is null.</exception>
        public virtual void Route(object @event)
        {
            if (@event == null)
            {
                throw new ArgumentNullException(nameof(@event));
            }

            _router.Route(@event);
        }
 public void RouteEventCannotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => _sut.Route(null));
 }