Beispiel #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (LevelType != 0)
            {
                hash ^= LevelType.GetHashCode();
            }
            if (DayId != 0)
            {
                hash ^= DayId.GetHashCode();
            }
            if (LevelId != 0)
            {
                hash ^= LevelId.GetHashCode();
            }
            if (DailylevelName != 0)
            {
                hash ^= DailylevelName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #2
0
    public DayTests()
    {
        RegisterHandlers <Handlers>();

        _doctorId = new DoctorId(Guid.NewGuid());
        _date     = new DateTime(2020, 5, 2, 10, 0, 0);
        _dayId    = new DayId(_doctorId, _date);
    }
        public override int GetHashCode()
        {
            var hashCode = 1426304211;

            hashCode = hashCode * -1521134295 + DayId.GetHashCode();
            hashCode = hashCode * -1521134295 + LowTemperature.GetHashCode();
            hashCode = hashCode * -1521134295 + HighTemperature.GetHashCode();
            return(hashCode);
        }
Beispiel #4
0
        public override string ToString()
        {
            string str = DayId.ToString();

            foreach (GXDLMSDayProfileAction it in DaySchedules)
            {
                str += " " + it.ToString();
            }
            return(str);
        }
Beispiel #5
0
    public void Schedule(DoctorId doctorId, DateTime date, List <ScheduledSlot> slots, Func <Guid> idGenerator)
    {
        IsCancelledOrArchived();

        if (_isScheduled)
        {
            throw new DayAlreadyScheduledException();
        }

        var dayId = new DayId(doctorId, date);

        Raise(new DayScheduled(dayId.Value, doctorId.Value, date));

        foreach (var slot in slots)
        {
            Raise(new SlotScheduled(idGenerator(), dayId.Value, slot.StartTime, slot.Duration));
        }
    }
Beispiel #6
0
 public override int GetHashCode()
 {
     return((string.Format("{0} | {1}", StaffId, DayId.ToString(CultureInfo.InvariantCulture))).GetHashCode());
 }
 public Task <Day> Get(DayId dayId)
 {
     return(_aggregateStore.Load <Day>(dayId.Value));
 }
Beispiel #8
0
 private void When(DayScheduled @event)
 {
     Id           = new DayId(new DoctorId(@event.DoctorId), @event.Date).Value;
     _isScheduled = true;
 }