Class CompositeSymbolResolver
Chains ISymbolResolvers: Resolve(string, ScopeKind, Uri) tries each in order and returns the first result that is not IsUnbound — a bound symbol, or an error result (a duplicate or ambiguous name found by an earlier resolver is not masked by a later fallback). The result is unbound only when every resolver is unbound.
public sealed class CompositeSymbolResolver : ISymbolResolver
- Inheritance
-
CompositeSymbolResolver
- Implements
- Inherited Members
Remarks
A compile-time composite — the value-binding members throw. Used to layer a workspace's ScopeTreeSymbolResolver over an intrinsic type-name resolver, most specific first.
Constructors
CompositeSymbolResolver(params ISymbolResolver[])
Chains ISymbolResolvers: Resolve(string, ScopeKind, Uri) tries each in order and returns the first result that is not IsUnbound — a bound symbol, or an error result (a duplicate or ambiguous name found by an earlier resolver is not masked by a later fallback). The result is unbound only when every resolver is unbound.
public CompositeSymbolResolver(params ISymbolResolver[] resolvers)
Parameters
resolversISymbolResolver[]The resolvers to try, in priority order.
Remarks
A compile-time composite — the value-binding members throw. Used to layer a workspace's ScopeTreeSymbolResolver over an intrinsic type-name resolver, most specific first.
Methods
GetValue(Symbol)
Gets the IBindingHandle currently associated with the specified Symbol.
public IBindingHandle GetValue(Symbol symbol)
Parameters
Returns
Resolve(string, ScopeKind, Uri)
Resolves the specified identifier name as seen from the scope the symbol at
handle belongs to.
public SymbolResolutionResult Resolve(string name, ScopeKind scope, Uri handle)
Parameters
namestringThe name of the Symbol to resolve.
scopeScopeKindA memory-scope hint; the compile-time resolver does not consult it.
handleUriThe Uri of the symbol the lookup originates from.
Returns
- SymbolResolutionResult
A SymbolResolutionResult — the bound Symbol, an unbound result, or a DuplicateDeclaration / AmbiguousName error with the colliding candidates.
TryRead(MemoryAddress, out IBindingHandle?)
Gets the IBindingHandle at the specified address in the runtime memory map.
public bool TryRead(MemoryAddress address, out IBindingHandle? value)
Parameters
addressMemoryAddressThe memory address to read.
valueIBindingHandleThe retrieved binding, if successful.