Class DeclaredTypes
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
symbolSymbolThe symbol the name resolved to.
Returns
- VBType
The type, or
nullfor 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
resolverISymbolResolverThe session's symbols.
typeNamestringThe 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).scopeUriThe module or procedure the name is written in, which the name is resolved as seen from.
is64BitboolWhether the environment is 64-bit, which decides what a
LongPtris.
Returns
- VBType
The type, or
nullwhen the name resolves to no type.