Exemplo n.º 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;
        }
Exemplo n.º 2
0
		public async Task<Conference> GetRemoteConferenceAsync()
		{
			var conference = new Conference ();

			if (_connectivityService.IsConnected) {
				try {
					var stream = await _httpService.GetResponseAsync (_appConfig.GuidebookAddress);
					var guidebook = await _serializerService.Deserialize<GuidebookDto> (stream);
					conference = _mapperService.MapGuidebookToConference (guidebook);
				} catch(Exception) {
					return conference;
				}
			}

			return conference;
		}
Exemplo n.º 3
0
		private Conference CreateConference()
		{
			var conference = new Conference ();
			conference.Sessions = new List<Session> () {
				new Session(),
				new Session(),
				new Session()
			};
			conference.Speakers = new List<Speaker> () {
				new Speaker(),
				new Speaker()
			};
			conference.Tracks = new List<Track> () {
				new Track (),
				new Track (),
				new Track ()
			};
			return conference;
		}