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; }
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); }