internal static ValueTask DoBinaryOperation(ref int value, BinaryOperationCommand command, CancellationToken token) { value = command.Type switch { BinaryOperation.Add => command.X + command.Y, BinaryOperation.Subtract => command.X - command.Y, _ => throw new NotSupportedException() }; return(new ValueTask()); }
public ValueTask DoBinaryOperation(BinaryOperationCommand command, CancellationToken token) => DoBinaryOperation(ref Value, command, token);