Interface ICommandParameterBuilder
OptimaJet.Workflow.Core.Model.Builder.ICommandParameterBuilder
Provides fluent configuration for a ParameterDefinitionReference in CommandDefinition.InputParameters.
Namespace: OptimaJet.Workflow.Core.Model.Builder
public interface ICommandParameterBuilder : ICommandBuilder, IProcessDefinitionBuilderType Hierarchy
- ICommandParameterBuilder Current type
- Base interfaces
Methods
ICommandParameterBuilder Name(string name) #Sets ParameterDefinitionReference.Name for the current command input.
Parameters
Name
Type
Description
nameStringThe name used to access and localize the command input.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
ICommandParameterBuilder Parameter(ParameterDefinition parameter) #Associates the current command input with the specified scheme-level ParameterDefinition.
Parameters
Name
Type
Description
parameterParameterDefinitionThe ParameterDefinition of the process parameter that receives the submitted value.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
Exceptions
Type
Description
InvalidOperationExceptionThe existing ParameterDefinitionReference.DefaultValue cannot be deserialized as the ParameterDefinition.Type of
parameter.ICommandParameterBuilder Required() #Sets ParameterDefinitionReference.IsRequired so the current command input requires a non-null value when WorkflowCommand.Validate(out string) validates the command.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
ICommandParameterBuilder NotRequired() #Sets ParameterDefinitionReference.IsRequired so the current command input is optional when WorkflowCommand.Validate(out string) validates the command.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
ICommandParameterBuilder DefaultValue(string defaultValue) #Sets the default value for the current command input from its stored string representation.
Parameters
Name
Type
Description
defaultValueStringThe value to store in ParameterDefinitionReference.DefaultValue. When the linked ParameterDefinition.Type is not string,
defaultValue must be deserializable as that type.Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
Exceptions
Type
Description
InvalidOperationExceptionThe current command input has no linked ParameterDefinition, or
defaultValue cannot be deserialized as the linked ParameterDefinition.Type.ICommandParameterBuilder DefaultValue(object defaultValue) #Serializes
defaultValue and sets it as the default value for the current command input.Parameters
Name
Type
Description
defaultValueObjectThe value to serialize. Its runtime type must be compatible with the linked ParameterDefinition.Type.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
Exceptions
Type
Description
InvalidOperationExceptionThe current command input has no linked ParameterDefinition, or
defaultValue is not an instance of the linked ParameterDefinition.Type.ICommandParameterBuilder ClearDefaultValue() #Clears ParameterDefinitionReference.DefaultValue for the current command input.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
ICommandParameterBuilder CreateCommentary(string comment) #Sets ParameterDefinitionReference.Comment for the current command input, replacing any existing comment.
Parameters
Name
Type
Description
commentStringThe comment text.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
ICommandParameterBuilder AppendCommentary(string comment) #Appends
comment to ParameterDefinitionReference.Comment, inserting a line feed first when the current comment is not empty.Parameters
Name
Type
Description
commentStringThe text to append.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.
ICommandParameterBuilder DeleteCommentary() #Clears ParameterDefinitionReference.Comment for the current command input.
Returns
Type
Description
ICommandParameterBuilderThe current instance of ICommandParameterBuilder.