Table of Contents

Class DictionaryAccessExpressionStaticSemantics

Namespace
RDCore.SDK.Semantics.Static.Expressions
Assembly
RDCore.SDK.dll

MS-VBAL 5.6.14 Dictionary Access Expressions (static semantics). owner!member is syntactically an alternate way to invoke Owner's default member with a String argument — its declared type is that default member's declared type.

public sealed record DictionaryAccessExpressionStaticSemantics : IStaticSemantics, IEquatable<DictionaryAccessExpressionStaticSemantics>
Inheritance
DictionaryAccessExpressionStaticSemantics
Implements
Inherited Members

Properties

Instance

The shared instance — this rule has no state of its own.

public static DictionaryAccessExpressionStaticSemantics Instance { get; }

Property Value

DictionaryAccessExpressionStaticSemantics

Methods

DetermineDeclaredType(StaticEvaluationContext, ExpressionNode, params VBType[])

Determines the declared type of a DictionaryAccessExpressionNode from its Owner's already-determined declared type.

public StaticSemanticsEvaluationResult DetermineDeclaredType(StaticEvaluationContext context, ExpressionNode expression, params VBType[] operandDeclaredTypes)

Parameters

context StaticEvaluationContext

The compile-time context this expression is evaluated against. Unused — member lookup here is structural (the owner type's declared default member), not lexical.

expression ExpressionNode

The DictionaryAccessExpressionNode being evaluated.

operandDeclaredTypes VBType[]

The effective owner's already-determined declared type, at DictionaryAccessOwner — Owner's declared type, or, for a with-expression (Owner is null), the innermost enclosing With block's target type (MS-VBAL §5.6.15), which the caller is responsible for substituting in — this rule doesn't care which it was. Member has no independent declared type — it's the bare name passed as a String argument to the owner's default member, not a lexically resolved expression.

Returns

StaticSemanticsEvaluationResult

Exceptions

ArgumentException

expression is not a DictionaryAccessExpressionNode.