/// <summary> /// Return multiple strings to fill control /// </summary> public string[] ToStrings() { string[] tmp = new string[4]; tmp[0] = Name + " (" + Description + ")"; tmp[1] = Value.ToString(Format); tmp[2] = MinLimit.ToString(Format); tmp[3] = MaxLimit.ToString(Format); return(tmp); }
public override int GetHashCode() { return(HashCodeHelper.GetHashCode( Limited.GetHashCode(), MaxLimit.GetHashCode(), Remaining.GetHashCode(), ResetAfter.GetHashCode(), RetryAfter.GetHashCode())); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (DefaultLimit != 0L) { hash ^= DefaultLimit.GetHashCode(); } if (MaxLimit != 0L) { hash ^= MaxLimit.GetHashCode(); } if (FreeTier != 0L) { hash ^= FreeTier.GetHashCode(); } if (Duration.Length != 0) { hash ^= Duration.GetHashCode(); } if (Metric.Length != 0) { hash ^= Metric.GetHashCode(); } if (Unit.Length != 0) { hash ^= Unit.GetHashCode(); } hash ^= Values.GetHashCode(); if (DisplayName.Length != 0) { hash ^= DisplayName.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void Add(MountedCourse type) { lock (type) { if (Count == MountedCoureId.Length) { var newLength = MountedCoureId.Length + 1000; var _MountedCoureId = new string[newLength]; MountedCoureId.CopyTo(_MountedCoureId); MountedCoureId = _MountedCoureId; var _EnrollmentOption = new string[newLength]; EnrollmentOption.CopyTo(_EnrollmentOption); EnrollmentOption = _EnrollmentOption; var _Level = new string[newLength]; Level.CopyTo(_Level); Level = _Level; var _MaxLimit = new int[newLength]; MaxLimit.CopyTo(_MaxLimit); MaxLimit = _MaxLimit; var _MinLimit = new int[newLength]; MinLimit.CopyTo(_MinLimit); MinLimit = _MinLimit; var _Semester = new string[newLength]; Semester.CopyTo(_Semester); Semester = _Semester; var _AcademicYear = new string[newLength]; AcademicYear.CopyTo(_AcademicYear); AcademicYear = _AcademicYear; var _ProgramId = new string[newLength]; ProgramId.CopyTo(_ProgramId); ProgramId = _ProgramId; var _AssignedBy = new string[newLength]; AssignedBy.CopyTo(_AssignedBy); AssignedBy = _AssignedBy; var _Date = new System.DateTime[newLength]; Date.CopyTo(_Date); Date = _Date; var _CourseName = new string[newLength]; CourseName.CopyTo(_CourseName); CourseName = _CourseName; var _CourseCode = new string[newLength]; CourseCode.CopyTo(_CourseCode); CourseCode = _CourseCode; var _AssignedTo = new string[newLength]; AssignedTo.CopyTo(_AssignedTo); AssignedTo = _AssignedTo; var _Specialization = new string[newLength]; Specialization.CopyTo(_Specialization); Specialization = _Specialization; var _Category = new string[newLength]; Category.CopyTo(_Category); Category = _Category; var _Scoring = new bool[newLength]; Scoring.CopyTo(_Scoring); Scoring = _Scoring; var _Credit = new int[newLength]; Credit.CopyTo(_Credit); Credit = _Credit; } MountedCoureId.Span[Count] = type.MountedCoureId; EnrollmentOption.Span[Count] = type.EnrollmentOption; Level.Span[Count] = type.Level; MaxLimit.Span[Count] = type.MaxLimit; MinLimit.Span[Count] = type.MinLimit; Semester.Span[Count] = type.Semester; AcademicYear.Span[Count] = type.AcademicYear; ProgramId.Span[Count] = type.ProgramId; AssignedBy.Span[Count] = type.AssignedBy; Date.Span[Count] = type.Date; CourseName.Span[Count] = type.CourseName; CourseCode.Span[Count] = type.CourseCode; AssignedTo.Span[Count] = type.AssignedTo; Specialization.Span[Count] = type.Specialization; Category.Span[Count] = type.Category; Scoring.Span[Count] = type.Scoring; Credit.Span[Count] = type.Credit; Count++; } }