fix: remove generics from matrix routing interfaces

This commit is contained in:
Andrew Welker
2024-04-09 08:33:58 -05:00
parent 8a374072ae
commit 1fdaa84a62
3 changed files with 7 additions and 38 deletions

View File

@@ -2,10 +2,10 @@
namespace PepperDash.Essentials.Core.Routing
{
public interface IMatrixRouting<TInput, TOutput> where TInput : IRoutingInputSlot where TOutput : IRoutingOutputSlot<TInput>
public interface IMatrixRouting
{
Dictionary<string, TInput> InputSlots { get; }
Dictionary<string, TOutput> OutputSlots { get; }
Dictionary<string, IRoutingInputSlot> InputSlots { get; }
Dictionary<string, IRoutingOutputSlot> OutputSlots { get; }
void Route(string inputSlotKey, string outputSlotKey, eRoutingSignalType type);
}

View File

@@ -1,26 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PepperDash.Essentials.Core.Routing
namespace PepperDash.Essentials.Core.Routing
{
public interface IRoutingInputSlot: IRoutingSlot, IOnline, IVideoSync
{
string TxDeviceKey { get; }
}
public abstract class RoutingInputSlotBase : IRoutingInputSlot
{
public abstract string TxDeviceKey { get; }
public abstract int SlotNumber { get; }
public abstract eRoutingSignalType SupportedSignalTypes { get; }
public abstract string Name { get; }
public abstract BoolFeedback IsOnline { get; }
public abstract bool VideoSyncDetected { get; }
public abstract string Key { get; }
public abstract event EventHandler VideoSyncChanged;
}
}

View File

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