Class ParametersCollection
Represent a collection of process's parameters
Inheritance
↳ object
↳ ParametersCollection
Implements
IEnumerable<ParameterDefinitionWithValue>
IEnumerable
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Model
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic sealed class ParametersCollection : IEnumerable<ParameterDefinitionWithValue>, IEnumerable
Constructors
ParametersCollection(List<ParameterDefinitionWithValue>, ProcessInstance)
Declarationpublic ParametersCollection(List<ParameterDefinitionWithValue> parameters, ProcessInstance owner)
Type | Name | Description |
---|---|---|
List<ParameterDefinitionWithValue> | parameters | |
ProcessInstance | owner |
ParametersCollection(IEnumerable<ParameterDefinitionWithValue>, ProcessInstance)
Declarationpublic ParametersCollection(IEnumerable<ParameterDefinitionWithValue> parameters, ProcessInstance owner)
Type | Name | Description |
---|---|---|
IEnumerable<ParameterDefinitionWithValue> | parameters | |
ProcessInstance | owner |
ParametersCollection(ProcessInstance)
Declarationpublic ParametersCollection(ProcessInstance owner)
Type | Name | Description |
---|---|---|
ProcessInstance | owner |
Methods
GetEnumerator()
Declarationpublic IEnumerator<ParameterDefinitionWithValue> GetEnumerator()
Type | Description |
---|---|
IEnumerator<ParameterDefinitionWithValue> |
AddParameter(ParameterDefinitionWithValue)
Adds parameter to process parameters collection
Declarationpublic void AddParameter(ParameterDefinitionWithValue parameter)
Type | Name | Description |
---|---|---|
ParameterDefinitionWithValue | parameter | Parameter with value <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue" data-throw-if-not-resolved="false"></xref> |
AddParameters(IEnumerable<ParameterDefinitionWithValue>)
Adds parameters to process parameters collection
Declarationpublic void AddParameters(IEnumerable<ParameterDefinitionWithValue> parameters)
Type | Name | Description |
---|---|---|
IEnumerable<ParameterDefinitionWithValue> | parameters | Collection of parameters with value <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue" data-throw-if-not-resolved="false"></xref> |
ReplaceParameters(List<ParameterDefinitionWithValue>)
Replace parameters collection by new value
Declarationpublic void ReplaceParameters(List<ParameterDefinitionWithValue> parameters)
Type | Name | Description |
---|---|---|
List<ParameterDefinitionWithValue> | parameters | >Collection of parameters with value <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue" data-throw-if-not-resolved="false"></xref> |
IsParameterExisting(string)
Checks that the parameter whether exists or not
Declarationpublic bool IsParameterExisting(string name)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
Type | Description |
---|---|
bool | true if exists |
GetParameter(string)
Returns parameter with value ParameterDefinitionWithValue with specific name
Declarationpublic ParameterDefinitionWithValue GetParameter(string name)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
Type | Description |
---|---|
ParameterDefinitionWithValue | Parameter with value <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue" data-throw-if-not-resolved="false"></xref> |
GetParameterAsync(string)
Returns parameter with value ParameterDefinitionWithValue with specific name (Async version)
Declarationpublic Task<ParameterDefinitionWithValue> GetParameterAsync(string name)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
Type | Description |
---|---|
Task<ParameterDefinitionWithValue> | Parameter with value <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue" data-throw-if-not-resolved="false"></xref> |
GetParameter<T>(string)
Returns parameter's value by specific name
Declarationpublic T GetParameter<T>(string name)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
Type | Description |
---|---|
{T} | Value of the parameter |
GetParameterAsync<T>(string)
Returns parameter's value by specific name (Async version)
Declarationpublic Task<T> GetParameterAsync<T>(string name)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
Type | Description |
---|---|
Task<T> | Value of the parameter |
SetParameter<T>(string, T, ParameterPurpose)
Set value of the parameter with specific name. If the definition of the parameter with specific name is absent in the scheme of the process ProcessDefinition.Parameters, there will be created Temporary parameter ParameterDefinition.Purpose with specified name
Declarationpublic void SetParameter<T>(string name, T value, ParameterPurpose purposeIfMissing = ParameterPurpose.Temporary)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
{T} | value | Value of the parameter |
ParameterPurpose | purposeIfMissing | Set it to ParameterPurpose.Persistence if you want persist this parameter forcibly |
SetParameterAsync<T>(string, T, ParameterPurpose)
Set value of the parameter with specific name. Async version If the definition of the parameter with specific name is absent in the scheme of the process ProcessDefinition.Parameters, there will be created Temporary parameter ParameterDefinition.Purpose with specified name.
Declarationpublic Task SetParameterAsync<T>(string name, T value, ParameterPurpose purposeIfMissing = ParameterPurpose.Temporary)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
{T} | value | Value of the parameter |
ParameterPurpose | purposeIfMissing | Set it to ParameterPurpose.Persistence if you want persist this parameter forcibly |
Type | Description |
---|---|
Task |
SetImplicitSerializedParameter(string, string, ParameterPurpose)
Sets implicit parameter using it's json serialized value
Declarationpublic void SetImplicitSerializedParameter(string name, string value, ParameterPurpose purposeIfMissing = ParameterPurpose.Temporary)
Type | Name | Description |
---|---|---|
string | name | Name of the parameter |
string | value | JSON serialized value of implicit parameter |
ParameterPurpose | purposeIfMissing | Parameter purpose |
RemoveParameter(string, bool)
Set null to process parameter value
Declarationpublic void RemoveParameter(string name, bool removeFromCollection = false)
Type | Name | Description |
---|---|---|
string | name | Parameter name |
bool | removeFromCollection | If true physically remove <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue" data-throw-if-not-resolved="false"></xref> from collection |
InitPersistenceParametersFromScheme()
Declarationpublic void InitPersistenceParametersFromScheme()