Пример #1
0
        /// <summary>
        ///     Indicates whether the current <see cref="UserPrincipalRecord" /> instance is equal to another <see cref="UserPrincipalRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="UserPrincipalRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(UserPrincipalRecord that)
        {
            Boolean result = true;

            result = result && (this.Id == that.Id);
            result = result && (this.Name.TrimOrNullify() == that.Name.TrimOrNullify());
            return(result);
        }
Пример #2
0
        /// <summary>
        ///     Creates a new <see cref="UserPrincipalRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="UserPrincipalRecord" /> object instance.
        /// </returns>
        public UserPrincipalRecord Clone()
        {
            UserPrincipalRecord record = new UserPrincipalRecord();

            record.Id   = this.Id;
            record.Name = this.Name;
            return(record);
        }