DevOpsWikiStrategy Class
- Namespace
- Kampute.DocToolkit
- Assembly
- Kampute.DocToolkit.dll
Definition
Provides an addressing strategy for organizing and addressing documentation pages hosted on an Azure DevOps Wiki.
public class DevOpsWikiStrategy : MarkdownAddressingStrategy- Inheritance
- object
- AddressingStrategy
- MarkdownAddressingStrategy
- DevOpsWikiStrategy
Remarks
Thread Safety
Public instance members can be considered thread-safe if neither MarkdownAddressingOptions.MainTopicId nor MarkdownAddressingOptions.ApiTopicId is set in the construction options of the instance. If either property is set, instance members are only thread-safe if the instance is fully initialized (that is, IContextualAddressingStrategy.InitializeWithContext(IDocumentationContext) has been called) before any other method is accessed, and there is no concurrent access during or before initialization.
The class is not thread-safe otherwise, because it contains a mutable context field and uses lazy initialization that depends on this field, without synchronization.
Constructors
| DevOpsWikiStrategy() | Initializes a new instance of the DevOpsWikiStrategy class with default options. |
| DevOpsWikiStrategy(DevOpsWikiOptions) | Initializes a new instance of the DevOpsWikiStrategy class with the specified options. |
Methods
| EncodeFragmentIdentifier(string) | Converts the text of a heading to the fragment identifier that addresses the heading. |
| EncodePageName(string) | Converts the specified title to the name of a page, as it appears in the file path and URL of the page. |
| EncodeWikiFragmentIdentifier(string) | Encodes a string for use as a fragment identifier compatible with Azure DevOps Wiki heading fragments. |
| EncodeWikiPath(ReadOnlySpan<char>) | Encodes special characters in the given title as per the Azure DevOps Wiki requirements for page titles. |
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 content into namespace and type pages. Namespaces receive dedicated pages, with types documented on separate pages nested under their namespaces. Type members such as methods and properties are documented on their declaring type's page, accessible through URL fragments for efficient navigation while maintaining a clean wiki structure.
Content organization for topics follows a simple hierarchical structure based on parent-child relationships. Topic paths are constructed using encoded titles, with child topics nested under their parents to maintain a clean and navigable wiki structure.
Key features of the DevOpsWikiStrategy addressing strategy include:- Compatibility with Azure DevOps Wiki linking conventions
- Namespace-then-type hierarchy for intuitive API documentation navigation
- URL fragments for type members to maintain clean page structure
This strategy works well for teams that want to maintain their documentation directly within their Azure DevOps environment, providing seamless integration between code and narrative documentation that's easily accessible to all team members.