Ejemplo n.º 1
0
 public TimeSpan AgeFrom(this IBorn birthed, DateTime from)
 {
     return(from - birthed.Birth);
 }
Ejemplo n.º 2
0
 public void checkAge(IBorn birthed)
 {
     var age = birthed.Age((new DefaultDateTimeFactory()).Now());
 }
Ejemplo n.º 3
0
 public TimeSpan AgeFromNow(this IBorn birthed, IDateTimeFactory dtf)
 {
     return(dtf.Now() - birthed.Birth);
 }