C# Class Rock.UniversalSearch.Crawler.LinkParser

Helper class to parse links
Exibir arquivo Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
LinkParser ( ) : System

Default constructor.

ParseLinks ( HtmlAgilityPack.HtmlDocument page, string sourceUrl, string startUrl ) : void

Parses a page looking for links.

Private Methods

Method Description
DetermineLinkType ( string link, string startingUrl ) : LinkType

Determines the type of the link.

MakeAbsoluteLink ( string link, string originatingLink ) : string

Makes the absolute link.

ResolveRelativePaths ( string relativeUrl, string originatingUrl ) : string

Needed a method to turn a relative path into an absolute path. And this seems to work.

Method Details

LinkParser() public method

Default constructor.
public LinkParser ( ) : System
return System

ParseLinks() public method

Parses a page looking for links.
public ParseLinks ( HtmlAgilityPack.HtmlDocument page, string sourceUrl, string startUrl ) : void
page HtmlAgilityPack.HtmlDocument The page whose text is to be parsed.
sourceUrl string The source url of the page.
startUrl string The start URL.
return void