namespace PepperDash.Core.Abstractions;
///
/// Abstracts Crestron.SimplSharp.CrestronEnvironment to allow unit testing
/// without the Crestron SDK.
///
public interface ICrestronEnvironment
{
/// Gets the platform the program is executing on.
DevicePlatform DevicePlatform { get; }
/// Gets the current runtime environment.
RuntimeEnvironment RuntimeEnvironment { get; }
/// Gets the platform-appropriate newline string.
string NewLine { get; }
/// Gets the application number (program slot).
uint ApplicationNumber { get; }
/// Gets the room ID (used in Crestron Virtual Control / server environments).
uint RoomId { get; }
/// Raised when program status changes (starting, stopping, etc.).
event EventHandler ProgramStatusChanged;
/// Raised when the ethernet link changes state.
event EventHandler EthernetEventReceived;
/// Gets the application root directory path.
string GetApplicationRootDirectory();
///
/// Returns true when running on real Crestron hardware.
/// Returns false in test / dev environments so that SDK-specific
/// sinks and enrichers can be safely skipped.
///
bool IsHardwareRuntime { get; }
}
///
/// Event args for .
///
public class ProgramStatusEventArgs : EventArgs
{
public ProgramStatusEventType EventType { get; }
public ProgramStatusEventArgs(ProgramStatusEventType eventType)
{
EventType = eventType;
}
}