// // Activity.cs // // Author: // Paul Schneider // // Copyright (c) 2015 GNU GPL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . using System; namespace Yavsc.Model.FrontOffice { /// /// Activity. /// public class Activity: IComment, ITitle { #region ITitle implementation /// /// Gets or sets the title. /// /// The title. public string Title { get; set; } #endregion #region IComment implementation /// /// Gets or sets the comment. /// /// The comment. public string Comment { get; set; } #endregion #region IIdentified implementation /// /// Gets or sets the identifier. /// /// The identifier. public string Id { get; set; } #endregion /// /// Gets or sets the type of the command. /// /// The type of the command. public Type CommandType { get; set; } public string Photo { get; set; } /// /// The activity object has a static value during the /// most of the application life, /// They are not supposed to vary, they should are legal values. /// As a result, they are identified by their identifier, /// and are said equal since their id are equal. /// Determines whether the specified is equal to the current . /// /// The to compare with the current . /// true if the specified is equal to the current /// ; otherwise, false. public override bool Equals (object obj) { if (base.Equals (obj)) return true; if (obj == null) return false; if (GetType().IsAssignableFrom(obj.GetType())) if (((Activity)obj).Id == this.Id) return true; return false; } } }