public SwitchSortBuilder <TRequest, TEntity, TValue> AsSwitch <TValue>(
            Func <TRequest, TValue> getSwitchValue)
            where TValue : class
        {
            var builder = new SwitchSortBuilder <TRequest, TEntity, TValue>(getSwitchValue);

            _builder = builder;

            return(builder);
        }
        public SwitchSortBuilder <TRequest, TEntity, TValue> AsSwitch <TValue>(string requestProperty)
            where TValue : class
        {
            var requestParam = Expression.Parameter(typeof(TRequest));
            var requestProp  = Expression.PropertyOrField(requestParam, requestProperty);

            var readPropExpr = Expression.Lambda <Func <TRequest, TValue> >(requestProp, requestParam);

            var builder = new SwitchSortBuilder <TRequest, TEntity, TValue>(readPropExpr.Compile());

            _builder = builder;

            return(builder);
        }
Beispiel #3
0
 public SwitchSortContinuationOperationBuilder(SwitchSortBuilder <TRequest, TEntity, TValue> parent)
     : base(parent)
 {
 }
Beispiel #4
0
 protected SwitchSortOperationBuilder(SwitchSortBuilder <TRequest, TEntity, TValue> parent)
 {
     ParentBuilder = parent ?? throw new ArgumentException(nameof(parent));
 }