fix: make IRoutingOutputSlot & RoutingOutputSlotBase generic

This commit is contained in:
Andrew Welker
2024-04-03 10:42:25 -05:00
parent b90e5b2a0d
commit d2d041dbf7
2 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
namespace PepperDash.Essentials.Core.Routing
{
public interface IMatrixRouting<TInput, TOutput> where TInput : IRoutingInputSlot where TOutput : IRoutingOutputSlot
public interface IMatrixRouting<TInput, TOutput> where TInput : IRoutingInputSlot where TOutput : IRoutingOutputSlot<TInput>
{
Dictionary<string, TInput> InputSlots { get; }
Dictionary<string, TOutput> OutputSlots { get; }

View File

@@ -3,19 +3,19 @@ using System.Collections.Generic;
namespace PepperDash.Essentials.Core.Routing
{
public interface IRoutingOutputSlot : IRoutingSlot
public interface IRoutingOutputSlot<TInput> : IRoutingSlot where TInput: IRoutingInputSlot
{
event EventHandler OutputSlotChanged;
string RxDeviceKey { get; }
Dictionary<eRoutingSignalType, RoutingInputSlotBase> CurrentRoutes { get; }
Dictionary<eRoutingSignalType, TInput> CurrentRoutes { get; }
}
public abstract class RoutingOutputSlotBase : IRoutingOutputSlot
public abstract class RoutingOutputSlotBase<TInput> : IRoutingOutputSlot<TInput> where TInput: IRoutingInputSlot
{
public abstract string RxDeviceKey { get; }
public abstract Dictionary<eRoutingSignalType, RoutingInputSlotBase> CurrentRoutes { get; }
public abstract Dictionary<eRoutingSignalType, TInput> CurrentRoutes { get; }
public abstract int SlotNumber { get; }
public abstract eRoutingSignalType SupportedSignalTypes { get; }
public abstract string Name { get; }