CxXmlDocReference

Description

sealed class Tinman.Core.Cx.XmlDoc.CxXmlDocReference

Represents the content of a cref attribute and references a type or member:

Referring to a member or type:
<... cref="name">
<... cref="name{...}">
Referring to a member in a generic type:
<... cref="name-a{...}.name-b">
<... cref="name-a{...}.name-b{...}">
Referring to a method:
<... cref="name(...)">
<... cref="name{...}(...)">
<... cref="name-a{...}.name-b(...)">
<... cref="name-a{...}.name-b{...}(...)">

where name corresponds to ICxNameContainer.Name, {...} to Arguments, (…​) to ICxTypesContainer.Types, name-a to CxName.Parent of ICxNameContainer.Name and name-b to CxName.Last of ICxNameContainer.Name.

ICxNameContainer.Name returns the name of the referenced type or member.
ICxTypesContainer.Types returns the list of method parameter types, which will be null if this is not an explicit reference to a method.

See also

CxXmlDocItemSee

Public / Constructors

Cx​Xml​Doc​Reference


public constructor CxXmlDocReference → (3)

name in : CxName

See CxName.

arguments opt : Vec3I = default(Vec3I)

See Arguments.

types opt : IBagConst<CxType> = null

See ICxTypesContainer.Types. Iff null, IsMethod will return false.

Creates a new instance of CxXmlDocReference.

Public / Attributes

Arguments


[Constant]
public attribute Arguments → (get)

value : Vec3I

Vec3I.X : IBagConst.Count of ICxTypeParametersContainer.TypeParameters of ICxReference.Resolved or 0 if not generic,
Vec3I.Y : IBagConst.Count of ICxTypeParametersContainer.TypeParameters of CxNode.EnclosingDeclaration of ICxReference.Resolved or 0 if not generic,
Vec3I.Z : the number of type parameter lists, will be either 1 or 2.

Returns the number of generic type parameters of the type and/or member referred to by ICxNameContainer.Name.

In source code, type parameters should have the same names as in the generic declaration and must appear in the same order.

Is​Member


[Constant]
public attribute IsMember → (get)

value : bool

true if this is an explicit reference to a member,
false if it is a non-explicit reference, which may still point to a member.

Is this an explicit reference to a member, using Arguments to split ICxNameContainer.Name into type and member name?

Is​Method


[Constant]
public attribute IsMethod → (get)

value : bool

true if this is an explicit reference to a method,
false if it is a non-explicit reference, which may still point to a method.

Is this an explicit reference to a method, using ICxTypesContainer.Types to refer to the method signature?