AddressingStrategy Class

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

Definition

Represents a base class for defining strategies to organize and address documentation pages.
public abstract class AddressingStrategy : IDocumentAddressingStrategy
Inheritance
Implements
Inherited by

Remarks

The AddressingStrategy class provides a foundation for implementing various documentation addressing schemes. It handles common functionality like file extension management and the creation of appropriate resource addresses based on whether extensions should appear in URLs. This abstraction allows the documentation system to support multiple addressing patterns while maintaining consistent behavior for extension handling, URL generation, and path resolution across different documentation formats and publishing targets.

Constructors

AddressingStrategy(AddressingOptions)Initializes a new instance of the AddressingStrategy class.

Properties

FileExtensionGets the file extension to be used for documentation files.
GranularityGets the page granularity used for organizing documentation content.
OmitExtensionInUrlsGets a value indicating whether the file extension should be excluded from URLs.

Methods

CreateAddressFromPath(string, string)Builds the address for the specified path without extension and the optional URL suffix.
CreateAddressFromPathSegments(IEnumerable<string>, string)Creates a resource address from the specified path segments and an optional URL suffix.
IsAddressable(IMember)Determines whether the specified member can be addressed by this strategy.
TryResolveMemberAddress(IMember, out IResourceAddress)Attempts to resolve the address of the documentation content for the specified member.
TryResolveNamespaceAddress(string, out IResourceAddress)Attempts to resolve the address of the documentation content for the specified namespace.
TryResolveTopicAddress(ITopic, out IResourceAddress)Attempts to resolve the address for the documentation content of the specified topic.

Extension Methods

TryResolveAddressByCodeReference(this IDocumentAddressingStrategy, string, out IResourceAddress)Attempts to resolve the address of the documentation content for the specified code reference.