LanguageExtensions.FormatCodeReference Method
- Namespace
- Kampute.DocToolkit.Languages
- Assembly
- Kampute.DocToolkit.dll
Definition
Formats the given code reference (cref) according to syntax rules of the language.
public static string FormatCodeReference(this IProgrammingLanguage language, string cref, Func<IMember, NameQualifier> qualifierSelector = null)Parameters
languageIProgrammingLanguage- The IProgrammingLanguage instance.
crefstring- The code reference string to format.
qualifierSelectorFunc<IMember, NameQualifier> optional- An optional function to determine the level of qualification for the member's name; if not provided, defaults to NameQualifier.DeclaringType.
Returns
- string
- A formatted representation of the code reference according to syntax rules of the language if it can be resolved; otherwise, the original
crefstring.
Exceptions
- ArgumentNullException
- Thrown when
languageorcrefisnull.
