public void SaveProfileDetail(SearchableItem item) { if (item is Language language) { EnterLanguageDetails(language); } else if (item is Skill skill) { EnterSkillDetails(skill); } else if (item is Education education) { EnterEducationDetails(education); } else if (item is Certification certification) { EnterCertificationDetails(certification); } else { throw new ArgumentException($"Unknown item type : {item.GetType()} with its values : {item}"); } }
public void SaveProfileDetail(IWebDriver driver, SearchableItem item) { if (item is Language language) { EnterLanguageDetails(driver, language); } else if (item is Skill skill) { EnterSkillDetails(driver, skill); } else if (item is Education education) { EnterEducationDetails(driver, education); } else if (item is Certification certification) { EnterCertificationDetails(driver, certification); } else { throw new ArgumentException("Unknown item type : " + item.GetType().ToString() + " with its values : " + item.ToString()); } }