public DriveController(IDriveRepository driveRepository, IUserAccountRepository userAccountRepository, IUserGroupRepository userGroupRepository, IRouteFinder routeFinder, IRouteParser routeParser) { _driveRepository = driveRepository; _userAccountRepository = userAccountRepository; _userGroupRepository = userGroupRepository; _routeFinder = routeFinder; _routeParser = routeParser; }
public RouteManager(IRouteParser RouteParser, IResponseSerializer Serializer) { if (RouteParser == null) { throw new ArgumentNullException(nameof(RouteParser)); } if (Serializer == null) { throw new ArgumentNullException(nameof(Serializer)); } this.routeParser = RouteParser; this.serializer = Serializer; getRouteDictionary = new Dictionary <string, RouteBinding>(); putRouteDictionary = new Dictionary <string, RouteBinding>(); postRouteDictionary = new Dictionary <string, RouteBinding>(); deleteRouteDictionary = new Dictionary <string, RouteBinding>(); }
/// <summary> /// Initializes a new instance of the <see cref="Route"/> class. /// </summary> /// <param name="routeSpecification">The path specification, which gives the pattern that paths will /// follow. For example, "/patients/{action}".</param> /// <param name="routeHandler">A delegate that will produce a route handler when needed for this /// route.</param> /// <param name="defaults">The default values of this route.</param> /// <param name="constraints">The constraints that will apply to this route.</param> /// <param name="parser">An object charged with parsing the route specification, producing a /// <see cref="ParsedRoute"/>.</param> /// <param name="validator">An object charged with validating the route configuration, ensuring the /// route doesn't violate any expectations around how a route can be declared.</param> public Route(string routeSpecification, Func <IRouteHandler> routeHandler, RouteValueDictionary defaults, RouteValueDictionary constraints, IRouteParser parser, IRouteValidator validator) { Guard.ArgumentNotNull(routeHandler, "routeHandler"); pathSpecification = routeSpecification ?? string.Empty; this.routeHandler = routeHandler; this.validator = validator ?? new RouteValidator(); this.defaults = defaults ?? new RouteValueDictionary(); this.constraints = constraints ?? new RouteValueDictionary(); this.parser = parser ?? new RouteParser( new ParameterSegmentRecognizer(), new LiteralSegmentRecognizer(), new CatchAllParameterSegmentRecognizer() ); }
/// <summary> /// Initializes a new instance of the <see cref="Route"/> class. /// </summary> /// <param name="routeSpecification">The path specification, which gives the pattern that paths will /// follow. For example, "/patients/{action}".</param> /// <param name="routeHandler">A delegate that will produce a route handler when needed for this /// route.</param> /// <param name="defaults">The default values of this route.</param> /// <param name="constraints">The constraints that will apply to this route.</param> /// <param name="parser">An object charged with parsing the route specification, producing a /// <see cref="ParsedRoute"/>.</param> /// <param name="validator">An object charged with validating the route configuration, ensuring the /// route doesn't violate any expectations around how a route can be declared.</param> public Route(string routeSpecification, Func<IRouteHandler> routeHandler, RouteValueDictionary defaults, RouteValueDictionary constraints, IRouteParser parser, IRouteValidator validator) { Guard.ArgumentNotNull(routeHandler, "routeHandler"); pathSpecification = routeSpecification ?? string.Empty; this.routeHandler = routeHandler; this.validator = validator ?? new RouteValidator(); this.defaults = defaults ?? new RouteValueDictionary(); this.constraints = constraints ?? new RouteValueDictionary(); this.parser = parser ?? new RouteParser( new ParameterSegmentRecognizer(), new LiteralSegmentRecognizer(), new CatchAllParameterSegmentRecognizer() ); }
protected override void Establish() { _routeText = null; _routeParser = RouteParserBuilder.Build(); _route = null; }
protected override void Establish() { _routeText = "LRMRLMMRMLM"; _routeParser = RouteParserBuilder.Build(); }
public MemoizedRouteParser(IRouteParser innerParser) { _innerParser = innerParser; }
protected override void Establish() { _routeText = "XYZABC123"; _routeParser = RouteParserBuilder.Build(); }
protected override void Establish() { _routeText = "UDM"; _routeParser = RouteParserBuilder.Build(new UpDownRouteStepResolver(), new MoveOneGridSpaceRouteStepResolver()); _route = null; }
public MemoizedRouteParser(IRouteParser innerParser) { _innerParser = innerParser; }
/// <summary> /// Initializes a new instance of the <see cref="Route"/> class. /// </summary> /// <param name="routeSpecification">The path specification, which gives the pattern that paths will /// follow. For example, "/patients/{action}".</param> /// <param name="routeHandler">A delegate that will produce a route handler when needed for this /// route.</param> /// <param name="defaults">The default values of this route.</param> /// <param name="constraints">The constraints that will apply to this route.</param> /// <param name="parser">An object charged with parsing the route specification, producing a /// <see cref="ParsedRoute"/>.</param> public Route(string routeSpecification, Func <IRouteHandler> routeHandler, RouteValueDictionary defaults, RouteValueDictionary constraints, IRouteParser parser) : this(routeSpecification, routeHandler, defaults, constraints, parser, null) { }
public CommandController(ILogger <CommandController> logger, IRouteParser routeParser, IInterpretersManager interpretersManager) { this.logger = logger; this.interpretersManager = interpretersManager; this.routeParser = routeParser; }
public RobotParser(IPositionParser positionParser, IRouteParser routeParser) { _positionParser = positionParser; _routeParser = routeParser; }
/// <summary> /// Initializes a new instance of the <see cref="Route"/> class. /// </summary> /// <param name="routeSpecification">The path specification, which gives the pattern that paths will /// follow. For example, "/patients/{action}".</param> /// <param name="routeHandler">A delegate that will produce a route handler when needed for this /// route.</param> /// <param name="defaults">The default values of this route.</param> /// <param name="constraints">The constraints that will apply to this route.</param> /// <param name="parser">An object charged with parsing the route specification, producing a /// <see cref="ParsedRoute"/>.</param> public Route(string routeSpecification, Func<IRouteHandler> routeHandler, RouteValueDictionary defaults, RouteValueDictionary constraints, IRouteParser parser) : this(routeSpecification, routeHandler, defaults, constraints, parser, null) { }