63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="CourseModel.cs" company="BTU/IIT">
|
|
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
|
// </copyright>
|
|
// <author>Stubbfel</author>
|
|
// <date>15.10.2013</date>
|
|
// <summary>Implements the course model class</summary>
|
|
//-----------------------------------------------------------------------
|
|
namespace CampusAppWPortalLib8.Model.Utility
|
|
{
|
|
using System;
|
|
|
|
/// <summary> Course model. </summary>
|
|
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
|
/// <seealso cref="T:System.IEquatable{CampusAppWPortalLib8.Model.Utility.CourseModel}"/>
|
|
public class CourseModel : IEquatable<CourseModel>
|
|
{
|
|
#region Constructor
|
|
|
|
/// <summary> Initializes a new instance of the CourseModel class. </summary>
|
|
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
|
/// <param name="courseNumber"> The course number. </param>
|
|
/// <param name="courseText"> The course text. </param>
|
|
public CourseModel(string courseNumber, string courseText)
|
|
{
|
|
this.CourseNumber = courseNumber;
|
|
this.CourseText = courseText;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary> Gets or sets the course number. </summary>
|
|
/// <value> The course number. </value>
|
|
public string CourseNumber { get; set; }
|
|
|
|
/// <summary> Gets or sets the course text. </summary>
|
|
/// <value> The course text. </value>
|
|
public string CourseText { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region Method
|
|
|
|
/// <summary> Tests if this CourseModel is considered equal to another. </summary>
|
|
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
|
/// <param name="other"> The course model to compare to this object. </param>
|
|
/// <returns> true if the objects are considered equal, false if they are not. </returns>
|
|
public bool Equals(CourseModel other)
|
|
{
|
|
if (this.CourseNumber.Equals(other.CourseNumber))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|