Disco.Models.Repository.User.UpdateSelf C# (CSharp) Method

UpdateSelf() public method

public UpdateSelf ( User u ) : void
u User
return void
        public void UpdateSelf(User u)
        {
            if (!this.UserId.Equals(u.UserId, StringComparison.OrdinalIgnoreCase))
                throw new ArgumentException("User Id's do not match", "u");

            if (this.Surname != u.Surname)
                this.Surname = u.Surname;
            if (this.GivenName != u.GivenName)
                this.GivenName = u.GivenName;
            if (this.DisplayName != u.DisplayName)
                this.DisplayName = u.DisplayName;
            if (this.EmailAddress != u.EmailAddress)
                this.EmailAddress = u.EmailAddress;
            if (this.PhoneNumber != u.PhoneNumber)
                this.PhoneNumber = u.PhoneNumber;
        }
    }