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
Syntaxpublic class CodeAutocompleteProvider : ICodeAutocompleteProvider
Constructors
CodeAutocompleteProvider(Func<ILogger>, bool, bool, params ICodeAutocompleter[])
Prepare providers but not init; automatically add DefaultAutocompleter if not supress
Declarationpublic CodeAutocompleteProvider(Func<ILogger> getLogger, bool allowParallel = true, bool supressAutoAddDefaultAutocompleter = false, params ICodeAutocompleter[] autocompleters)
Type | Name | Description |
---|---|---|
Func<ILogger> | getLogger | |
bool | allowParallel | parallel get and init methods for platforms that >= .net standard 2.0 |
bool | supressAutoAddDefaultAutocompleter | |
OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.ICodeAutocompleter[] | autocompleters | custom 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
Declarationpublic CodeAutocompleteProvider(Func<ILogger> logger)
Type | Name | Description |
---|---|---|
Func<ILogger> | logger |
CodeAutocompleteProvider(Func<ILogger>, params ICodeAutocompleter[])
Prepare DefaultAutocompleter and custom providers but not init
Declarationpublic CodeAutocompleteProvider(Func<ILogger> logger, params ICodeAutocompleter[] autocompleters)
Type | Name | Description |
---|---|---|
Func<ILogger> | logger | |
OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.ICodeAutocompleter[] | autocompleters |
Properties
Log
Declarationprotected Action<Exception, string> Log { get; }
Type | Description |
---|---|
Action<Exception, string> |
Methods
RunInitTask()
Run task with CodeAutocompleteProvider.InitCodeAutocomletersThatNoInitialized()
Declarationpublic virtual void RunInitTask()
InitCodeAutocomletersThatNoInitialized()
Declarationpublic virtual void InitCodeAutocomletersThatNoInitialized()
RegisterCodeAutocompleters(params ICodeAutocompleter[])
add code autocompleters but not init
Declarationpublic virtual void RegisterCodeAutocompleters(params ICodeAutocompleter[] completers)
Type | Name | Description |
---|---|---|
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.
Declarationpublic virtual void AddVariablesToDefaultCompleterIfEnable(IEnumerable<AutocompleteVariable> variables)
Type | Name | Description |
---|---|---|
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.
Declarationpublic virtual void AddVariablesToDefaultCompleterIfEnable(string varName, Type varType)
Type | Name | Description |
---|---|---|
string | varName | |
Type | varType |
Get(string, IEnumerable<string>, IEnumerable<AutocompleteVariable>)
Get autocomplete from all autocompleters that are already initialized
Declarationpublic virtual HashSet<AutocompleteItem> Get(string pattern, IEnumerable<string> usings, IEnumerable<AutocompleteVariable> variables)
Type | Name | Description |
---|---|---|
string | pattern | text for search (like "System.Thr") |
IEnumerable<string> | usings | list of usings (like "System", "System.Threading") |
IEnumerable<AutocompleteVariable> | variables | list of allow variables to autocomplete |
Type | Description |
---|---|
HashSet<AutocompleteItem> |
UseParallelOption(bool, IEnumerable<ICodeAutocompleter>)
Declarationprotected virtual IEnumerable<ICodeAutocompleter> UseParallelOption(bool allowParallel, IEnumerable<ICodeAutocompleter> autocompleters)
Type | Name | Description |
---|---|---|
bool | allowParallel | |
IEnumerable<ICodeAutocompleter> | autocompleters |
Type | Description |
---|---|
IEnumerable<ICodeAutocompleter> |
Fields
_autocompleters
Declarationprotected IEnumerable<ICodeAutocompleter> _autocompleters
Type | Description |
---|---|
IEnumerable<ICodeAutocompleter> |
_getLogger
Declarationprotected readonly Func<ILogger> _getLogger
Type | Description |
---|---|
Func<ILogger> |
_allowParallel
Declarationprotected readonly bool _allowParallel
Type | Description |
---|---|
bool |