StrategyBasedApiDocUrlResolver Class

Namespace
Kampute.DocToolkit.Routing
Assembly
  • Kampute.DocToolkit.dll

Definition

Resolves URLs to external documentation sites for code elements using a structured addressing strategy.
public class StrategyBasedApiDocUrlResolver : RemoteApiDocUrlResolver
Inheritance
Inherited by

Remarks

The StrategyBasedApiDocUrlResolver class uses an IDocumentAddressingStrategy implementation to generate structured, predictable URLs for external API documentation. This class is ideal for linking to well-organized documentation sites with consistent URL patterns, such as:
  • Microsoft Docs (.NET API documentation)
  • DocFx-generated documentation
  • Azure DevOps Wiki documentation
  • Other structured documentation systems with predictable URL patterns
To control which external APIs this resolver handles, add namespace patterns to the RemoteApiDocUrlResolver.NamespacePatterns collection, using exact matches (e.g., "Contoso.Services"), wildcard patterns (e.g., "Contoso.*"), or the universal match pattern "*".

Constructors

StrategyBasedApiDocUrlResolver(Uri, IDocumentAddressingStrategy)Initializes a new instance of the StrategyBasedApiDocUrlResolver class.

Properties

StrategyGets the strategy for resolving URLs for documentation content.

Methods

ResolveMemberUrl(IMember)Attempts to resolve the documentation URL for the specified member.
ResolveNamespaceUrl(string)Attempts to resolve the documentation URL for the specified namespace.

Extension Methods

TryGetUrlByCodeReference(this IApiDocUrlProvider, string, out Uri)Attempts to retrieves the documentation URL for the specified code reference.

See Also