1. Stylelabs.M.Sdk.Clients

Interface ICommandsClient

Contains functionality to execute commands in Sitecore Content Hub.

Namespace: StylelabsStylelabs.MSdkClients

Assembly: Stylelabs.M.Sdk.dll

Syntax

public interface ICommandsClient

Methods

ExecuteCommandAsync(string, string, JObject)

Executes an Sitecore Content Hub command.

Declaration

Task<JToken> ExecuteCommandAsync(string @namespace, string command, JObject arguments = null)

Parameters

TypeNameDescription
stringnamespaceThe name of the folder containing the command.
stringcommandThe name of the command.
JObjectargumentsThe arguments of the command. If the command has no arguments, null can be specified.

Returns

TypeDescription
Task<>JTokenThe result of the command. If the command has no result, null is returned.

Exceptions

TypeCondition
NotFoundExceptionThe specified command cannot be found.
If you have suggestions for improving this article, let us know!