1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 00:37:37 +00:00
Files
MpcNET/Sources/MpcNET/Commands/Playback/StopCommand.cs
2021-10-03 17:53:58 +02:00

37 lines
1.3 KiB
C#

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StopCommand.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.Playback
{
using System.Collections.Generic;
/// <summary>
/// Command to stop playback.
/// https://www.musicpd.org/doc/protocol/playback_commands.html.
/// </summary>
public class StopCommand : IMpcCommand<string>
{
/// <summary>
/// Serializes the command.
/// </summary>
/// <returns>
/// The serialize command.
/// </returns>
public string Serialize() => string.Join(" ", "stop");
/// <summary>
/// Deserializes the specified response text pairs.
/// </summary>
/// <param name="response">The response.</param>
/// <returns>
/// The deserialized response.
/// </returns>
public string Deserialize(SerializedResponse response)
{
return string.Join(", ", response.ResponseValues);
}
}
}