sealed class Tinman.Core.Cx.CxLibrary

Derived from

CxNode abstract

A library is a collection of CxCodeUnit objects.

A CxLibrary object is used to group CxCodeUnit objects logically, so that they may resolve their references. Each library contains code units for the following pre-defined simple types (see CxTypeSimple.TypeName):

Additionally, the following bootstrap system types are defined:

  • System.Array

  • System.Attribute

  • System.AttributeTargets

  • System.AttributeUsageAttribute

  • System.Collections.Generic.IEnumerable

  • System.Collections.Generic.IEnumerator

  • System.ComponentModel.BrowsableAttribute

  • System.Exception

  • System.FlagsAttribute

  • System.IComparable

  • System.IDisposable

  • System.IEquatable

  • System.IndexOutOfRangeException

  • System.IntPtr

  • System.InvalidCastException

  • System.NotImplementedException

  • System.NullReferenceException

  • System.Object

  • System.OutOfMemoryException

  • System.String

Public / Constructors


public constructor CxLibrary → (1)

codeUnits opt : IBagConst<CxCodeUnit> = null

The code unit list or null for an empty list. See ICxNamespaceContainer.CodeUnits.

Creates a new instance of CxLibrary.

Public / Methods


public method Add → (1)

codeUnit in : CxCodeUnit

The code unit to add.

returns → bool

true if the code unit has been added,
false if another code unit with the same declaration name already exists.

Adds the given code unit to this library.

Before returning true, this method calls IPsiNode.Resolve on codeUnit in. To resolve all references, it might be necessary to make a final call to IPsiNode.Resolve on this library, for example if there are cyclic references or if the code units have been added in the wrong order (i.e. referencing first, referenced last).