Crosschat.Server.Domain.Entities.User.ValidateRegistration C# (CSharp) 메소드

ValidateRegistration() 개인적인 메소드

private ValidateRegistration ( ) : void
리턴 void
        private void ValidateRegistration()
        {
            //validation
            if (string.IsNullOrEmpty(Name) || Name.Length > 100)
                throw new InvalidUserRegistrationDataException("Name is invalid");
            if (string.IsNullOrEmpty(Password) || Password.Length > 100)
                throw new InvalidUserRegistrationDataException("Password is invalid");
            if (string.IsNullOrEmpty(Huid) || Huid.Length > 1000)
                throw new InvalidUserRegistrationDataException("Huid is invalid");
            if (Age < 13 || Age > 1000)
                throw new InvalidUserRegistrationDataException("Age is invalid");
            if (string.IsNullOrEmpty(Country) || Country.Length > 100)
                throw new InvalidUserRegistrationDataException("Contry is invalid");

            UpdateLastOnline();
            RegisteredAt = DateTime.UtcNow;
        }