public override BoolResult IsLess(DateResult second)
 {
     if (string.IsNullOrEmpty(this.Value))
     {
         return(new BoolResult(false));
     }
     return(new BoolResult(false));
 }
 public abstract CalculationResult Divide(DateResult second);
 public abstract CalculationResult Multiply(DateResult second);
 public abstract CalculationResult Substract(DateResult second);
 public abstract CalculationResult Add(DateResult second);
 public override CalculationResult Multiply(DateResult second)
 {
     throw new Exception("Can`t multiply dates.");
 }
 public override CalculationResult Substract(DateResult second)
 {
     throw new Exception("Can`t substract Strings.");
 }
Exemple #8
0
 public override BoolResult IsLess(DateResult second)
 {
     return(new BoolResult(DateTime.Parse(this.Value) < DateTime.Parse(second.Value)));
 }
Exemple #9
0
 public override CalculationResult Add(DateResult second)
 {
     throw new Exception("Can`t add number and date.");
 }
 public override CalculationResult Divide(DateResult second)
 {
     throw new Exception("Can`t divide strings.");
 }
Exemple #11
0
 public override BoolResult IsLess(DateResult second)
 {
     return(new BoolResult(false));
 }
Exemple #12
0
 public override BoolResult IsBigger(DateResult second)
 {
     return(new BoolResult(true));
 }
Exemple #13
0
 public override CalculationResult Substract(DateResult second)
 {
     return(new DateResult(DateTime.Parse(this.Value) - new TimeSpan(DateTime.Parse(second.Value).Ticks)));
 }
 public abstract BoolResult IsBigger(DateResult second);
 public override CalculationResult Add(DateResult second)
 {
     return(new StringResult(this.Value + second.Value));
 }
 public abstract BoolResult IsLess(DateResult second);
Exemple #17
0
 public override CalculationResult Add(DateResult second)
 {
     throw new Exception("Can`t add bools.");
 }