1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 00:37:37 +00:00
Files
MpcNET/Sources/MpcNET/Commands/Output/ToggleOutputCommand.cs
Kim Hugener-Ohlsen 12ddc4bca4 Major refactoring
2018-05-18 15:14:20 +02:00

30 lines
1.1 KiB
C#

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ToggleOutputCommand.cs" company="MpcNET">
// Copyright (c) MpcNET. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace MpcNET.Commands.Output
{
using System.Collections.Generic;
/// <summary>
/// Turns an output on or off, depending on the current state.
/// </summary>
internal class ToggleOutputCommand : IMpcCommand<string>
{
private readonly int outputId;
public ToggleOutputCommand(int outputId)
{
this.outputId = outputId;
}
public string Serialize() => string.Join(" ", "toggleoutput", this.outputId);
public string Deserialize(IReadOnlyList<KeyValuePair<string, string>> response)
{
return string.Join(", ", response);
}
}
}