public virtual Conference PlanAConference(DateTime conferenceDate, List <string> inputTalkList)
        {
            var talkList = _titleDurationSplitter.GetTalkList(inputTalkList);

            var currentSession = CreateANewTalkSession(conferenceDate);
            var currentTrack   = new Track(conferenceDate);

            currentTrack.AddASession(currentSession);

            _conference.AddATrack(currentTrack);

            var currentSessionTime = currentSession.StartTime;

            foreach (var talk in talkList)
            {
                if (FitTalkIntoTheSession(talk, currentSession, ref currentSessionTime))
                {
                    continue;
                }

                //couldn't fit into the current session, so create necessary session and track
                var currentTrackAndSession = AddNecessaryTrackAndSession(currentSession, currentTrack);
                currentTrack       = currentTrackAndSession.Item1;
                currentSession     = currentTrackAndSession.Item2;
                currentSessionTime = currentSession.StartTime;
                FitTalkIntoTheSession(talk, currentSession, ref currentSessionTime);
            }
            return(_conference);
        }
        private Tuple <Track, TalkSession> AddNecessaryTrackAndSession(TalkSession currentSession, Track currentTrack)
        {
            if (currentSession.SessionType == TalkSessionType.Morning)
            {
                //if current session is morning, create an evening session and add that to the current track
                currentSession = CreateANewTalkSession(currentSession.StartTime.Value.Date, true);
                currentTrack.AddASession(currentSession);
            }
            else
            {
                //if current session is evening, create a new track and a morning session and add that session to the new track
                currentSession = CreateANewTalkSession(currentSession.StartTime.Value.Date);
                currentTrack   = new Track(currentSession.StartTime.Value.Date);
                currentTrack.AddASession(currentSession);
                _conference.AddATrack(currentTrack);
            }

            return(new Tuple <Track, TalkSession>(currentTrack, currentSession));
        }