Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
        public new static AskDocuments ReadXml(XElement e)
        {
            var ad = new AskDocuments
            {
                TargetExtraValue = e.Attribute("TargetExtraValue").ToBool(),
            };

            foreach (var ee in e.Elements("OrganizationDocument"))
            {
                ad.list.Add(OrganizationDocument.ReadXml(ee));
            }
            return(ad);
        }