Esempio n. 1
0
 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);
Esempio n. 6
0
 public override CalculationResult Multiply(DateResult second)
 {
     throw new Exception("Can`t multiply dates.");
 }
Esempio n. 7
0
 public override CalculationResult Substract(DateResult second)
 {
     throw new Exception("Can`t substract Strings.");
 }
Esempio n. 8
0
 public override BoolResult IsLess(DateResult second)
 {
     return(new BoolResult(DateTime.Parse(this.Value) < DateTime.Parse(second.Value)));
 }
Esempio n. 9
0
 public override CalculationResult Add(DateResult second)
 {
     throw new Exception("Can`t add number and date.");
 }
Esempio n. 10
0
 public override CalculationResult Divide(DateResult second)
 {
     throw new Exception("Can`t divide strings.");
 }
Esempio n. 11
0
 public override BoolResult IsLess(DateResult second)
 {
     return(new BoolResult(false));
 }
Esempio n. 12
0
 public override BoolResult IsBigger(DateResult second)
 {
     return(new BoolResult(true));
 }
Esempio n. 13
0
 public override CalculationResult Substract(DateResult second)
 {
     return(new DateResult(DateTime.Parse(this.Value) - new TimeSpan(DateTime.Parse(second.Value).Ticks)));
 }
Esempio n. 14
0
 public abstract BoolResult IsBigger(DateResult second);
Esempio n. 15
0
 public override CalculationResult Add(DateResult second)
 {
     return(new StringResult(this.Value + second.Value));
 }
Esempio n. 16
0
 public abstract BoolResult IsLess(DateResult second);
Esempio n. 17
0
 public override CalculationResult Add(DateResult second)
 {
     throw new Exception("Can`t add bools.");
 }