Пример #1
0
        public BannedIpQuery WithExpireDateUtc(DateTime?value = null,
                                               ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                               IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(bi => bi.ExpireDateUtc == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(bi => bi.ExpireDateUtc != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(bi => bi.ExpireDateUtc >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(bi => bi.ExpireDateUtc > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(bi => bi.ExpireDateUtc <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(bi => bi.ExpireDateUtc < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
        public QueuedEmailQuery WithSendingTries(int?value = null,
                                                 ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                                 IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(qe => qe.SendingTries == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(qe => qe.SendingTries != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(qe => qe.SendingTries >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(qe => qe.SendingTries > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(qe => qe.SendingTries <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(qe => qe.SendingTries < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
Пример #3
0
        public LikeQuery WithLikerId(long?value = null,
                                     ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                     IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(l => l.Liker.Id == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(l => l.Liker.Id != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(l => l.Liker.Id >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(l => l.Liker.Id > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(l => l.Liker.Id <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(l => l.Liker.Id < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
Пример #4
0
        public EmailAccountQuery WithPort(int?value = null,
                                          ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                          IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(ea => ea.Port == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(ea => ea.Port != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(ea => ea.Port >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(ea => ea.Port > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(ea => ea.Port <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(ea => ea.Port < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
Пример #5
0
        public ScheduleTaskQuery WithMaximumRunningSeconds(int?value = null,
                                                           ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                                           IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(st => st.MaximumRunningSeconds == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(st => st.MaximumRunningSeconds != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(st => st.MaximumRunningSeconds >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(st => st.MaximumRunningSeconds > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(st => st.MaximumRunningSeconds <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(st => st.MaximumRunningSeconds < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
Пример #6
0
        public OrderLineQuery WithPrice(int?value = null,
                                        ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                        IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(ol => ol.Price == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(ol => ol.Price != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(ol => ol.Price >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(ol => ol.Price > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(ol => ol.Price <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(ol => ol.Price < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
Пример #7
0
        public DownloadQuery WithContentLength(long?value = null,
                                               ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                               IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(d => d.ContentLength == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(d => d.ContentLength != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(d => d.ContentLength >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(d => d.ContentLength > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(d => d.ContentLength <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(d => d.ContentLength < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
Пример #8
0
        public PollVotingRecordQuery WithPollId(long?value = null,
                                                ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                                IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return(this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(pvr => pvr.SelectedItem.Choice.Poll.Id == value);
                return(this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(pvr => pvr.SelectedItem.Choice.Poll.Id != value);
                return(this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(pvr => pvr.SelectedItem.Choice.Poll.Id >= value);
                return(this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(pvr => pvr.SelectedItem.Choice.Poll.Id > value);
                return(this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(pvr => pvr.SelectedItem.Choice.Poll.Id <= value);
                return(this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(pvr => pvr.SelectedItem.Choice.Poll.Id < value);
                return(this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
        public TQuery WithLastModifyDateUtc(DateTime?value = null,
                                            ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                            IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return((TQuery)this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(uc => uc.ModificationHistory.InvokeDateUtc == value);
                return((TQuery)this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(uc => uc.ModificationHistory.InvokeDateUtc != value);
                return((TQuery)this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(uc => uc.ModificationHistory.InvokeDateUtc >= value);
                return((TQuery)this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(uc => uc.ModificationHistory.InvokeDateUtc > value);
                return((TQuery)this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(uc => uc.ModificationHistory.InvokeDateUtc <= value);
                return((TQuery)this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(uc => uc.ModificationHistory.InvokeDateUtc < value);
                return((TQuery)this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }
        public TQuery WithDisplayOrder(short?value = null,
                                       ArgumentEvaluationMode mode = ArgumentEvaluationMode.IgnoreNeutral,
                                       IntegralOperator @operator  = IntegralOperator.Equal)
        {
            switch (mode)
            {
            case ArgumentEvaluationMode.IgnoreNeutral:
                if (Neutrals.Is(value))
                {
                    return((TQuery)this);
                }
                break;

            case ArgumentEvaluationMode.Explicit:
                break;

            default:
                throw new NotSupportedEnumException(mode);
            }

            switch (@operator)
            {
            case IntegralOperator.Equal:
                Entities = Entities.Where(uie => uie.DisplayOrder == value);
                return((TQuery)this);

            case IntegralOperator.NotEqual:
                Entities = Entities.Where(uie => uie.DisplayOrder != value);
                return((TQuery)this);

            case IntegralOperator.GreaterThanOrEqual:
                Entities = Entities.Where(uie => uie.DisplayOrder >= value);
                return((TQuery)this);

            case IntegralOperator.GreaterThan:
                Entities = Entities.Where(uie => uie.DisplayOrder > value);
                return((TQuery)this);

            case IntegralOperator.LessThanOrEqual:
                Entities = Entities.Where(uie => uie.DisplayOrder <= value);
                return((TQuery)this);

            case IntegralOperator.LessThan:
                Entities = Entities.Where(uie => uie.DisplayOrder < value);
                return((TQuery)this);

            default:
                throw new NotSupportedEnumException(@operator);
            }
        }