Class DeactivatedDesignerParameterFormatProvider
OptimaJet.Workflow.Core.Runtime.DeactivatedDesignerParameterFormatProvider
Wraps an IDesignerParameterFormatProvider and allows it to be enabled or disabled dynamically.
Namespace: OptimaJet.Workflow.Core.Runtime
public class DeactivatedDesignerParameterFormatProvider : IDesignerParameterFormatProviderType Hierarchy
- DeactivatedDesignerParameterFormatProvider Current type
- Implemented interfaces
Constructors
public DeactivatedDesignerParameterFormatProvider(IDesignerParameterFormatProvider activatedDesignerParameterFormatProvider, Func<bool> getDisabled) #Parameters
activatedDesignerParameterFormatProviderIDesignerParameterFormatProvidergetDisabled returns false.getDisabledFunc<Boolean>activatedDesignerParameterFormatProvider.Methods
public List<CodeActionParameterDefinition> GetFormat(CodeActionType type, string name, string schemeCode) #Parameters
typeCodeActionTypenameStringschemeCodeStringReturns
List<CodeActionParameterDefinition>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.