Ejemplo n.º 1
0
        private static List<WordEvent> ConvertToObject(WordEventXml[] wordEventsXml)
        {
            List<WordEvent> events = new List<WordEvent>();

            foreach (WordEventXml wordEventXml in wordEventsXml)
            {
                events.Add(ConvertToObject(wordEventXml));
            }

            NormalizeEventsOrder(events);

            return events;
        }
Ejemplo n.º 2
0
 private static WordEvent ConvertToObject(WordEventXml wordEventXml)
 {
     DateTime eventDate = wordEventXml.EventDate;
     WordEventType eventType = ConvertToObject(wordEventXml.EventType);
     return new WordEvent(eventDate, eventType, wordEventXml.Translation);
 }
Ejemplo n.º 3
0
        private static WordEventXml ConvertToXml(WordEvent wordEvent)
        {
            var wordEventXml = new WordEventXml();

            wordEventXml.EventDate = wordEvent.EventDate;
            wordEventXml.EventType = ConvertToXml(wordEvent.EventType);
            wordEventXml.Translation = wordEvent.Translation;

            return wordEventXml;
        }