Ejemplo n.º 1
0
        public object Route(ICall call)
        {
            _context.LastCallRouter(this);

            var pendingRaisingEventArgs = _context.DequeuePendingRaisingEventArguments();

            IRoute routeToUseForThisCall;

            if (_context.IsQuerying)
            {
                routeToUseForThisCall = GetQueryRoute();
            }
            else if (pendingRaisingEventArgs != null)
            {
                routeToUseForThisCall = GetRaiseEventRoute(pendingRaisingEventArgs);
            }
            else if (IsSpecifyingACall(call, _currentRoute))
            {
                routeToUseForThisCall = GetRecordCallSpecRoute();
            }
            else
            {
                routeToUseForThisCall = _currentRoute;
            }

            UseDefaultRouteForNextCall();
            return(routeToUseForThisCall.Handle(call));
        }
Ejemplo n.º 2
0
        public object Route(ICall call)
        {
            _context.LastCallRouter(this);
            if (IsSpecifyingACall(call))
            {
                UseRecordCallSpecRouteForNextCall();
            }
            var routeToUseForThisCall = _currentRoute;

            UseDefaultRouteForNextCall();
            return(routeToUseForThisCall.Handle(call));
        }