RoutingExtensions.TryGetUrlByCodeReference Method

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

Definition

Attempts to retrieves the documentation URL for the specified code reference.
public static bool TryGetUrlByCodeReference(this IApiDocUrlProvider urlProvider, string cref, [NotNullWhen(true)] out Uri url)

Parameters

urlProvider IApiDocUrlProvider
The URL provider to use for resolving the URL.
cref string
The code reference to resolve.
url Uri
When this method returns, contains the URL of the code reference if found; otherwise, null. This parameter is passed uninitialized.

Returns

bool
true if the URL of the code reference is found; otherwise, false.

Exceptions

ArgumentNullException
Thrown when urlProvider or cref is null.