HtmlHelper
- Namespace: SuCoS.Commands.ValidateLinks
- Source File: HtmlHelper.cs
Provides helper methods for working with HTML content.
Public Methods
ExtractLinks
public static IEnumerable<string> ExtractLinks(string html)
Extracts all links from the provided HTML content.
Parameters:
html(string): The HTML content to extract links from.
Returns: IEnumerable<string>
- An enumerable collection of link URLs.
HasFragmentId
public static bool HasFragmentId(string html, string fragment)
Determines whether the provided HTML content contains a specific fragment identifier.
Parameters:
html(string): The HTML content to search.fragment(string): The fragment identifier to search for.
Returns: bool
trueif the fragment identifier is found; otherwise,false.