public Command(ulong handNumber, int commandCode, CommandCodeEnum commandCodeEnum) { this.HandNumber = handNumber; this.CommandCode = commandCode; this.CommandObject = null; this.CommandCodeEnum = commandCodeEnum; }
public override string ToString() { return($"[{CommandCodeEnum.ToString().ToUpper()}]: {CommandObject} [{HandNumber}]"); }
public static IEnumerable <T> FilterCommands <T>(this IEnumerable <Command> commands, CommandCodeEnum code) { var filteredCommands = commands .Where(x => x.CommandCodeEnum == code) .Select(x => x.CommandObject) .OfType <T>() .ToArray(); return(filteredCommands); }