MarkupWriter.WriteDocLink Method
- Namespace
- Kampute.DocToolkit.IO.Writers
- Assembly
- Kampute.DocToolkit.dll
| MarkupWriter.WriteDocLink(MemberModel) | Writes a hyperlink to the documentation of the specified member model. |
| MarkupWriter.WriteDocLink(NamespaceModel) | Writes a hyperlink to the documentation of the specified namespace model. |
| MarkupWriter.WriteDocLink(Uri, Action<MarkupWriter>) | Writes a hyperlink to the documentation of a code element with the specified URL and delegate for writing the link text. |
| MarkupWriter.WriteDocLink(IMember, IDocumentationContext) | Writes a hyperlink to the documentation of the specified member. |
| MarkupWriter.WriteDocLink(IMember, IDocumentationContext, NameQualifier) | Writes a hyperlink to the documentation of the specified member with a specific name qualification level. |
| MarkupWriter.WriteDocLink(string, IDocumentationContext, Func<IMember, NameQualifier>) | Writes a hyperlink to the documentation of the specified code reference. |
| MarkupWriter.WriteDocLink(ICustomAttribute, IDocumentationContext, NameQualifier) | Writes a hyperlink to the documentation of the specified attribute. |
MarkupWriter.WriteDocLink(MemberModel)
public virtual void WriteDocLink(MemberModel member)Parameters
memberMemberModel- The member for which the link is written.
Exceptions
- ArgumentNullException
- Thrown when
memberisnull.
Remarks
MarkupWriter.WriteDocLink(NamespaceModel)
public virtual void WriteDocLink(NamespaceModel ns)Parameters
nsNamespaceModel- The namespace for which the link is written.
Exceptions
- ArgumentNullException
- Thrown when
nsisnull.
Remarks
MarkupWriter.WriteDocLink(Uri, Action<MarkupWriter>)
protected virtual void WriteDocLink(Uri docUrl, Action<MarkupWriter> docLinkTextHandler)Parameters
docUrlUri- The URI of the documentation page to link to.
docLinkTextHandlerAction<MarkupWriter>- The action to write the text of the link, typically the name of the code element.
Exceptions
- ArgumentNullException
- Thrown when
docUrlordocLinkTextHandlerisnull.
Remarks
The default implementation of this method calls MarkupWriter.WriteLink(Uri, Action<MarkupWriter>) to write the hyperlink. Derived classes can override this method to provide custom behavior for writing links to documentation.
MarkupWriter.WriteDocLink(IMember, IDocumentationContext)
public void WriteDocLink(IMember member, IDocumentationContext context)Parameters
memberIMember- The member for which the link is written.
contextIDocumentationContext- The documentation context used to resolve the link and format the member's signature.
Exceptions
- ArgumentNullException
- Thrown when
memberorcontextisnull.
Remarks
context to resolve the member's documentation URL and format its signature. The signature is formatted according to the rules of the programming language specified in the context. Depending on type of the member and whether it is part of the current documentation scope, the method determines an appropriate level of name qualification to use when formatting the member's signature.When a valid documentation URL is available for the specified member, a hyperlink is written using the member’s signature. For example, the hyperlink for ICollection<T>.Count will display as "ICollection<T>.Count" with a hyperlink to the documentation of the Count property in the ICollection<T> interface.
ICollection<DateTime>.Count will result in separate links for "ICollection" linked to ICollection<T>, "DateTime" linked to DateTime, and "Count" linked to ICollection<T>.Count.MarkupWriter.WriteDocLink(IMember, IDocumentationContext, NameQualifier)
public virtual void WriteDocLink(IMember member, IDocumentationContext context, NameQualifier qualifier)Parameters
memberIMember- The member for which the link is written.
contextIDocumentationContext- The documentation context used to resolve the link and format the member's signature.
qualifierNameQualifier- The level of qualification to use for the member's name.
Exceptions
- ArgumentNullException
- Thrown when
memberorcontextisnull.
Remarks
context to resolve the member's documentation URL and format its signature. The signature is formatted according to the rules of the programming language specified in the context. For the member's name, the method uses the level of qualification specified by qualifier.When a valid documentation URL is available for the specified member, a hyperlink is written using the member’s signature. For example, the hyperlink for ICollection<T>.Count will display as "ICollection<T>.Count" with a hyperlink to the documentation of the Count property in the ICollection<T> interface.
ICollection<DateTime>.Count will result in separate links for "ICollection" linked to ICollection<T>, "DateTime" linked to DateTime, and "Count" linked to ICollection<T>.Count.MarkupWriter.WriteDocLink(string, IDocumentationContext, Func<IMember, NameQualifier>)
public virtual void WriteDocLink(string cref, IDocumentationContext context, Func<IMember, NameQualifier> qualifierSelector = null)Parameters
crefstring- The code reference for which the link is written.
contextIDocumentationContext- The documentation context used to resolve the link and format the code reference.
qualifierSelectorFunc<IMember, NameQualifier> optional- An optional function to determine the level of qualification to use for the member's name if the code reference resolves to a member.
Exceptions
- ArgumentNullException
- Thrown when
creforcontextisnull.
Remarks
context to resolve the documentation URL of the reference and format its signature. The signature is formatted according to the rules of the programming language specified in the context.If the code reference resolves to a member, the method uses the qualifierSelector function to determine the appropriate level of name qualification to use when formatting the member's signature. If no function is provided, the method uses the most suitable qualification level based on the current documentation scope.
If the code reference cannot be resolved to either a member or a namespace, the method writes the code reference as plain text without a hyperlink.
MarkupWriter.WriteDocLink(ICustomAttribute, IDocumentationContext, NameQualifier)
public virtual void WriteDocLink(ICustomAttribute attribute, IDocumentationContext context, NameQualifier qualifier)Parameters
attributeICustomAttribute- The attribute for which the link is written.
contextIDocumentationContext- The documentation context used to resolve the link and format the attribute and its parameters.
qualifierNameQualifier- The level of qualification to use for the attribute's name.
Exceptions
- ArgumentNullException
- Thrown when
contextorattributeisnull.
Remarks
context to resolve the documentation URL of the attribute and format it. The output includes the attribute's type and any parameters and properties it may have.

The qualification level for the member's name is determined based on the member's type and whether it is part of the current documentation scope.