public PowerNumberComposer(
     INumberComposer x,
     INumberComposer y)
 {
     _x = x ?? throw new ArgumentNullException(nameof(x));
     _y = y ?? throw new ArgumentNullException(nameof(y));
 }
Exemple #2
0
 public RangeIndex(
     INumberComposer from,
     INumberComposer to)
 {
     _from = @from;
     _to   = to;
 }
Exemple #3
0
        private static int?TryExtractIndexValue(
            INumberComposer composer,
            JObject input,
            Path parentPath)
        {
            if (composer == null)
            {
                return(null);
            }

            var composition = composer.Compose(
                input,
                parentPath);

            if (!composition.IsSuccess)
            {
                throw new NotImplementedException("handle possible problems");
            }

            if (composition.GetDecimal().IsInteger(out var value))
            {
                return(value);
            }

            throw new NotImplementedException("handle floating point value problem");
        }
 public IfPickIndexElementComposer(
     INumberComposer valueComposer,
     ICondition condition = null)
 {
     _valueComposer = valueComposer ?? throw new ArgumentNullException(nameof(valueComposer));
     _condition     = condition ?? new TrueCondition();
 }
Exemple #5
0
 public NumericCondition(
     INumberComposer left,
     INumberComposer right)
 {
     _left  = left;
     _right = right;
 }
Exemple #6
0
 public MultiplicationComposer(
     INumberComposer x,
     INumberComposer y)
 {
     _x = x;
     _y = y;
 }
Exemple #7
0
 public DivisionComposer(
     INumberComposer x,
     INumberComposer y)
 {
     _x = x;
     _y = y;
 }
 public AdditionComposer(
     INumberComposer x,
     INumberComposer y)
 {
     _x = x;
     _y = y;
 }
 public SubtractionComposer(
     INumberComposer x,
     INumberComposer y)
 {
     _x = x;
     _y = y;
 }
Exemple #10
0
 public NegationComposer(
     INumberComposer x)
 {
     _x = x;
 }
 public GreaterThanNumericCondition(
     INumberComposer left,
     INumberComposer right) : base(left, right)
 {
 }
 public GreaterOrEqualToNumericCondition(
     INumberComposer left,
     INumberComposer right) : base(left, right)
 {
 }
Exemple #13
0
 public NumberComposer(
     INumberComposer number)
 {
     _number = number ?? throw new ArgumentNullException(nameof(number));
 }