protected override User ExecuteProcedure()
        {
            var user = GetUser();

            if (this.Name != null)
            {
                user.Name = this.Name;
            }
            if (this.Sex != null)
            {
                user.Sex = this.Sex.Value;
            }
            if (this.Nickname != null)
            {
                user.Nickname = this.Nickname;
            }
            if (this.BirthDay != null)
            {
                user.BirthDay = this.BirthDay.Value;
            }
            if (this.LocationId != null)
            {
                user.Location = LocationCommon.FindBy(this.LocationId.Value, QueryLevel.None);
            }
            if (this.PhotoId != null)
            {
                user.Photo = VirtualFileCommon.FindById(this.PhotoId.Value, QueryLevel.None);
            }
            if (this.ExpandedProperties != null)
            {
                user.ExpandedProperties = this.ExpandedProperties;
            }
            SaveTo(user);


            var account = GetAccount();

            if (this.Email != null)
            {
                account.Email = this.Email;
            }
            if (this.MobileNumber != null)
            {
                account.MobileNumber = this.MobileNumber;
            }
            SaveTo(account);

            return(user);
        }
        private User BuildUser()
        {
            var account = OpenAccount();
            var disk    = OpenDisk(account);

            var user = new User(account, disk)
            {
                Name               = this.Name ?? string.Empty,
                Nickname           = this.NickName ?? string.Empty,
                Sex                = this.Sex ?? UserSubsystem.Sex.Secret,
                ExpandedProperties = this.ExpandedProperties ?? Array.Empty <ExpandedProperty>()
            };

            if (this.LocationId != null)
            {
                user.Location = LocationCommon.FindBy(this.LocationId.Value, QueryLevel.None);
            }
            if (this.PhotoId != null)
            {
                user.Photo = VirtualFileCommon.FindById(this.PhotoId.Value, QueryLevel.None);
            }
            return(user);
        }