示例#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 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;
		}
示例#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;
		}