Compare commits

..

1 Commits

Author SHA1 Message Date
Evan DiLallo
305a466b1b Merge pull request #1395 from PepperDash/fix/implement-IKeyed-on-BridgeBase
feat: implement constructor for BridgeApi with key and name parameters
2026-03-12 16:30:51 -04:00
3 changed files with 1 additions and 47 deletions

View File

@@ -1,14 +0,0 @@
using System.Collections.Generic;
using PepperDash.Essentials.Core;
/// <summary>
/// Interface for rooms with a list of destinations
/// </summary>
public interface IHasDestinationList
{
/// <summary>
/// Gets the dictionary of destinations.
/// </summary>
Dictionary<string, IRoutingSink> Destinations { get; }
}

View File

@@ -1,14 +0,0 @@
using System.Collections.Generic;
using PepperDash.Essentials.Core;
/// <summary>
/// Interface for rooms with a list of destinations
/// </summary>
public interface IHasSourceList
{
/// <summary>
/// Gets the list of sources.
/// </summary>
Dictionary<string, SourceListItem> SourceList { get; }
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
@@ -231,15 +230,6 @@ namespace PepperDash.Essentials.Core.Routing
return roomDefaultDisplay.DefaultDisplay.Key == destination.Key;
}
if (r is IHasDestinationList roomDestinationList)
{
return roomDestinationList.Destinations.Any(d =>
d.Value.Key == destination.Key
);
}
var destList = ConfigReader.ConfigObject.GetDestinationListForKey(r.DestinationListKey);
return false;
}
);
@@ -257,15 +247,7 @@ namespace PepperDash.Essentials.Core.Routing
// Debug.LogMessage(Serilog.Events.LogEventLevel.Verbose, "Found room {room} for destination {destination}", this, room.Key, destination.Key);
Dictionary<string, SourceListItem> sourceList = null;
if (room is IHasSourceList roomWithSourceList)
{
sourceList = roomWithSourceList.SourceList;
}
else {
sourceList = ConfigReader.ConfigObject.GetSourceListForKey(room.SourceListKey);
}
var sourceList = ConfigReader.ConfigObject.GetSourceListForKey(room.SourceListKey);
if (sourceList == null)
{