Table of Contents

Interface IServerCommand

Namespace
RDCore.SDK.Server.Commands
Assembly
RDCore.SDK.dll

A command a client asks a server to run (LSP 3.17 §Execute a command): what a client cannot do itself, and no other request of the protocol does - rdcore.importProject makes a .rdproj of a VB6 project.

public interface IServerCommand

Remarks

A server advertises the names of its commands (executeCommandProvider.commands), and a client routes those to it. A command the client runs itself - rdcore.rename, which asks its user for a name - is none of them, and is not advertised: a client would route it to the server.

Properties

Name

The name a client asks for the command by: rdcore. and what it does.

string Name { get; }

Property Value

string

Methods

ExecuteAsync(JArray?, IServerCommandContext, CancellationToken)

Runs the command.

Task<JToken?> ExecuteAsync(JArray? arguments, IServerCommandContext context, CancellationToken token)

Parameters

arguments JArray

The arguments the client sends, as it sends them.

context IServerCommandContext

What the command can ask of the client while it runs.

token CancellationToken

A token that cancels the command.

Returns

Task<JToken>

What the command answers the client with; null for nothing.

Exceptions

ServerCommandRefusedException

The command was not run, for a reason the client's user is told.