Assembly: OptimaJet.Workflow.Core

Class DeactivatedDesignerAutocompleteProvider

OptimaJet.Workflow.Core.Runtime.DeactivatedDesignerAutocompleteProvider

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

public class DeactivatedDesignerAutocompleteProvider : IDesignerAutocompleteProvider

Type Hierarchy

Constructors

public DeactivatedDesignerAutocompleteProvider(IDesignerAutocompleteProvider activatedDesignerAutocompleteProvider, Func<bool> getDisabled) #
Initializes a new dynamically switchable wrapper around a designer autocomplete provider.

Parameters

Name
Type
Description
activatedDesignerAutocompleteProvider
IDesignerAutocompleteProvider
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 EmptyDesignerAutocompleteProvider.Value; a result of false selects activatedDesignerAutocompleteProvider.

Methods

public List<string> GetAutocompleteSuggestions(SuggestionCategory category, string value, string schemeCode) #
Gets a list of autocomplete suggestion strings for the specified category and context.

Parameters

Name
Type
Description
category
SuggestionCategory
The suggestion category that determines the editor context.
value
String
The rule, action, or condition name used as context for suggestions.
schemeCode
String
The scheme code for which suggestions are requested.

Returns

Type
Description
List<String>
A list of suggestion strings to display, or null when no suggestions are available.

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 EmptyDesignerAutocompleteProvider.Value. Disabling the wrapper does not modify the configured provider.

While disabled, DeactivatedDesignerAutocompleteProvider.GetAutocompleteSuggestions(SuggestionCategory, string, string) returns an empty list of autocomplete suggestions.