예제 #1
0
 public Shift ToShift()
 {
     return(new Shift
     {
         Bedtime = Bedtime,
         EndTime = LeaveTime,
         StartTime = StartTime,
         HourlyRates = HourlyRates.FromRates(HourlyRate, HourlyRateBetweenBedtimeAndMidnight, HourlyRateAfterMidnight)
     });
 }
예제 #2
0
 private static Sitter CreateSitter(AddBabySitterArgs args)
 {
     return(new Sitter
     {
         FirstName = args.FirstName,
         LastName = args.LastName,
         HourlyRates = HourlyRates.FromRates(
             args.HourlyRate.GetValueOrDefault(HourlyRates.StandardHourlyRate),
             args.HourlyRateBetweenBedtimeAndMidnight.GetValueOrDefault(HourlyRates.StandardHourlyRateBetweenBedtimeAndMidnight),
             args.HourlyRateAfterMidnight.GetValueOrDefault(HourlyRates.StandardHourlyRateAfterMidnight))
     });
 }