1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 08:47:36 +00:00

Future test to check if config is loaded correctly on build server

This commit is contained in:
glucaci
2016-12-16 13:05:20 +01:00
parent de4743f7ea
commit b54500053c
3 changed files with 34 additions and 16 deletions

View File

@ -67,20 +67,23 @@ namespace LibMpc
// TODO: findadd
public class ListAll : IMpcCommand<string>
public class ListAll : IMpcCommand<IList<KeyValuePair<string, string>>>
{
private readonly string _path;
public string Value => "listall";
public ListAll(string path)
public IDictionary<string, IList<KeyValuePair<string, string>>> FormatResponse(IList<KeyValuePair<string, string>> response)
{
_path = path;
}
var results = new Dictionary<string, IList<KeyValuePair<string, string>>>
{
{ "result", new List<KeyValuePair<string, string>>() }
};
public string Value => string.Join(" ", "listall", _path);
foreach (var keyValuePair in response)
{
results["result"].Add(keyValuePair);
}
public IDictionary<string, string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
return response.ToDefaultDictionary();
return results;
}
}