Route the entity classes used in parsing, some classes named "Segment"
First look at the class diagram:
The 1.PathSegment and pathsubsegment two classes are base classes, and there is no code that represents the URL fragment ('/' delimited result ') in the route rule and the result of the child fragment (' {' and '} ') in the URL fragment.
The 2.SeparatorPathSegment class represents '/' in the URL of the route rule, and there is no code
The 3.ContentPathSegment class corresponds to the Separatorpathsegment class
It has two properties, subsegments stores its contained pathsubsegment,iscatchall to indicate whether it contains a wildcard pathsubsegment
Internal sealed class Contentpathsegment:pathsegment
{
//Methods public
contentpathsegment (ilist& Lt Pathsubsegment> subsegments)
{this
. subsegments = subsegments;
}
//Properties public
bool Iscatchall
{
get
{
Return
this. Subsegments.any (seg => (seg is parametersubsegment) && ((parametersubsegment) seg). Iscatchall));
ilist<pathsubsegment> subsegments {get; private set;}
}