Assembly: OptimaJet.Workflow.Core

Interface ICommandBuilder

OptimaJet.Workflow.Core.Model.Builder.ICommandBuilder

Provides fluent configuration for a CommandDefinition, including its CommandDefinition.InputParameters, CommandDefinition.Comment, and localized names.

public interface ICommandBuilder : IProcessDefinitionBuilder

Type Hierarchy

Methods

ICommandBuilder Ref(out CommandDefinition commandDefinition) #
Provides access to the CommandDefinition currently being configured.

Parameters

Name
Type
Description
commandDefinition
CommandDefinition
When this method returns, contains the CommandDefinition currently being configured.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder Name(string name) #
Sets the command name of the current CommandDefinition.

Parameters

Name
Type
Description
name
String
The new command name.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandParameterBuilder CreateCommandParameter(string name, ParameterDefinition parameter) #
Adds a command input that maps a value supplied under name to parameter.

Parameters

Name
Type
Description
name
String
The name used to identify the command input when preparing the command for execution.
parameter
ParameterDefinition
The ParameterDefinition of the process parameter that receives the submitted value.

Returns

Type
Description
ICommandParameterBuilder
An ICommandParameterBuilder for configuring the newly added command input.

Exceptions

Type
Description
CommandParameterAlreadyExistsException
A command input named name already exists in the current command.
ICommandParameterBuilder CreateOrUpdateCommandParameter(string name, ParameterDefinition parameter) #
Adds a command input named name, or updates the existing input with that name to map its submitted value to parameter.

Parameters

Name
Type
Description
name
String
The name used to identify the command input when preparing the command for execution.
parameter
ParameterDefinition
The ParameterDefinition of the process parameter that receives the submitted value.

Returns

Type
Description
ICommandParameterBuilder
An ICommandParameterBuilder for configuring the added or updated command input.

Exceptions

Type
Description
InvalidOperationException
The existing input has a ParameterDefinitionReference.DefaultValue that cannot be deserialized as the ParameterDefinition.Type of parameter.
ICommandParameterBuilder UpdateCommandParameter(string name) #
Selects the existing ParameterDefinitionReference named name for further configuration.

Parameters

Name
Type
Description
name
String
The command input name.

Returns

Type
Description
ICommandParameterBuilder
An ICommandParameterBuilder for configuring the selected command input.

Exceptions

Type
Description
CommandParameterNotFoundException
The current command has no command input named name.
ICommandBuilder DeleteCommandParameter(string name) #
Removes the command input named name from CommandDefinition.InputParameters, if it exists.

Parameters

Name
Type
Description
name
String
The command input name.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder CreateCommentary(string comment) #
Sets CommandDefinition.Comment for the current command, replacing any existing comment.

Parameters

Name
Type
Description
comment
String
The comment text.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder AppendCommentary(string comment) #
Appends comment to CommandDefinition.Comment, inserting a line feed first when the current comment is not empty.

Parameters

Name
Type
Description
comment
String
The text to append.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder DeleteCommentary() #
Clears CommandDefinition.Comment for the current command.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder CreateOrUpdateLocalization(CultureInfo culture, string value, bool isDefault = false) #
Adds or updates a Translation for the current command and culture using LocalizeType.Command.

Parameters

Name
Type
Description
culture
CultureInfo
The CultureInfo for the localized command name.
value
String
The localized command name.
isDefault
Boolean
Whether to set Translation.IsDefault so the translation can be used when no translation matches the requested culture.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder DeleteLocalization(CultureInfo culture) #
Removes the Translation for the current command and culture, if it exists.

Parameters

Name
Type
Description
culture
CultureInfo
The CultureInfo of the translation to remove.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.
ICommandBuilder DeleteAllLocalizations() #
Removes all Translation entries for the current command that use LocalizeType.Command.

Returns

Type
Description
ICommandBuilder
The current instance of ICommandBuilder.