mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 11:44:54 +00:00
feat: factory updates & refactoring
This commit introduces significant updates to the device factory system, enhancing the way devices are created and managed within the PepperDash Essentials framework. The changes include: - New attributes for device configuration and description. - Refactoring of the device manager and essentials device classes to support new factory methods. - modified factory classes for essentials devices, plugin development devices, and processor extension devices. - The device factory interface has been updated to include a factory method for creating devices. - Added a wrapper for the device factory to streamline device creation. - Updated plugin loader to accommodate the new device factory structure. Fixes #1065 Fixed #1277
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
namespace PepperDash.Essentials.Core
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IDeviceFactory
|
||||
@@ -6,8 +10,21 @@
|
||||
public interface IDeviceFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads all the types to the DeviceFactory
|
||||
/// Gets the type of the factory associated with the current instance.
|
||||
/// </summary>
|
||||
void LoadTypeFactories();
|
||||
Type FactoryType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of type names associated with the current plugin.
|
||||
/// </summary>
|
||||
List<string> TypeNames { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Builds and returns an <see cref="EssentialsDevice"/> instance based on the provided configuration.
|
||||
/// </summary>
|
||||
/// <param name="deviceConfig">The configuration settings used to initialize the device. This parameter cannot be null.</param>
|
||||
/// <returns>An <see cref="EssentialsDevice"/> instance configured according to the specified <paramref
|
||||
/// name="deviceConfig"/>.</returns>
|
||||
EssentialsDevice BuildDevice(DeviceConfig deviceConfig);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user