1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-02 00:57:38 +00:00

Response from MPD will be specific type. MpdDirectory and MpdFile created. Metadata for MpdFile still to be done.

This commit is contained in:
glucaci
2016-12-19 12:12:22 +01:00
parent 15c81b96e9
commit f6653e0075
15 changed files with 275 additions and 711 deletions

View File

@ -6,19 +6,19 @@ namespace LibMpc
public interface IMpdResponse<T>
{
IMpdResponseState State { get; }
IDictionary<string, T> Body { get; }
T Body { get; }
}
public class MpdResponse<T> : IMpdResponse<T>
{
public MpdResponse(string endLine, IDictionary<string, T> body, bool connected)
public MpdResponse(string endLine, T body, bool connected)
{
State = new MpdResponseState(endLine, connected);
Body = body;
}
public IMpdResponseState State { get; }
public IDictionary<string, T> Body { get; }
public T Body { get; }
}
public static class CheckNotNullExtension