public RequestManager(IDataManager dataManager, IRouteMatcher routeMatcher, ILogger <RequestManager> logger) { this._logger = logger; this._dataManager = dataManager; this._routeMatcher = routeMatcher; }
public RoutingMiddleware(RequestDelegate nextDelegate , ILoggerFactory loggerFactory , IOptions <HttpFunctionOptions> optionsAccessor , IRouteMatcher internalRouteMatcher) { next = nextDelegate; log = loggerFactory.CreateLogger <RoutingMiddleware>(); options = optionsAccessor.Value; routeMatcher = internalRouteMatcher; }
public Topic(IDispatcher dispatcher, IMessageStore messageStore, IRouteMatcher routeMatcher, ISerializer serializer, ILogger <Topic> logger) { _dispatcher = dispatcher; _messageStore = messageStore; _routeMatcher = routeMatcher; _serializer = serializer; _logger = logger; _queueChannel = Channel.CreateUnbounded <Guid>(); _throttling = new DynamicWaitThrottling(); }
public HttpRequestHandler(ILoggerFactory loggerFactory , IHttpFunction httpFunction , IOptions <HttpFunctionOptions> optionsAccessor , IRouteMatcher internalRouteMatcher ) { log = loggerFactory.CreateLogger <HttpRequestHandler>(); function = httpFunction; options = optionsAccessor.Value; routeMatcher = internalRouteMatcher; }
private static ISet <string> PrependLeadingSlash(string[] patterns, IRouteMatcher routeMatcher) { var slashSeparator = routeMatcher.Combine("a", "a").Equals("a/a"); ISet <string> result = new HashSet <string>(); foreach (var pat in patterns) { var pattern = pat; if (slashSeparator && !string.IsNullOrEmpty(pattern) && !pattern.StartsWith("/")) { pattern = "/" + pattern; } result.Add(pattern); } return(result); }
public void Initialize() { _controllerPathParser = new Mock <IControllerPathParser>(); _matcher = new RouteMatcher(_controllerPathParser.Object); }
private DestinationPatternsMessageCondition(ISet <string> patterns, IRouteMatcher routeMatcher) { Patterns = patterns; _routeMatcher = routeMatcher; }
public DestinationPatternsMessageCondition(string[] patterns, IRouteMatcher routeMatcher) : this(PrependLeadingSlash(patterns, routeMatcher), routeMatcher) { }
/// <summary> /// Initializes a new instance of the <see cref="ControllersAgent" /> class. /// </summary> /// <param name="controllersMetaStore">The controllers meta store.</param> /// <param name="routeMatcher">The route matcher.</param> public ControllersAgent(IControllersMetaStore controllersMetaStore, IRouteMatcher routeMatcher) { _controllersMetaStore = controllersMetaStore; _routeMatcher = routeMatcher; }
public static bool MatchRouteTemplate(this HttpMethodAttribute httpMethodAttribute, HttpContext context, IRouteMatcher routeMatcher) { if (string.IsNullOrEmpty(httpMethodAttribute.Template)) { return(false); } var match = routeMatcher.Match(httpMethodAttribute.Template, context.Request.Path); if (match == null) { // path doesn't match route template return(false); } // write route data var routeData = context.GetRouteData(); foreach (var item in match) { routeData.Values.Add(item.Key, item.Value); } return(true); }
public RouteMatcherTests() { _routeMatcher = new RouteMatcher(); }
public void Initialize() { _controllerPathParser = new Mock<IControllerPathParser>(); _matcher = new RouteMatcher(_controllerPathParser.Object); }
public abstract void AddRoute(IRouteMatcher route, IMiddleware middleware);