public static Ask ReadXml(XElement ele) { var ask = ele.Name.ToString(); switch (ask) { case "AskCheckboxes": return(AskCheckboxes.ReadXml(ele)); case "AskDropdown": return(AskDropdown.ReadXml(ele)); case "AskExtraQuestions": return(AskExtraQuestions.ReadXml(ele)); case "AskGradeOptions": return(AskGradeOptions.ReadXml(ele)); case "AskHeader": return(AskHeader.ReadXml(ele)); case "AskInstruction": return(AskInstruction.ReadXml(ele)); case "AskMenu": return(AskMenu.ReadXml(ele)); case "AskRequest": return(AskRequest.ReadXml(ele)); case "AskSize": return(AskSize.ReadXml(ele)); case "AskSuggestedFee": return(AskSuggestedFee.ReadXml(ele)); case "AskText": return(AskText.ReadXml(ele)); case "AskTickets": return(AskTickets.ReadXml(ele)); case "AskYesNoQuestions": return(AskYesNoQuestions.ReadXml(ele)); case "AskDocuments": return(AskDocuments.ReadXml(ele)); default: return(new Ask(ask)); } }