CSharp.WriteName Method
- Namespace
- Kampute.DocToolkit.Languages
- Assembly
- Kampute.DocToolkit.dll
Definition
Writes the name of a member formatted according to C# syntax rules to the provided TextWriter.
public virtual void WriteName(
TextWriter writer,
IMember member,
NameQualifier qualifier,
MemberDocLinker linker = null)Parameters
writerTextWriter- The TextWriter to which the member's name is written.
memberIMember- The member whose name is to be written.
qualifierNameQualifier- The level of qualification to apply to the member's name.
linkerMemberDocLinker optional- An optional delegate for linking to the documentation of a type or type's member.
Exceptions
- ArgumentNullException
- Thrown when
writerormemberisnull.
Remarks
The formatting rules for different member types are detailed below:
If the member type is not recognized, the member's name is written as is.
| Member Type | Formatted Name and Example |
|---|---|
| IType | Type name, including its generic parameters and modifiers (e.g., "Dictionary<TKey, TValue>, "string[]", "int*") |
| IField | Field name (e.g., "MinValue") |
| IConstructor | Empty string |
| IMethod | Method name without generic parameters (e.g., "Calculate") |
| IProperty | Property name (e.g., "Count", "Item[]") |
| IEvent | Event name (e.g., "ValueChanged") |
| IOperator | Operator name (e.g., "Addition") |
