System.Web.Routing namespace Code resolution (IV)

Source: Internet
Author: User

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;}
}    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.