SkiaComponentRegistry class
Beep.Skia (core) — class
Static registry for managing loaded Skia components. This class provides centralized access to all available SkiaComponent types that have been registered by external loaders.
Members
| Member | Kind | Description |
|---|---|---|
static List<AssemblyClassDefinition> LoadedComponents | Property | Gets the list of all loaded Skia components. |
static bool IsInitialized | Property | Gets whether the registry has been initialized. |
static void SetComponents(List<AssemblyClassDefinition> components) | Method | Sets the component list from an external loader. This method should be called by the external loader after loading components. The list of AssemblyClassDefinition objects to register. |
static void AddComponent(AssemblyClassDefinition component) | Method | Adds a single component to the registry. The AssemblyClassDefinition to add. |
static void AddComponents(IEnumerable<AssemblyClassDefinition> components) | Method | Adds multiple components to the registry. The list of AssemblyClassDefinition objects to add. |
static AssemblyClassDefinition GetComponentByName(string className) | Method | Gets a component definition by its class name. The class name to search for. The AssemblyClassDefinition if found, null otherwise. |
static AssemblyClassDefinition GetComponentByGuid(string guid) | Method | Gets a component definition by its GUID. The GUID to search for. The AssemblyClassDefinition if found, null otherwise. |
static List<AssemblyClassDefinition> GetComponentsByAssembly(string assemblyName) | Method | Gets all component definitions from a specific assembly. The assembly name to filter by. A list of AssemblyClassDefinition objects from the specified assembly. |
static List<AssemblyClassDefinition> GetComponentsByType(string typeName) | Method | Gets all component definitions that implement a specific interface or inherit from a specific base class. The type name to filter by. A list of AssemblyClassDefinition objects that match the type. |
static SkiaComponent CreateComponentInstance(AssemblyClassDefinition componentDefinition) | Method | Creates an instance of a SkiaComponent from its AssemblyClassDefinition. The component definition to instantiate. An instance of the SkiaComponent if successful, null otherwise. |
static SkiaComponent CreateComponentInstance(string className) | Method | Creates an instance of a SkiaComponent by its class name. The class name of the component to create. An instance of the SkiaComponent if successful, null otherwise. |
static void Clear() | Method | Clears all loaded components and resets the registry. |
static int ComponentCount | Property | Gets the count of loaded components. |
static bool IsComponentRegistered(string className) | Method | Checks if a component with the specified name is registered. The class name to check. True if the component is registered, false otherwise. |
static List<AssemblyClassDefinition> GetComponentsWithMethods() | Method | Gets all components that have methods (useful for components with interactive functionality). A list of AssemblyClassDefinition objects that have methods defined. |
static List<AssemblyClassDefinition> GetComponentsWithVisualProperties() | Method | Gets all components that have visual properties or attributes. A list of AssemblyClassDefinition objects that have visual properties. |
static List<AssemblyClassDefinition> GetComponentsByCapabilities(bool? hasLocalDB = null, bool? isDataSource = null, bool? inMemory = null) | Method | Gets all components that implement specific interfaces or have specific properties. Filter by components that support LocalDB. Filter by components that are data sources. Filter by components that support in-memory operations. A list of AssemblyClassDefinition objects that match the criteria. |
static List<AssemblyClassDefinition> GetComponentsOrdered() | Method | Gets components ordered by their specified order property. A list of AssemblyClassDefinition objects ordered by their Order property. |
static List<string> GetAvailableNamespaces() | Method | Gets all unique namespaces from registered components. A list of unique namespace names. |
static List<string> GetAvailableAssemblies() | Method | Gets all unique assembly names from registered components. A list of unique assembly names. |
static List<(AssemblyClassDefinition Component, MethodsClass Method)> GetComponentMethods( string componentName = null, bool? hidden = null) | Method | Gets component methods that match specific criteria. The component name to filter by (optional). Filter by visibility (optional). A list of matching MethodsClass objects with their parent component information. |
static int RegisterFromConfigEditor(IConfigEditor configEditor, string componentType = "SkiaComponent") | Method | Registers components from the Beep configuration system. This method should be called after the Beep loader has scanned assemblies. The configuration editor containing the loaded components. The type of components to register (e.g., "SkiaComponent"). The number of components that were registered. |
static List<AssemblyClassDefinition> DiscoverAndRegisterDomainComponents(bool includeSystemAssemblies = false) | Method | Scans the currently loaded AppDomain assemblies for types that inherit from SkiaComponent and registers them into the component registry. If true, will not skip assemblies with common system prefixes. List of AssemblyClassDefinition objects that were discovered and registered. |
static ExtractedComponentResult ExtractComponentDetailed(AssemblyClassDefinition componentDefinition) | Method | Creates a detailed component instance with full metadata initialization. The component definition to instantiate. An ExtractedComponentResult with detailed component information. |