Libmpc.Mpc.Search C# (CSharp) Method

Search() public method

Returns all files in the database who's attribute matches the given token. Works like the Find command but is case insensitive.
public Search ( ScopeSpecifier scopeSpecifier, string token ) : List
scopeSpecifier ScopeSpecifier Specifies the attribute to search for.
token string The value the files attribute must have to be included in the result.
return List
        public List<MpdFile> Search(ScopeSpecifier scopeSpecifier, string token)
        {
            if (token == null)
            throw new ArgumentNullException("token");

              token = EscapeString(token);
              MpdResponse response = this.getConnection().Exec("search", new string[] { this.toTag(scopeSpecifier), token });

              if (response.IsError)
            throw new MpdResponseException(response.ErrorCode, response.ErrorMessage);

              return MpdFile.buildList(response);
        }