예제 #1
0
        public virtual Petrovich InflectTo(Case @case)
        {
            Guard.IfArgumentNullOrWhitespace(FirstName, "FirstName", "First name was not provided");
            Guard.IfArgumentNullOrWhitespace(LastName, "LastName", "Last name was not provided");
            Guard.IfArgumentNullOrWhitespace(MiddleName, "MiddleName", "Middle name was not provided");

            var inflected = new Petrovich();

            if (AutoDetectGender) DetectGender();

            var inflection = new CaseInflection(provider, Gender);

            inflected.FirstName = inflection.InflectFirstNameTo(FirstName, @case);
            inflected.LastName = inflection.InflectLastNameTo(LastName, @case);
            inflected.MiddleName = inflection.InflectMiddleNameTo(MiddleName, @case);

            return inflected;
        }
예제 #2
0
        public virtual Petrovich InflectTo(Case @case)
        {
            Guard.IfArgumentNullOrWhitespace(FirstName, "FirstName", "First name was not provided");
            Guard.IfArgumentNullOrWhitespace(LastName, "LastName", "Last name was not provided");
            Guard.IfArgumentNullOrWhitespace(MiddleName, "MiddleName", "Middle name was not provided");

            var inflected = new Petrovich();

            if (AutoDetectGender)
            {
                DetectGender();
            }

            var inflection = new CaseInflection(provider, Gender);

            inflected.FirstName  = inflection.InflectFirstNameTo(FirstName, @case);
            inflected.LastName   = inflection.InflectLastNameTo(LastName, @case);
            inflected.MiddleName = inflection.InflectMiddleNameTo(MiddleName, @case);

            return(inflected);
        }