コード例 #1
0
 public SaveResult(int inserted, int updated)
 {
     RangeValidateHelper.ValidateRange(inserted, MinValue, MaxValue);
     RangeValidateHelper.ValidateRange(updated, MinValue, MaxValue);
     Inserted = inserted;
     Updated  = updated;
 }
コード例 #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;
        }
コード例 #3
0
        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];
        }
コード例 #4
0
 public MidiNoteVelocityCell(int velocity)
 {
     RangeValidateHelper.ValidateRange(velocity, MinValue, MaxValue);
     Value = velocity;
 }
コード例 #5
0
 public MidiControlChangeNumberCell(int ccNumber)
 {
     RangeValidateHelper.ValidateRange(ccNumber, MinValue, MaxValue);
     Value = ccNumber;
 }
コード例 #6
0
 protected MidiMessageData(int value, int min, int max)
 {
     RangeValidateHelper.ValidateRange(value, min, max);
     Value = value;
 }
コード例 #7
0
 public MidiControlChangeValueCell(int ccValue)
 {
     RangeValidateHelper.ValidateRange(ccValue, MinValue, MaxValue);
     Value = ccValue;
 }
コード例 #8
0
 public MidiProgramChangeCell(int value)
 {
     RangeValidateHelper.ValidateRange(value, MinValue, MaxValue);
     Value = value;
 }