Beispiel #1
0
 public SaveResult(int inserted, int updated)
 {
     RangeValidateHelper.ValidateRange(inserted, MinValue, MaxValue);
     RangeValidateHelper.ValidateRange(updated, MinValue, MaxValue);
     Inserted = inserted;
     Updated  = updated;
 }
Beispiel #2
0
        public EntityDateTime(
            int year,
            int month,
            int day,
            int hour,
            int minute,
            int second,
            int milliSecond)
        {
            RangeValidateHelper.ValidateRange(year, 0, int.MaxValue);
            RangeValidateHelper.ValidateRange(month, 1, 12);
            RangeValidateHelper.ValidateRange(day, 1, 31);
            RangeValidateHelper.ValidateRange(hour, 0, 23);
            RangeValidateHelper.ValidateRange(minute, 0, 59);
            RangeValidateHelper.ValidateRange(second, 0, 59);
            RangeValidateHelper.ValidateRange(milliSecond, 0, 9999);

            Year        = year;
            Month       = month;
            Day         = day;
            Hour        = hour;
            Minute      = minute;
            Second      = second;
            MilliSecond = milliSecond;
        }
        public MidiNoteName(string noteName)
        {
            StringHelper.ValidateNullOrTrimEmpty(noteName);

            if (NoteNameList.Contains(noteName))
            {
                Value = noteName;
                return;
            }

            if (!int.TryParse(noteName, out var number))
            {
                throw new InvalidNameException(nameof(noteName));
            }

            RangeValidateHelper.ValidateRange(number, MidiNoteNumber.MinValue, MidiNoteNumber.MaxValue);
            Value = NoteNameList[number];
        }
Beispiel #4
0
 public MidiNoteVelocityCell(int velocity)
 {
     RangeValidateHelper.ValidateRange(velocity, MinValue, MaxValue);
     Value = velocity;
 }
 public MidiControlChangeNumberCell(int ccNumber)
 {
     RangeValidateHelper.ValidateRange(ccNumber, MinValue, MaxValue);
     Value = ccNumber;
 }
 protected MidiMessageData(int value, int min, int max)
 {
     RangeValidateHelper.ValidateRange(value, min, max);
     Value = value;
 }
 public MidiControlChangeValueCell(int ccValue)
 {
     RangeValidateHelper.ValidateRange(ccValue, MinValue, MaxValue);
     Value = ccValue;
 }
Beispiel #8
0
 public MidiProgramChangeCell(int value)
 {
     RangeValidateHelper.ValidateRange(value, MinValue, MaxValue);
     Value = value;
 }