Interface ICommandBuilder
OptimaJet.Workflow.Core.Model.Builder.ICommandBuilder
Provides fluent configuration for a CommandDefinition, including its CommandDefinition.InputParameters, CommandDefinition.Comment, and localized names.
Namespace: OptimaJet.Workflow.Core.Model.Builder
public interface ICommandBuilder : IProcessDefinitionBuilderType Hierarchy
- ICommandBuilder Current type
- Base interfaces
- Derived interfaces
Methods
ICommandBuilder Ref(out CommandDefinition commandDefinition) #Provides access to the CommandDefinition currently being configured.
Parameters
Name
Type
Description
commandDefinitionCommandDefinitionWhen this method returns, contains the CommandDefinition currently being configured.
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.
ICommandBuilder Name(string name) #Sets the command name of the current CommandDefinition.
Parameters
Name
Type
Description
nameStringThe new command name.
Returns
Type
Description
ICommandBuilderThe 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
nameStringThe name used to identify the command input when preparing the command for execution.
parameterParameterDefinitionThe ParameterDefinition of the process parameter that receives the submitted value.
Returns
Type
Description
ICommandParameterBuilderAn ICommandParameterBuilder for configuring the newly added command input.
Exceptions
Type
Description
CommandParameterAlreadyExistsExceptionA 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
nameStringThe name used to identify the command input when preparing the command for execution.
parameterParameterDefinitionThe ParameterDefinition of the process parameter that receives the submitted value.
Returns
Type
Description
ICommandParameterBuilderAn ICommandParameterBuilder for configuring the added or updated command input.
Exceptions
Type
Description
InvalidOperationExceptionThe 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
nameStringThe command input name.
Returns
Type
Description
ICommandParameterBuilderAn ICommandParameterBuilder for configuring the selected command input.
Exceptions
Type
Description
CommandParameterNotFoundExceptionThe 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
nameStringThe command input name.
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.
ICommandBuilder CreateCommentary(string comment) #Sets CommandDefinition.Comment for the current command, replacing any existing comment.
Parameters
Name
Type
Description
commentStringThe comment text.
Returns
Type
Description
ICommandBuilderThe 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
commentStringThe text to append.
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.
ICommandBuilder DeleteCommentary() #Clears CommandDefinition.Comment for the current command.
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.
ICommandBuilder CreateOrUpdateLocalization(CultureInfo culture, string value, bool isDefault = false) #Parameters
Name
Type
Description
valueStringThe localized command name.
isDefaultBooleanWhether to set Translation.IsDefault so the translation can be used when no translation matches the requested culture.
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.
ICommandBuilder DeleteLocalization(CultureInfo culture) #Removes the Translation for the current command and
culture, if it exists.Parameters
Name
Type
Description
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.
ICommandBuilder DeleteAllLocalizations() #Removes all Translation entries for the current command that use LocalizeType.Command.
Returns
Type
Description
ICommandBuilderThe current instance of ICommandBuilder.