Table of Contents

Class CurrentTypes

Namespace
RDCore.SDK.Model.Symbols
Assembly
RDCore.SDK.dll

The class a declaration is of, as the composition has it now.

public static class CurrentTypes
Inheritance
CurrentTypes
Inherited Members

Remarks

A declaration bound to a class of the workspace (Dim o As Widget) holds the class by its identity, and what the class declares - its members, its default member (MS-VBAL §5.5.1.2.13) - is read from the class as it is when it is asked, not as it was when the declaration was bound: a module listed before the class it uses is bound before the class is composed (HexIDE's findings desk #1). A class of a library is the library's from the start, and so is a type that is more than a class (a Collection).

Methods

Of(ISymbolResolver?, VBType)

The type declared is as the composition has it now: a class as Of(ISymbolResolver?, VBClassType) has it, a user-defined type as Of(ISymbolResolver?, VBUserDefinedType) has it, and a type whose name, qualified by a library, did not resolve when the declaration was read (VBUnresolvedType) resolved in that library now; declared itself for any other type, and for a name that still does not resolve.

public static VBType Of(ISymbolResolver? resolver, VBType declared)

Parameters

resolver ISymbolResolver

The resolver names are bound by, as the composition has it now; null when there is none.

declared VBType

The type a declaration was bound to.

Returns

VBType

The type to read members, the default member, or fields of.

Remarks

A library is read a class at a time, and a member that returns a class of its library that is not read yet is declared as the name of that class, qualified by the library: Cells of a Range returns a Range, the class being read. The name is resolved where the member is used, in the library that qualifies it, and binds to the library's own type: neither the project nor the module that uses the member can declare a type that stands for it.

A name the library does not qualify is a type that neither the library nor a library it depends on declares. It is not resolved: it stays a VBUnresolvedType, a type not known, and what is accessed on it is late-bound, even where the project declares a class of that name.

Of(ISymbolResolver?, VBClassType)

The class of declared as the composition has it now; declared itself when there is nothing to resolve it in, it is a library's, or the composition no longer has it.

public static VBClassType Of(ISymbolResolver? resolver, VBClassType declared)

Parameters

resolver ISymbolResolver

The resolver names are bound by, as the composition has it now; null when there is none.

declared VBClassType

The class a declaration was bound to.

Returns

VBClassType

The class to read members and the default member of.

Of(ISymbolResolver?, VBUserDefinedType)

The user-defined type of declared as the composition has it now, with the fields its declaration has bound; declared itself when there is nothing to resolve it in, it is an external library's, or the composition no longer has it.

public static VBUserDefinedType Of(ISymbolResolver? resolver, VBUserDefinedType declared)

Parameters

resolver ISymbolResolver

The resolver names are bound by, as the composition has it now; null when there is none.

declared VBUserDefinedType

The user-defined type a declaration was bound to.

Returns

VBUserDefinedType

The type to read fields of.

Remarks

A type is declared before its fields are bound (DeclareTypesOnly): a declaration bound to it, in a module listed before the one that declares it, holds the type as it was declared, and a field of it that names another type not yet bound. The type is found again by its name in the module that declares it (MS-VBAL §5.2.3.3), as a member access reads its fields.