Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Class CodeAutocompleteProvider

Aggregator, storage, entry point to ICodeAutocompleter implementations

Inheritance

↳ object

    ↳ CodeAutocompleteProvider

Implements

ICodeAutocompleteProvider

Inherited Members

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

MemberwiseClone()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Runtime.CodeAutocomplete

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public class CodeAutocompleteProvider : ICodeAutocompleteProvider

Constructors

CodeAutocompleteProvider(Func<ILogger>, bool, bool, params ICodeAutocompleter[])

Prepare providers but not init; automatically add DefaultAutocompleter if not supress

Declaration
public CodeAutocompleteProvider(Func<ILogger> getLogger, bool allowParallel = true, bool supressAutoAddDefaultAutocompleter = false, params ICodeAutocompleter[] autocompleters)
Parameters
TypeNameDescription
Func<ILogger>getLogger
boolallowParallelparallel get and init methods for platforms that >= .net standard 2.0
boolsupressAutoAddDefaultAutocompleter
OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.ICodeAutocompleter[]autocompleterscustom autocompleters (not <xref href="OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.DefaultAutocompleter" data-throw-if-not-resolved="false"></xref>!)

CodeAutocompleteProvider(Func<ILogger>)

Prepare DefaultAutocompleter but not init

Declaration
public CodeAutocompleteProvider(Func<ILogger> logger)
Parameters
TypeNameDescription
Func<ILogger>logger

CodeAutocompleteProvider(Func<ILogger>, params ICodeAutocompleter[])

Prepare DefaultAutocompleter and custom providers but not init

Declaration
public CodeAutocompleteProvider(Func<ILogger> logger, params ICodeAutocompleter[] autocompleters)
Parameters
TypeNameDescription
Func<ILogger>logger
OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.ICodeAutocompleter[]autocompleters

Properties

Log

Declaration
protected Action<Exception, string> Log { get; }
Property value
TypeDescription
Action<Exception, string>

Methods

RunInitTask()

Run task with CodeAutocompleteProvider.InitCodeAutocomletersThatNoInitialized()

Declaration
public virtual void RunInitTask()

InitCodeAutocomletersThatNoInitialized()

Declaration
public virtual void InitCodeAutocomletersThatNoInitialized()

RegisterCodeAutocompleters(params ICodeAutocompleter[])

add code autocompleters but not init

Declaration
public virtual void RegisterCodeAutocompleters(params ICodeAutocompleter[] completers)
Parameters
TypeNameDescription
OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.ICodeAutocompleter[]completers

AddVariablesToDefaultCompleterIfEnable(IEnumerable<AutocompleteVariable>)

add variables to DefaultAutocompleter. If DefaultAutocompleter is suppressed, nothing will happen. If DefaultAutocompleter is not initialized, init method will be called.

Declaration
public virtual void AddVariablesToDefaultCompleterIfEnable(IEnumerable<AutocompleteVariable> variables)
Parameters
TypeNameDescription
IEnumerable<AutocompleteVariable>variables

AddVariablesToDefaultCompleterIfEnable(string, Type)

add variables to DefaultAutocompleter. If DefaultAutocompleter is suppressed, nothing will happen. If DefaultAutocompleter is not initialized, init method will be called.

Declaration
public virtual void AddVariablesToDefaultCompleterIfEnable(string varName, Type varType)
Parameters
TypeNameDescription
stringvarName
TypevarType

Get(string, IEnumerable<string>, IEnumerable<AutocompleteVariable>)

Get autocomplete from all autocompleters that are already initialized

Declaration
public virtual HashSet<AutocompleteItem> Get(string pattern, IEnumerable<string> usings, IEnumerable<AutocompleteVariable> variables)
Parameters
TypeNameDescription
stringpatterntext for search (like "System.Thr")
IEnumerable<string>usingslist of usings (like "System", "System.Threading")
IEnumerable<AutocompleteVariable>variableslist of allow variables to autocomplete
Returns
TypeDescription
HashSet<AutocompleteItem>

UseParallelOption(bool, IEnumerable<ICodeAutocompleter>)

Declaration
protected virtual IEnumerable<ICodeAutocompleter> UseParallelOption(bool allowParallel, IEnumerable<ICodeAutocompleter> autocompleters)
Parameters
TypeNameDescription
boolallowParallel
IEnumerable<ICodeAutocompleter>autocompleters
Returns
TypeDescription
IEnumerable<ICodeAutocompleter>

Fields

_autocompleters

Declaration
protected IEnumerable<ICodeAutocompleter> _autocompleters
Returns
TypeDescription
IEnumerable<ICodeAutocompleter>

_getLogger

Declaration
protected readonly Func<ILogger> _getLogger
Returns
TypeDescription
Func<ILogger>

_allowParallel

Declaration
protected readonly bool _allowParallel
Returns
TypeDescription
bool

Extension Methods