Table of Contents

Class DeclaredTypes

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

The type an <as-type> clause names (MS-VBAL §5.2.3.1.4), as a session's symbols resolve it.

public static class DeclaredTypes
Inheritance
DeclaredTypes
Inherited Members

Remarks

One resolution for every construct that names a type: the declarations the host defines, and the statements that name one as they run, a ReDim's As clause among them. A type named in two places is the same type in both.

Methods

Of(Symbol?)

The type a symbol that an As clause names declares.

public static VBType? Of(Symbol? symbol)

Parameters

symbol Symbol

The symbol the name resolved to.

Returns

VBType

The type, or null for a symbol that declares none.

Remarks

A class module is its class; an Enum is its enumeration, which a declaration reads as Long (MS-VBAL §5.2.3.4); a user-defined type is its fields, which are symbols of their own in the session once the type is defined.

Resolve(ISymbolResolver, string, Uri, bool)

Resolves a type name as it is written in an As clause.

public static VBType? Resolve(ISymbolResolver resolver, string typeName, Uri scope, bool is64Bit)

Parameters

resolver ISymbolResolver

The session's symbols.

typeName string

The name: an intrinsic type's (Long), a workspace or library type's (Point), or one qualified by its module, project or library (Shapes.Point, VBA.VbDayOfWeek).

scope Uri

The module or procedure the name is written in, which the name is resolved as seen from.

is64Bit bool

Whether the environment is 64-bit, which decides what a LongPtr is.

Returns

VBType

The type, or null when the name resolves to no type.