Assembly: OptimaJet.Workflow.Core

Class TypeSearcher

OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.TypeSearcher

Searches and caches available runtime types for code autocomplete.

public class TypeSearcher : ITypeSearcher

Type Hierarchy

Constructors

public TypeSearcher() #
Initializes a new instance of TypeSearcher with default exclusion settings.

Properties

public bool Initialized { get; } #
Gets a value indicating whether type discovery has completed.

Methods

public Type GetByFullName(string fullName) #
Gets a cached Type by full name.

Parameters

Name
Type
Description
fullName
String
Fully qualified type name, for example System.Text.StringBuilder.

Returns

Type
Description
Type
The Type registered under fullName, or null if no match exists.

Exceptions

Type
Description
ArgumentNullException
fullName is null.
public void SetExcludeNamespaces(IEnumerable<string> excludeNamespaces) #
Replaces the current exclusion namespace list.

Parameters

Name
Type
Description
excludeNamespaces
IEnumerable<String>
Namespace prefixes that are excluded when filtering discovered types.

Exceptions

Type
Description
InvalidOperationException
The searcher has already been initialized.

Remarks

This method can be called only before initialization has started.
public void AddExcludeNamespaces(IEnumerable<string> excludeNamespaces) #
Appends namespace prefixes to the existing exclusion list.

Parameters

Name
Type
Description
excludeNamespaces
IEnumerable<String>
Namespace prefixes to add to the filter.

Exceptions

Type
Description
InvalidOperationException
The searcher has already been initialized.

Remarks

This method can be called only before initialization has started. Null or empty collections are ignored.
public void InitIfNotInitialized() #
Initializes the type cache lazily on first call, scanning loaded assemblies.

Remarks

The initialization work is protected by a lock and executes only once.
public Type[] GetAllTypes() #
Gets all cached Type instances currently known to the searcher.

Returns

Type
Description
Type[]
An array that contains all cached types.