Example #1
0
        /// <summary>
        ///     Creates a new <see cref="UserSessionRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="UserSessionRecord" /> object instance.
        /// </returns>
        public UserSessionRecord Clone()
        {
            UserSessionRecord record = new UserSessionRecord();

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

            result = result && (this.Id == that.Id);
            result = result && (this.UserId == that.UserId);
            result = result && (this.Active == that.Active);
            result = result && (this.Expiry == that.Expiry);
            result = result && (this.Status == that.Status);
            return(result);
        }