Beispiel #1
0
        /// <summary>
        ///     Retrieves a specific <see cref='CodeModel' /> instance.
        /// </summary>
        /// <param name="id">
        ///     The unique value which distinctly identifies the <see cref='CodeModel' /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref='CodeModel' /> instance that matches the specified <paramref name='id' />; or null, if no matching instance can be found.
        /// </returns>
        public LocalHistoryLinkModel FetchByUserIDAndURL(int userId, String URL)
        {
            HistorylinkRecord     record = this.Provider.DataProvider.UserInterface.HistoryLink.FetchByUserIDandURL(userId, URL);
            LocalHistoryLinkModel model  = record == null ? null : new LocalHistoryLinkModel(this.Provider, record);

            return(model);
        }
Beispiel #2
0
        /// <summary>
        ///     Indicates whether the current <see cref="HistorylinkRecord" /> instance is equal to another <see cref="HistorylinkRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="HistorylinkRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(HistorylinkRecord that)
        {
            Boolean result = true;

            result = result && (this.Id == that.Id);
            result = result && (this.UserId == that.UserId);
            result = result && (this.Description.TrimOrNullify() == that.Description.TrimOrNullify());
            result = result && (this.Url.TrimOrNullify() == that.Url.TrimOrNullify());
            result = result && (this.Icon.TrimOrNullify() == that.Icon.TrimOrNullify());
            return(result);
        }
Beispiel #3
0
        /// <summary>
        ///     Creates a new <see cref="HistorylinkRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="HistorylinkRecord" /> object instance.
        /// </returns>
        public HistorylinkRecord Clone()
        {
            HistorylinkRecord record = new HistorylinkRecord();

            record.Id          = this.Id;
            record.AddDate     = this.AddDate;
            record.AddBy       = this.AddBy;
            record.ModDate     = this.ModDate;
            record.ModBy       = this.ModBy;
            record.UserId      = this.UserId;
            record.Description = this.Description;
            record.Url         = this.Url;
            record.Icon        = this.Icon;
            return(record);
        }