Class SignatureDescription
- Namespace
- RDCore.SDK.Model.Symbols.Completion
- Assembly
- RDCore.SDK.dll
What a procedure takes, as a signature help shows it (LSP 3.17 §Signature Help): its signature on one line - Function Left(String As
Variant, Length As Long) As Variant - each of its parameters where the line has it, and what the procedure does.
public sealed record SignatureDescription : IEquatable<SignatureDescription>
- Inheritance
-
SignatureDescription
- Implements
- Inherited Members
Remarks
The implicit Me of an instance member is none of its parameters: it is the object the member is called on, and no argument is written for it.
Constructors
SignatureDescription(string, IReadOnlyList<SignatureParameter>, string?)
What a procedure takes, as a signature help shows it (LSP 3.17 §Signature Help): its signature on one line - Function Left(String As
Variant, Length As Long) As Variant - each of its parameters where the line has it, and what the procedure does.
public SignatureDescription(string Label, IReadOnlyList<SignatureParameter> Parameters, string? Documentation = null)
Parameters
LabelstringThe signature, on one line.
ParametersIReadOnlyList<SignatureParameter>The parameters, in the order they are declared.
DocumentationstringWhat the procedure does, in a sentence: its doc string (DocString); null when it has none.
Remarks
The implicit Me of an instance member is none of its parameters: it is the object the member is called on, and no argument is written for it.
Properties
Documentation
public string? Documentation { get; init; }
Property Value
Label
The signature, on one line.
public string Label { get; init; }
Property Value
NamesArePlaceholders
Whether the names of the parameters stand in for names the procedure does not have: the specification names the parameters of a few functions of the
standard library Arg1, Arg2 and so on (InStr, InStrB, MS-VBAL §6.1.2.11.1.14), and MS-VBA takes none of
them as the name of a named argument.
public bool NamesArePlaceholders { get; init; }
Property Value
Parameters
The parameters, in the order they are declared.
public IReadOnlyList<SignatureParameter> Parameters { get; init; }
Property Value
Methods
ActiveParameterOf(int, string?)
The parameter an argument is given to: the one it names, or the one at its position - the ParamArray for every argument from where it is on.
public int? ActiveParameterOf(int argumentIndex, string? argumentName = null)
Parameters
argumentIndexintThe position of the argument, from 0.
argumentNamestringThe name a named argument is written with (
Prompt:=); null for one that is not named.
Returns
Of(Symbol)
The signature of a procedure, a function or a property; null for a symbol that is not called.
public static SignatureDescription? Of(Symbol symbol)
Parameters
symbolSymbolThe symbol.
Returns
OfCall(Symbol?, ISymbolResolver?)
The signature of what a call written as a name and an argument list calls (p(1, 2), o.Items(1), Me(1)), called
being what the name binds to; null when it is nothing a call can be made of.
public static SignatureDescription? OfCall(Symbol? called, ISymbolResolver? resolver)
Parameters
calledSymbolWhat the name of the call binds to; null when it binds to nothing.
resolverISymbolResolverThe resolver names are bound by, which a class of the workspace is read from as the composition has it now, and which resolves the class a member of a library returns by its name (CurrentTypes); null when there is none.
Returns
Remarks
A procedure that takes arguments is what is called, and so is a Sub. An argument list after anything else (a variable, a constant, a function or
a Property Get that takes no arguments) is given to what that is: to the default member of its class, for an object (MS-VBAL
§5.6.13). When that default member takes no arguments, the default member of the class it returns is followed in turn, until a member takes
arguments: the signature is that member's, under its own name.
An array is indexed, and a value of any other type, or an object of a class with no default member, takes no argument list: neither has a signature. A function that takes no arguments and returns no object with a default member has its own.
ToSignatureInformation(int?)
The signature as LSP has it: each parameter by where it is in the label.
public SignatureInformation ToSignatureInformation(int? activeParameter = null)
Parameters
activeParameterint?The parameter the argument at the cursor is given to (ActiveParameterOf(int, string?)).