RoutingExtensions.TryResolveAddressByCodeReference Method

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

Definition

Attempts to resolve the address of the documentation content for the specified code reference.
public static bool TryResolveAddressByCodeReference(this IDocumentAddressingStrategy strategy, string cref, [NotNullWhen(true)] out IResourceAddress address)

Parameters

strategy IDocumentAddressingStrategy
The addressing strategy to use for resolving the address.
cref string
The code reference to resolve.
address IResourceAddress
When this method returns, contains the address of the documentation content for the specified code reference, or null if the address could not be resolved. This parameter is passed uninitialized.

Returns

bool
true if the address was successfully resolved; otherwise, false.

Exceptions

ArgumentNullException
Thrown when strategy or cref is null.