Example #1
0
        /// <summary>
        /// Filters a <see cref="ReadOnlyBoardMembershipCollection"/> for a given <see cref="MembershipFilter"/>.
        /// </summary>
        /// <param name="memberships">The <see cref="ReadOnlyBoardMembershipCollection"/></param>
        /// <param name="filter">The new <see cref="MembershipFilter"/> by which to filter.  Can be combined using the bitwise OR operator.</param>
        /// <returns>The filtered collection.</returns>
        /// <remarks>The new filter parameter will function as an OR parameter.</remarks>
        public static ReadOnlyBoardMembershipCollection Filter(this ReadOnlyBoardMembershipCollection memberships, MembershipFilter filter)
        {
            var collection = new ReadOnlyBoardMembershipCollection(memberships, memberships.Auth);

            collection.AddFilter(new[] { filter });
            return(collection);
        }
Example #2
0
        /// <summary>
        /// Filters a <see cref="ReadOnlyBoardMembershipCollection"/> for a given <see cref="MembershipFilter"/>s.
        /// </summary>
        /// <param name="memberships">The <see cref="ReadOnlyBoardMembershipCollection"/></param>
        /// <param name="filters">The new <see cref="MembershipFilter"/>s by which to filter.</param>
        /// <returns>The filtered collection.</returns>
        /// <remarks>The new filter parameters will function as OR parameters.</remarks>
        public static ReadOnlyBoardMembershipCollection Filter(this ReadOnlyBoardMembershipCollection memberships, IEnumerable <MembershipFilter> filters)
        {
            var collection = new ReadOnlyBoardMembershipCollection(memberships, memberships.Auth);

            collection.AddFilter(filters);
            return(collection);
        }
 internal ReadOnlyBoardMembershipCollection(ReadOnlyBoardMembershipCollection source, TrelloAuthorization auth)
     : base(() => source.OwnerId, auth)
 {
     if (source._additionalParameters != null)
     {
         _additionalParameters = new Dictionary <string, object>(source._additionalParameters);
     }
 }