using System.Collections.Generic; using System.Linq; namespace LibMpc { public partial class Commands { /// /// https://www.musicpd.org/doc/protocol/reflection_commands.html /// public static class Reflection { // TODO: config /// /// Shows which commands the current user has access to. /// public class Commands : IMpcCommand> { public string Value => "commands"; public IEnumerable FormatResponse(IList> response) { var result = response.Where(item => item.Key.Equals("command")).Select(item => item.Value); return result; } } // TODO: notcommands public class TagTypes : IMpcCommand> { public string Value => "tagtypes"; public IEnumerable FormatResponse(IList> response) { var result = response.Where(item => item.Key.Equals("tagtype")).Select(item => item.Value); return result; } } public class UrlHandlers : IMpcCommand> { public string Value => "urlhandlers"; public IEnumerable FormatResponse(IList> response) { var result = response.Where(item => item.Key.Equals("handler")).Select(item => item.Value); return result; } } // TODO: decoders } } }