Files
Essentials/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs
2025-07-22 15:53:01 +00:00

30 lines
1.1 KiB
C#

using System.Collections.Generic;
using System;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Delegate for handling route change events on devices implementing <see cref="IRoutingWithFeedback"/>.
/// </summary>
/// <param name="midpoint">The routing device where the change occurred.</param>
/// <param name="newRoute">A descriptor of the new route that was established.</param>
/// <summary>
/// Delegate for RouteChangedEventHandler
/// </summary>
public delegate void RouteChangedEventHandler(IRoutingWithFeedback midpoint, RouteSwitchDescriptor newRoute);
/// <summary>
/// Defines a routing device (<see cref="IRouting"/>) that provides feedback about its current routes.
/// </summary>
public interface IRoutingWithFeedback : IRouting
{
/// <summary>
/// Gets a list describing the currently active routes on this device.
/// </summary>
List<RouteSwitchDescriptor> CurrentRoutes { get; }
/// <summary>
/// Event triggered when a route changes on this device.
/// </summary>
event RouteChangedEventHandler RouteChanged;
}
}