public DateMathExpression(Union <DateTime, string> anchor, Time range, DateMathOperation operation) { anchor.ThrowIfNull(nameof(anchor)); range.ThrowIfNull(nameof(range)); operation.ThrowIfNull(nameof(operation)); this.Anchor = anchor; Self.Ranges.Add(Tuple.Create(operation, range)); }
public DateMathExpression(Union<DateTime, string> anchor, Time range, DateMathOperation operation) { anchor.ThrowIfNull(nameof(anchor)); range.ThrowIfNull(nameof(range)); operation.ThrowIfNull(nameof(operation)); this.Anchor = anchor; Self.Ranges.Add(Tuple.Create(operation, range)); }
public static string GetStringValue(this DateMathOperation value) { switch (value) { case DateMathOperation.Add: return("+"); case DateMathOperation.Subtract: return("-"); default: throw new ArgumentOutOfRangeException(nameof(value), value, null); } }
public DateMathExpression Operation(Time expression, DateMathOperation operation) { Self.Ranges.Add(Tuple.Create(operation, expression)); return(this); }
public DateMathExpression Operation(Time expression, DateMathOperation operation) { Self.Ranges.Add(Tuple.Create(operation, expression)); return this; }