Пример #1
0
        /// <summary>
        /// Build Natural Person - Main logic
        /// </summary>
        /// <returns>instance of RFC (wrapped by static method Rfc.Build)</returns>
        private Rfc BuildForNaturalPerson()
        {
            NaturalPerson person = new NaturalPerson(this.Name, this.FirstLastName, this.SecondLastName, this.Year, this.Month, this.Day);

            string tenDigitsCode     = new NaturalPersonTenDigitsCodeCalculator(person).Calculate();
            string homoclave         = new HomoclaveCalculator(person).Calculate();
            string verificationDigit = new VerificationDigitCalculator(tenDigitsCode + homoclave).Calculate();

            return(Rfc.Build(tenDigitsCode, homoclave, verificationDigit));
        }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="person"></param>
 public NaturalPersonTenDigitsCodeCalculator(NaturalPerson person)
 {
     this.person = person;
 }