public RouteResolverTrie(ITrieNodeFactory nodeFactory, IRouteCache cache) { _nodeFactory = nodeFactory; _routeTries = new Dictionary <string, TrieNode>(StringComparer.OrdinalIgnoreCase); BuildTrie(cache); }
protected TrieNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) { Parent = parent; RouteDefinitionSegment = segment; _nodeFactory = nodeFactory; NodeData = new List <NodeData>(); Children = new Dictionary <string, TrieNode>(StringComparer.OrdinalIgnoreCase); }
/// <summary> /// Initializes a new instance of the <see cref="TrieNode"/> class /// </summary> /// <param name="parent">Parent node</param> /// <param name="segment">Segment of the route definition</param> /// <param name="nodeFactory">Factory for creating new nodes</param> protected TrieNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) { this.nodeFactory = nodeFactory; this.Parent = parent; this.RouteDefinitionSegment = segment; this.Children = new Dictionary <string, TrieNode>(StringComparer.OrdinalIgnoreCase); this.AdditionalParameters = new Dictionary <string, object>(); this.NodeData = new List <NodeData>(); }
/// <summary> /// Initializes a new instance of the <see cref="TrieNode"/> class /// </summary> /// <param name="parent">Parent node</param> /// <param name="segment">Segment of the route definition</param> /// <param name="nodeFactory">Factory for creating new nodes</param> protected TrieNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) { this.nodeFactory = nodeFactory; this.Parent = parent; this.RouteDefinitionSegment = segment; this.Children = new Dictionary<string, TrieNode>(); this.AdditionalParameters = new Dictionary<string, object>(); this.NodeData = new List<NodeData>(); }
/// <summary> /// Initializes a new instance of the <see cref="TrieNode"/> class /// </summary> /// <param name="parent">Parent node</param> /// <param name="segment">Segment of the route definition</param> /// <param name="nodeFactory">Factory for creating new nodes</param> protected TrieNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) { this.nodeFactory = nodeFactory; this.Parent = parent; this.RouteDefinitionSegment = segment; this.Children = new Dictionary<string, TrieNode>(StaticConfiguration.CaseSensitive ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase); this.AdditionalParameters = new Dictionary<string, object>(); this.NodeData = new List<NodeData>(); }
public CaptureNodeWithConstraint(TrieNode parent, string segment, ITrieNodeFactory nodeFactory, IEnumerable<IRouteSegmentConstraint> routeSegmentConstraints) : base(parent, segment, nodeFactory) { this.routeSegmentConstraints = routeSegmentConstraints; this.ExtractParameterName(); }
/// <summary> /// Initializes a new instance of the <see cref="CaptureNodeWithConstraint"/> class, with /// the provided <paramref name="parent"/>, <paramref name="segment"/> and <paramref name="nodeFactory"/>. /// </summary> /// <param name="parent">The parent.</param> /// <param name="segment">The segment.</param> /// <param name="nodeFactory">The node factory.</param> /// <param name="routeSegmentConstraints">The route segment constraints.</param> public CaptureNodeWithConstraint(TrieNode parent, string segment, ITrieNodeFactory nodeFactory, IEnumerable <IRouteSegmentConstraint> routeSegmentConstraints) : base(parent, segment, nodeFactory) { this.routeSegmentConstraints = routeSegmentConstraints; this.ExtractParameterName(); }
public RootNode(ITrieNodeFactory nodeFactory) : base(null, null, nodeFactory) { }
public GreedyRegExCaptureNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.BuildRegEx(); }
public RouteResolverTrie(ITrieNodeFactory nodeFactory) { this.nodeFactory = nodeFactory; }
public GreedyRegExCaptureNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.BuildRegEx(); }
public RegExNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.BuildRegEx(); }
public RootNode(ITrieNodeFactory nodeFactory) : base(null, null, nodeFactory) { }
/// <summary> /// Captures parameters within segments that contain literals. /// i.e: /// /{file}.{name} /// /{file}.html /// /{major}.{minor}.{revision}B{build} /// </summary> /// <param name="parent">The parent node</param> /// <param name="segment">The segment to match upon</param> /// <param name="nodeFactory">The factory</param> public CaptureNodeWithMultipleParameters(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.ExtractParameterNames(); }
public CaptureNodeWithDefaultValue(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.ExtractParameterNameAndDefaultValue(); }
/// <summary> /// Captures parameters within segments that contain literals. /// i.e: /// /{file}.{name} /// /{file}.html /// /{major}.{minor}.{revision}B{build} /// </summary> /// <param name="parent">The parent node</param> /// <param name="segment">The segment to match upon</param> /// <param name="nodeFactory">The factory</param> public CaptureNodeWithMultipleParameters(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.ExtractParameterNames(); }
public RouteResolverTrie(ITrieNodeFactory nodeFactory) { this.nodeFactory = nodeFactory; }
public CaptureNodeWithDefaultValue(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.ExtractParameterNameAndDefaultValue(); }
public RegExNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.BuildRegEx(); }
public CaptureNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.ExtractParameterName(); }
public LiteralNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="LiteralNode"/> class with /// the provided <paramref name="parent"/>, <paramref name="segment"/> and <paramref name="nodeFactory"/>. /// </summary> /// <param name="parent">Parent node</param> /// <param name="segment">Segment of the route definition</param> /// <param name="nodeFactory">Factory for creating new nodes</param> public LiteralNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="CaptureNode"/> class, with /// the provided <paramref name="parent"/>, <paramref name="segment"/> and <paramref name="nodeFactory"/>. /// </summary> /// <param name="parent">Parent node</param> /// <param name="segment">Segment of the route definition</param> /// <param name="nodeFactory">Factory for creating new nodes</param> public CaptureNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { this.ExtractParameterName(); }
public CaptureNode(TrieNode parent, string segment, ITrieNodeFactory nodeFactory) : base(parent, segment, nodeFactory) { _parameterName = RouteDefinitionSegment.Trim('{', '}'); }