Class DescribedSymbols
What a SymbolDescription says of a symbol of the language model: its kind, its scope, and the facts the environment host has of its declaration.
public static class DescribedSymbols
- Inheritance
-
DescribedSymbols
- Inherited Members
Methods
Describe(Symbol, string)
What the language model has of a symbol: its kind and scope, its library, its declared type, its access and its documentation.
public static SymbolDescription Describe(Symbol symbol, string declaration)
Parameters
Returns
- SymbolDescription
The symbol's description, without the facts of the environment host.
Remarks
The facts only the environment host has are not known (WithFacts(SymbolDescription, DeclarationFactDto?) adds them), and neither are where the symbol is declared, its container and the class of the control array it is an element of: the caller has them from where it found the symbol.
KindOf(Symbol)
What a symbol is.
public static DescribedSymbolKind KindOf(Symbol symbol)
Parameters
symbolSymbolThe symbol.
Returns
Remarks
A control of a form's designer is a Control (DesignerControl), and the accessors of a property are each a Property. A symbol of a library is described by its Kind: a field, and any kind with no counterpart, is a Variable.
OutlineOf(Uri, IEnumerable<Symbol>, Func<Symbol, string>)
The outline of what a module declares: one entry for each of its members, in the order of the symbols.
public static IReadOnlyList<OutlineEntry> OutlineOf(Uri module, IEnumerable<Symbol> symbols, Func<Symbol, string> declarationOf)
Parameters
moduleUriThe address of the module (Module(Uri, string)).
symbolsIEnumerable<Symbol>The module's symbols, and the symbols of its members.
declarationOfFunc<Symbol, string>A symbol's declaration, as code would write it.
Returns
- IReadOnlyList<OutlineEntry>
The module's entries, an empty list when it declares no member.
Remarks
The accessors of a property are one entry, whose range spans them all, whose selection range and declaration are its Property Get's when it has
one, and whose Accessors names each of them. The constants of an enumeration and the members of a user-defined type are
the children of its entry. A symbol declared in more than one conditional-compilation branch is at its primary declaration
(PrimaryRange). The locals and parameters of a procedure are not in the outline.
ScopeOf(Symbol)
Where a symbol is declared: in a procedure (a local, a parameter), in a library (Library), or else in a module.
public static DescribedScope ScopeOf(Symbol symbol)
Parameters
symbolSymbolThe symbol.
Returns
WithFacts(SymbolDescription, DeclarationFactDto?)
The description, with what the environment host knows of the symbol's declaration: whether it is implicit, its role, its references, what it hides, and the class it auto-instantiates.
public static SymbolDescription WithFacts(this SymbolDescription description, DeclarationFactDto? fact)
Parameters
descriptionSymbolDescriptionThe description.
factDeclarationFactDtoThe host's fact of the declaration (Declarations); null when the host has none, which leaves those facts null: not known.