#219 changes ReleaseAndMakeRoute to IRoutingSinkNoSwitching

removes check for IRoutingSinkNoSwitching interface in GetRouteToSource
This commit is contained in:
Andrew Welker
2020-05-28 17:24:24 -06:00
parent 305fe5c372
commit 62fdd6a572

View File

@@ -22,7 +22,7 @@ namespace PepperDash.Essentials.Core
/// and then attempts a new Route and if sucessful, stores that RouteDescriptor /// and then attempts a new Route and if sucessful, stores that RouteDescriptor
/// in RouteDescriptorCollection.DefaultCollection /// in RouteDescriptorCollection.DefaultCollection
/// </summary> /// </summary>
public static void ReleaseAndMakeRoute(this IRoutingInputs destination, IRoutingOutputs source, eRoutingSignalType signalType) public static void ReleaseAndMakeRoute(this IRoutingSinkNoSwitching destination, IRoutingOutputs source, eRoutingSignalType signalType)
{ {
destination.ReleaseRoute(); destination.ReleaseRoute();
@@ -152,7 +152,6 @@ namespace PepperDash.Essentials.Core
if (outputPortToUse == null) if (outputPortToUse == null)
{ {
// it's a sink device // it's a sink device
if (destination is IRoutingSinkWithSwitching)
routeTable.Routes.Add(new RouteSwitchDescriptor(goodInputPort)); routeTable.Routes.Add(new RouteSwitchDescriptor(goodInputPort));
} }
else if (destination is IRouting) else if (destination is IRouting)