IProgrammingLanguage Interface

Namespace
Kampute.DocToolkit.Languages
Assembly
  • Kampute.DocToolkit.dll

Definition

Represents a .NET programming language.
public interface IProgrammingLanguage
Implemented by

Remarks

The IProgrammingLanguage interface defines a contract for language-specific formatters that can render code elements according to the syntax rules of a particular programming language. This abstraction allows the documentation system to:
  • Format code elements according to the syntax rules of the target language
  • Provide language-specific features like syntax highlighting identifiers and keyword documentation links
Implementations of this interface encapsulate the rules and formatting conventions of specific languages (such as C#, F#, etc.), allowing the documentation system to produce language-appropriate representations of code elements without needing to know the details of each language's syntax.

Properties

IdentifierGets the identifier for signature highlighting of code written in this language.
NameGets the name of the language.

Methods

TryGetUrl(string, out Uri)Attempts to retrieve the official documentation URL for the specified language keyword.
WriteAttribute(TextWriter, ICustomAttribute, NameQualifier, MemberDocLinker)Writes the specified attribute formatted according to the syntax rules of the language to the provided TextWriter.
WriteConstantValue(TextWriter, object, IType, MemberDocLinker)Writes a constant value formatted according to the syntax rules of the language to the provided TextWriter.
WriteDefinition(TextWriter, IMember, MemberDocLinker)Writes the definition of a specified member formatted according to syntax rules of the language to the provided TextWriter.
WriteName(TextWriter, IMember, NameQualifier, MemberDocLinker)Writes the name of a member formatted according to the syntax rules of the language to the provided TextWriter.
WriteSignature(TextWriter, IMember, NameQualifier, MemberDocLinker)Writes the signature of a member formatted according to the syntax rules of the language to the provided TextWriter.

Extension Methods

FormatAttribute(this IProgrammingLanguage, ICustomAttribute, NameQualifier)Formats the specified custom attribute according to syntax rules of the language.
FormatCodeReference(this IProgrammingLanguage, string, Func<IMember, NameQualifier>)Formats the given code reference (cref) according to syntax rules of the language.
FormatDefinition(this IProgrammingLanguage, IMember)Formats the definition of the specified member according to syntax rules of the language.
FormatLiteral(this IProgrammingLanguage, object)Formats the given literal value according to syntax rules of the language.
FormatName(this IProgrammingLanguage, IMember, NameQualifier)Formats the name of the specified member according to syntax rules of the language.
FormatSignature(this IProgrammingLanguage, IMember, NameQualifier)Formats the signature of the specified member according to syntax rules of the language.