Assembly: OptimaJet.Workflow.Core

Interface ICommandParameterBuilder

OptimaJet.Workflow.Core.Model.Builder.ICommandParameterBuilder

Provides fluent configuration for a ParameterDefinitionReference in CommandDefinition.InputParameters.

public interface ICommandParameterBuilder : ICommandBuilder, IProcessDefinitionBuilder

Type Hierarchy

Methods

ICommandParameterBuilder Name(string name) #
Sets ParameterDefinitionReference.Name for the current command input.

Parameters

Name
Type
Description
name
String
The name used to access and localize the command input.

Returns

Type
Description
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.
ICommandParameterBuilder Parameter(ParameterDefinition parameter) #
Associates the current command input with the specified scheme-level ParameterDefinition.

Parameters

Name
Type
Description
parameter
ParameterDefinition
The ParameterDefinition of the process parameter that receives the submitted value.

Returns

Type
Description
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.

Exceptions

Type
Description
InvalidOperationException
The 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
ICommandParameterBuilder
The 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
ICommandParameterBuilder
The 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
defaultValue
String
The value to store in ParameterDefinitionReference.DefaultValue. When the linked ParameterDefinition.Type is not string, defaultValue must be deserializable as that type.

Returns

Type
Description
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.

Exceptions

Type
Description
InvalidOperationException
The 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
defaultValue
Object
The value to serialize. Its runtime type must be compatible with the linked ParameterDefinition.Type.

Returns

Type
Description
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.

Exceptions

Type
Description
InvalidOperationException
The 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
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.
ICommandParameterBuilder CreateCommentary(string comment) #
Sets ParameterDefinitionReference.Comment for the current command input, replacing any existing comment.

Parameters

Name
Type
Description
comment
String
The comment text.

Returns

Type
Description
ICommandParameterBuilder
The 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
comment
String
The text to append.

Returns

Type
Description
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.
ICommandParameterBuilder DeleteCommentary() #
Clears ParameterDefinitionReference.Comment for the current command input.

Returns

Type
Description
ICommandParameterBuilder
The current instance of ICommandParameterBuilder.