static internal FixedList <Account> Restrict(this AccountsSearchCommand command, FixedList <Account> accounts) { FixedList <Account> restricted; restricted = RestrictLedger(command.Ledger, accounts); restricted = RestrictLevels(command.Level, restricted); restricted = RestrictSectors(command.Sectors, restricted); restricted = RestrictCurrencies(command.Currencies, restricted); return(restricted); }
static public string MapToFilterString(this AccountsSearchCommand command) { string keywordsFilter = BuildKeywordsFilter(command.Keywords); string rangeFilter = BuildAccountsRangeFilter(command.FromAccount, command.ToAccount); string typeFilter = BuildAccountsTypeFilter(command.Types); string roleFilter = BuildAccountsRoleFilter(command.Roles); string dateFilter = BuildDateFilter(command.Date); var filter = new Filter(keywordsFilter); filter.AppendAnd(rangeFilter); filter.AppendAnd(typeFilter); filter.AppendAnd(roleFilter); filter.AppendAnd(dateFilter); return(filter.ToString()); }