2016-12-06 17:01:28 +00:00
|
|
|
using System.Collections.Generic;
|
2016-12-07 09:34:55 +00:00
|
|
|
using System.Linq;
|
2016-12-06 17:01:28 +00:00
|
|
|
|
2016-12-01 16:52:00 +00:00
|
|
|
namespace LibMpc
|
|
|
|
{
|
2016-12-06 17:01:28 +00:00
|
|
|
public interface IMpcCommand<T>
|
2016-12-01 16:52:00 +00:00
|
|
|
{
|
|
|
|
string Value { get; }
|
|
|
|
|
2016-12-07 09:34:55 +00:00
|
|
|
IDictionary<string, T> FormatResponse(IList<KeyValuePair<string, string>> response);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static class MpdCommandExtensions
|
|
|
|
{
|
|
|
|
public static IDictionary<string, string> ToDefaultDictionary(this IList<KeyValuePair<string, string>> items)
|
|
|
|
{
|
|
|
|
return items.ToDictionary(item => item.Key, item => item.Value);
|
|
|
|
}
|
2016-12-01 16:52:00 +00:00
|
|
|
}
|
|
|
|
}
|