DotNetApiStrategy Class
- Namespace
- Kampute.DocToolkit
- Assembly
- Kampute.DocToolkit.dll
Definition
Provides an addressing strategy for organizing and addressing documentation pages similar to the .NET API documentation structure hosted on Microsoft Learn.
public class DotNetApiStrategy : HtmlAddressingStrategy- Inheritance
- object
- AddressingStrategy
- HtmlAddressingStrategy
- DotNetApiStrategy
Remarks
Thread Safety
All public members of the type are guaranteed to be thread-safe.
Constructors
| DotNetApiStrategy() | Initializes a new instance of the DotNetApiStrategy class with default options. |
| DotNetApiStrategy(DotNetApiOptions) | Initializes a new instance of the DotNetApiStrategy class with the specified options. |
Properties
| Granularity | Gets the page granularity used for organizing documentation content. |
Methods
| 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. |

The strategy organizes API documentation with namespaces, types, and type members documented on dedicated pages with flat addressing and method overloads differentiated by URL fragments.
Topic organization follows a hierarchical structure based on parent-child relationships. Topics with subtopics use index files to serve as landing pages, with topic paths using lowercase naming while replacing invalid file system characters with hyphens. Pinned topics can override default paths for custom organization.
Key features of the DotNetApiStrategy addressing strategy include:- .NET API-style addressing with dedicated pages for namespaces, types, and individual type members
- URL fragments for method overloads for direct navigation to specific overloads
- Hierarchical topic organization and pinned topic functionality for custom path overrides
This strategy is ideal for large, complex APIs where granular addressing enables direct navigation to specific members, making documentation easier to reference and maintain.