Esempio n. 1
0
 public float CowAverage(Cow cow, DateTime begin, DateTime end)
 {
     return((from m in MilkingsForPeriod(begin, end)
             where m.Cow == cow
             select m.Amount).Average());
 }
Esempio n. 2
0
 public void CustomEvent(Cow cow, DateTime date, string id)
 {
     _container.Set(new CustomCowEvent {
         Cow = cow, Date = date, Id = id
     });
 }
Esempio n. 3
0
 public void Track(Cow cow)
 {
     _container.Set(cow);
 }
Esempio n. 4
0
 public void Milked(Cow cow, DateTime date, float amount)
 {
     _container.Set(new Milking {
         Cow = cow, Date = date, Amount = amount
     });
 }
Esempio n. 5
0
 public float OptimizedCowTotal(Cow cow, DateTime begin, DateTime end)
 {
     return((from Milking m in OptimizedMilkings(cow, begin, end) select m.Amount).Sum());
 }