PageResolverExtensions
Pennington.Content
Convenience extensions over IPageResolver.
Methods
ResolveAsync<TFrontMatter>
#public static Task<RenderedItem<TFrontMatter>> ResolveAsync<TFrontMatter>(IPageResolver resolver, UrlPath requested)
Resolves requested and narrows the rendered page's front matter to TFrontMatter in one step, so callers read typed properties without a cast. Returns null when nothing matches, the match fails to render, or the matched page's front matter is not a TFrontMatter.
Parameters
resolverIPageResolver- The resolver to query.
requestedUrlPath- Canonical URL to resolve.
Returns
Task<RenderedItem<TFrontMatter>>Pennington.Content.PageResolverExtensions
namespace Pennington.Content;
/// Convenience extensions over IPageResolver.
public class PageResolverExtensions
{
/// Resolves requested and narrows the rendered page's front matter to TFrontMatter in one step, so callers read typed properties without a cast. Returns null when nothing matches, the match fails to render, or the matched page's front matter is not a TFrontMatter.
public static Task<RenderedItem<TFrontMatter>> ResolveAsync<TFrontMatter>(IPageResolver resolver, UrlPath requested)
;
}