servicepoint-binding-csharp/ServicePoint/ConnectionExtensions.cs
Vinzenz Schroeter 178ab1eb74
Some checks failed
Rust / build (pull_request) Failing after 16s
separate types for commands
2025-06-16 16:41:46 +02:00

16 lines
1.3 KiB
C#

namespace ServicePoint;
public static class ConnectionExtensions
{
public static void Send(this IConnection connection, Packet packet) => connection.SendPacket(packet);
public static void Send(this IConnection connection, Command command) => connection.SendCommand(command);
public static void Send(this IConnection connection, IClearCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, IFadeOutCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, IBitmapCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, IBitVecCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, IBrightnessGridCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, IHardResetCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, ICharGridCommand command) => connection.SendPacket(command.AsPacket());
public static void Send(this IConnection connection, IGlobalBrightnessCommand command) => connection.SendPacket(command.AsPacket());
}