Example #1
0
 public bool Equals(ActionUrl other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other._route, _route) && Equals(other.HandlerType, HandlerType) &&
            Equals(other.Method, Method);
 }
Example #2
0
 public bool Equals(ActionUrl other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other._route, _route) && Equals(other.HandlerType, HandlerType) &&
            Equals(other.Method, Method));
 }
        public void VisitRoute(IRouteDefinition route, BehaviorChain chain)
        {
            ActionCall action = chain.FirstCall();
            if (action == null) return;

            if (action.HasInput)
            {
                // TODO:  throw if route is null;
                var model = (IModelUrl) route;
                _registration.AddModel(model);
            }

            var actionUrl = new ActionUrl(route, action);
            _registration.AddAction(actionUrl);
        }