示例#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<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;
        }
示例#3
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;
        }
        private GuidebookDto CreateGuidebookDto()
        {
            var dto = new GuidebookDto();

            dto.Speakers = _fixture.Create <SpeakersDto> ();

            dto.Events        = new EventsDto();
            dto.Events.Events = new List <EventDto> {
                CreateEventDto(),
                CreateEventDto(),
                CreateEventDto()
            };

            return(dto);
        }
示例#5
0
		private GuidebookDto CreateGuidebookDto()
		{
			var dto = new GuidebookDto ();

			dto.Speakers = _fixture.Create<SpeakersDto> ();

			dto.Events = new EventsDto ();
			dto.Events.Events = new List<EventDto> {
				CreateEventDto(),
				CreateEventDto(),
				CreateEventDto()
			};

			return dto;
		}