コード例 #1
0
                public IMatchRoutes MakeRelativeTo(NonNullList <NonBlankTrimmedString> parentSegments)
                {
                    if (parentSegments == null)
                    {
                        throw new ArgumentNullException("parentSegments");
                    }

                    if (!parentSegments.Any())
                    {
                        return(this);
                    }

                    var newSegmentMatchers = _segmentMatchers;

                    foreach (var segment in parentSegments.Reverse())
                    {
                        newSegmentMatchers = newSegmentMatchers.Insert(new FixedSegmentMatcher <TValues>(segment));
                    }
                    return(new VariableRouteDetails(newSegmentMatchers, _extractedValueBuilder, _ifMatched));
                }
コード例 #2
0
            public IMatchRoutes MakeRelativeTo(NonNullList <NonBlankTrimmedString> parentSegments)
            {
                if (parentSegments == null)
                {
                    throw new ArgumentNullException("parentSegments");
                }

                if (!parentSegments.Any())
                {
                    return(this);
                }

                var newSegments = _segments;

                foreach (var segment in parentSegments.Reverse())
                {
                    newSegments = newSegments.Insert(segment);
                }
                return(new StaticRouteDetails(newSegments, _ifMatched));
            }
コード例 #3
0
 public bool OnceOnPressDown() => _eventsReaders.Any(ev => ev.OnceOnPressDown());