Пример #1
0
 internal static Exercise ParseElements(XElement objective, IEnumerable <XElement> answerElements)
 {
     return(new Exercise
     {
         IsMakeUp = (bool)objective.Attribute("MakeUp"),
         Answers = AnswerCollection.ParseElements(answerElements),
     });
 }
Пример #2
0
 internal static Exercise ParseElements(XElement objective, IEnumerable <XElement> answerElements)
 {
     return(new Exercise
     {
         IsMakeUp = (bool)objective.Attribute("MakeUp"),
         Score = objective.Elements("Details").Select(e => (decimal)e.Attribute("Result")).Last(),
         Answers = AnswerCollection.ParseElements(answerElements),
     });
 }