Exemplo n.º 1
0
 internal SearchFor(SearchFor currentSearch, ISearchParameter newParameter)
 {
     _parameters = new List <ISearchParameter>(currentSearch._parameters)
     {
         newParameter
     };
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a label color search parameter.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="labelColor">The label color to search for.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndLabel(this SearchFor search, LabelColor labelColor)
 {
     return(new SearchFor(search, new LabelSearchParameter(labelColor)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a member search parameter.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="member">The member to search for.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndMember(this SearchFor search, Member member)
 {
     return(new SearchFor(search, new MemberSearchParameter(member)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a text search parameter specific to check lists.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="text">The text to search for.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndTextInCheckLists(this SearchFor search, string text)
 {
     return(new SearchFor(search, new TextInCardCheckListSearchParameter(text)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a text search parameter specific to card descriptions.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="text">The text to search for.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndTextInDescription(this SearchFor search, string text)
 {
     return(new SearchFor(search, new TextInCardDescriptionSearchParameter(text)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a text search parameter specific to card names.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="text">The text to search for.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndTextInName(this SearchFor search, string text)
 {
     return(new SearchFor(search, new TextInCardNameSearchParameter(text)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the past <paramref name="days"/> days.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="days">The number of days.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndEditedWithinDays(this SearchFor search, int days)
 {
     return(new SearchFor(search, new EditedSearchParameter(days)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only starred items.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndIsStarred(this SearchFor search)
 {
     return(new SearchFor(search, IsSearchParameter.Starred));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the past week.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndEditedWithinWeek(this SearchFor search)
 {
     return(new SearchFor(search, EditedSearchParameter.Week));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the past 24 hours.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndEditedWithinDay(this SearchFor search)
 {
     return(new SearchFor(search, EditedSearchParameter.Day));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items which are overdue.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndOverdue(this SearchFor search)
 {
     return(new SearchFor(search, DueSearchParameter.Overdue));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the next <paramref name="days"/> hours.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <param name="days">The number of days.</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndDueWithinDays(this SearchFor search, int days)
 {
     return(new SearchFor(search, new DueSearchParameter(days)));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the next month.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndDueWithinMonth(this SearchFor search)
 {
     return(new SearchFor(search, DueSearchParameter.Month));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the next week.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndDueWithinWeek(this SearchFor search)
 {
     return(new SearchFor(search, DueSearchParameter.Week));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the next 24 hours.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndDueWithinDay(this SearchFor search)
 {
     return(new SearchFor(search, DueSearchParameter.Day));
 }
Exemplo n.º 16
0
 /// <summary>
 /// Creates a new instance of the <see cref="Search"/> object and performs the search.
 /// </summary>
 /// <param name="query">The query.</param>
 /// <param name="limit">The maximum number of results to return.</param>
 /// <param name="modelTypes">(Optional) The desired model types to return.  Can be joined using the | operator.  Default is All.</param>
 /// <param name="context">(Optional) A collection of queryable items to serve as a context in which to search.</param>
 /// <param name="auth">(Optional) Custom authorization parameters. When not provided,
 /// <see cref="TrelloAuthorization.Default"/> will be used.</param>
 /// <param name="isPartial">(Optional) Indicates whether to include matches that <em>start with</em> the query text.  Default is false.</param>
 public Search(SearchFor query, int?limit       = null, SearchModelType modelTypes = SearchModelType.All,
               IEnumerable <IQueryable> context = null, TrelloAuthorization auth   = null, bool isPartial = false)
     : this(query.ToString(), limit, modelTypes, context, auth, isPartial)
 {
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only items due in the past month.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndEditedWithinMonth(this SearchFor search)
 {
     return(new SearchFor(search, EditedSearchParameter.Month));
 }
 /// <summary>
 /// Creates a new <see cref="SearchFor"/> appending a search parameter to restrict to only unarchived items.
 /// </summary>
 /// <param name="search">The current search</param>
 /// <returns>A new <see cref="SearchFor"/> parameter list.</returns>
 public static SearchFor AndIsOpen(this SearchFor search)
 {
     return(new SearchFor(search, IsSearchParameter.Open));
 }