Files
lmxopcua/src/Core/ZB.MOM.WW.OtOpcUa.Core.Abstractions/IDriverConfigEditor.cs
T

31 lines
1.5 KiB
C#

namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
/// <summary>
/// Optional plug-point a driver implements to provide a custom Admin UI editor for its
/// <c>DriverConfig</c> JSON. Drivers that don't implement this fall back to the generic
/// JSON editor with schema-driven validation against the registered JSON schema.
/// </summary>
/// <remarks>
/// Per <c>docs/v2/plan.md</c> decision #27 — driver-specific config editors are deferred
/// to each driver's implementation phase; v2.0 ships with the generic JSON editor as the
/// default. This interface is the future plug-point so phase-specific editors can land
/// incrementally.
///
/// The actual UI rendering happens in the Admin Blazor Server app (see
/// <c>docs/v2/admin-ui.md</c>). This interface in <c>Core.Abstractions</c> is the
/// contract between the driver and the Admin app — the Admin app discovers
/// implementations and slots them into the Driver Detail screen.
/// </remarks>
public interface IDriverConfigEditor
{
/// <summary>Driver type name this editor handles (e.g. "Galaxy", "Modbus").</summary>
string DriverType { get; }
/// <summary>
/// Type of the Razor component (must derive from <c>ComponentBase</c> in the Admin app's
/// `Components/Shared/` folder) that renders the editor. Returned as <c>Type</c> so the
/// <c>Core.Abstractions</c> project doesn't need a Blazor reference.
/// </summary>
Type EditorComponentType { get; }
}