CxMemberProperty

Description

sealed class Tinman.Core.Cx.Declarations.CxMemberProperty

A type member that represents a read-write, read-only or write-only property:

...
int Property
{
  get
  {
    return a;
  }
  set
  {
    a = value;
  }
}

...
int Property
{
  get;
  set;
}

If ICxVariableContainer.Variable is not null, the property represents an indexer:

...
int this[int index]
{
  get
  {
    return a[index];
  }
  set
  {
    a[index] = value;
  }
}

ICxTypeContainer.Type returns the value type of this property.
ICxVariableContainer.Variable returns the variable declaration of the indexer parameter of this property.

Public / Constants

Name​Value


public static readonly attribute NameValue → (CxId)

The name of the implicit 'value' parameter of property setters.

Public / Constructors

Cx​Member​Property


public constructor CxMemberProperty → (9)

modifiers in : CxModifiers

See ICxModifiersContainer.Modifiers.

type in : CxType

[not-null]
See ICxTypeContainer.Type.

name in : CxId

See ICxIdContainer.Name. Use CxId.This for indexers.

xmlDoc opt : CxXmlDoc = null

See ICxXmlDocContainer.XmlDoc.

attributes opt : IBagConst<CxAttribute> = null

The attribute list of the property or null for an empty list. See ICxAttributesContainer.Attributes.

semantic opt : int32 = 1

See Semantic.

getter opt : CxStatementBlock = null

See Getter.

setter opt : CxStatementBlock = null

See Setter.

indexer opt : CxVariable = null

See ICxVariableContainer.Variable.

Creates a new instance of CxMemberProperty.

Public / Attributes

Getter


[Constant]
public attribute Getter → (get)

value : CxStatementBlock

The getter accessor or null if this property is not readable or if the getter has no body.

Returns the getter accessor of this property.

Semantic


[Constant]
public attribute Semantic → (get)

value : int32

< 0 : the property is write-only (only setter)
= 0 : the property is read-write (getter and setter)
> 0 : the property is read-only (only getter)

Returns the semantic of this property.

Setter


[Constant]
public attribute Setter → (get)

value : CxStatementBlock

The setter accessor or null if this property is not writeable or if the setter has no body.

Returns the setter accessor of this property.