コード例 #1
0
        public Conference MapGuidebookToConference(GuidebookDto guidebook)
        {
            guidebook.ThrowIfNull("guidebook");

            var conference = new Conference();

            conference.Sessions = GetConferenceSessions(guidebook);
            conference.Speakers = GetConferenceSpeakers(guidebook);
            conference.Tracks   = GetConferenceTracks(conference.Sessions);

            return(conference);
        }
コード例 #2
0
        public IList <Speaker> GetConferenceSpeakers(GuidebookDto guidebook)
        {
            guidebook.ThrowIfNull("guidebook");
            var speakers = new List <Speaker> ();

            if (guidebook.Speakers != null)
            {
                foreach (var item in guidebook.Speakers.Speakers.Where(t => t != null).Distinct())
                {
                    var speaker = MapSpeakerDtoToSpeaker(item);
                    speakers.Add(speaker);
                }
            }

            return(speakers);
        }
コード例 #3
0
        public IList <Session> GetConferenceSessions(GuidebookDto guidebook)
        {
            guidebook.ThrowIfNull("guidebook");
            var sessions = new List <Session> ();

            if (guidebook.Events != null)
            {
                foreach (var item in guidebook.Events.Events.Where(t => t != null))
                {
                    var session = MapEventDtoToSession(item);
                    sessions.Add(session);
                }
            }

            return(sessions);
        }