Assembly: OptimaJet.Workflow.Core

Class DeactivatedDesignerParameterFormatProvider

OptimaJet.Workflow.Core.Runtime.DeactivatedDesignerParameterFormatProvider

Wraps an IDesignerParameterFormatProvider and allows it to be enabled or disabled dynamically.

public class DeactivatedDesignerParameterFormatProvider : IDesignerParameterFormatProvider

Type Hierarchy

Constructors

public DeactivatedDesignerParameterFormatProvider(IDesignerParameterFormatProvider activatedDesignerParameterFormatProvider, Func<bool> getDisabled) #
Initializes a new dynamically switchable wrapper around a designer parameter format provider.

Parameters

Name
Type
Description
activatedDesignerParameterFormatProvider
IDesignerParameterFormatProvider
The provider to which calls are forwarded while getDisabled returns false.
getDisabled
Func<Boolean>
The predicate evaluated for every method call. A result of true selects EmptyDesignerParameterFormatProvider.Value; a result of false selects activatedDesignerParameterFormatProvider.

Methods

public List<CodeActionParameterDefinition> GetFormat(CodeActionType type, string name, string schemeCode) #
Gets the ordered form-field definitions for a named action, condition, or rule.

Parameters

Name
Type
Description
name
String
The action, condition, or rule name selected in the Designer.
schemeCode
String
The current process scheme code, which can be used to provide scheme-specific fields. The value may be null when the format is requested without a process scheme context.

Returns

Type
Description
List<CodeActionParameterDefinition>
An ordered list containing one CodeActionParameterDefinition per form field. Returning null or an empty list indicates that no structured parameter editor is defined; the Designer then uses its raw JSON editor.

Remarks

The wrapper evaluates the predicate supplied to the constructor on every method call. When the predicate returns false, the call is forwarded unchanged to the configured provider. When it returns true, the configured provider is bypassed and the call is delegated to EmptyDesignerParameterFormatProvider.Value. Disabling the wrapper does not modify the configured provider.

While disabled, DeactivatedDesignerParameterFormatProvider.GetFormat(CodeActionType, string, string) returns an empty list of parameter format definitions.