Table of Contents

Class IntrinsicVBTypes

Namespace
RDCore.SDK.Model.Types
Assembly
RDCore.SDK.dll

The MS-VBAL 3.3.2 reserved data-type names and 3.3.1 type-declaration characters, each mapped to its singleton VBType. This is the intrinsic-only fallback every component shares when binding a declared type from a bare name without a project or library resolver — the language server's AST symbol provider and the environment host's rdcore/host/symbols/define handler resolve intrinsics identically from here, so a type that is VBUnknownType on one side is VBUnknownType on the other.

public static class IntrinsicVBTypes
Inheritance
IntrinsicVBTypes
Inherited Members

Remarks

LongPtr is deliberately absent: its width depends on the host bitness (IRuntimeEnvironmentProfile.Is64Bit), so a resolver that knows the profile must bind it.

Methods

TryResolve(string, out VBType?)

Resolves an intrinsic type by its reserved name (case-insensitive).

public static bool TryResolve(string typeName, out VBType? type)

Parameters

typeName string
type VBType

Returns

bool

TryResolveTypeHint(string, out VBType?)

Resolves the intrinsic type named by an MS-VBAL 3.3.1 type-declaration character (%, &, ^, !, #, @, $).

public static bool TryResolveTypeHint(string typeHint, out VBType? type)

Parameters

typeHint string
type VBType

Returns

bool

TryResolveValueType(Type, out VBType?)

Resolves the intrinsic type whose run-time values are of the given VBTypedValue implementation - the reverse of CreateValue(IBindingHandle).

public static bool TryResolveValueType(Type valueType, out VBType? type)

Parameters

valueType Type

The VBTypedValue implementation to resolve the type of.

type VBType

The intrinsic type whose values are of that implementation.

Returns

bool

Remarks

This is how a declaration written in C# states an intrinsic VBA type: naming the value a member produces or a parameter accepts names the type, without restating it. The standard-library interfaces in RDCore.SDK.Runtime.Abstract.StdLib are declared that way.

The mapping covers exactly the intrinsics a declaration can name, which is the same set TryResolve(string, out VBType?) resolves by name. The values that have no declarable type - a VBEmptyValue, a VBMissingValue, a VBErrorValue - are subtypes a Variant holds rather than types anything is declared as, and resolve here no more than Dim x As Empty compiles. LongPtr is absent for the same reason it is absent by name: its width depends on the host bitness.