public SessionHeaderViewModel(SessionPlace sessionPlace, Individual individual, SelectionModel selectionModel, Action showSession)
 {
     _sessionPlace = sessionPlace;
     _individual = individual;
     _selectionModel = selectionModel;
     _showSession = showSession;
 }
Esempio n. 2
0
 public bool IsScheduled(SessionPlace sessionPlace)
 {
     var sessions =
         from attendee in Attendees
         from sp in attendee.ScheduledSessionPlaces
         select sp;
     return sessions.Contains(sessionPlace);
 }
 public SessionDetailsViewModel(Slot slot, SessionPlace sessionPlace, ImageCache imageCache, SearchModel searchModel, Clock clock)
 {
     _slot = slot;
     _sessionPlace = sessionPlace;
     _imageCache = imageCache;
     _searchModel = searchModel;
     _clock = clock;
 }
Esempio n. 4
0
 public void RemoveSchedule(SessionPlace sessionPlace)
 {
     foreach (Schedule schedule in CurrentSchedules
         .Where(s => s.SessionPlace == sessionPlace))
     {
         Community.AddFact(new ScheduleRemove(schedule));
     }
 }
Esempio n. 5
0
 public async Task RemoveScheduleAsync(SessionPlace sessionPlace)
 {
     foreach (var attendee in await Attendees.EnsureAsync())
     {
         foreach (var schedule in await attendee.CurrentSchedules.EnsureAsync())
         {
             if (schedule.SessionPlace == sessionPlace)
                 await Community.AddFactAsync(new ScheduleRemove(schedule));
         }
     }
 }
Esempio n. 6
0
 public async Task<Schedule> AddScheduleAsync(SessionPlace sessionPlace)
 {
     Attendee attendee = (await Attendees.EnsureAsync()).FirstOrDefault();
     if (attendee == null)
         attendee = await Community.AddFactAsync(new Attendee(
             sessionPlace.Session.Conference,
             Guid.NewGuid().ToString()));
     await Community.AddFactAsync(new IndividualAttendee(this, attendee));
     var slot = await Community.AddFactAsync(new Slot(
         attendee,
         sessionPlace.Place.PlaceTime));
     return await Community.AddFactAsync(new Schedule(slot, sessionPlace));
 }
Esempio n. 7
0
        public static bool CanDisplay(SessionPlace sessionPlace, string searchTerm)
        {
            if (string.IsNullOrEmpty(searchTerm))
                return true;

            bool hasSessionInfo =
                sessionPlace.Session.Name.Value != null &&
                sessionPlace.Session.Speaker.Name != null &&
                sessionPlace.Session.Track.Name != null &&
                sessionPlace.Session.Description.Value.Any();
            if (!hasSessionInfo)
                return false;

            return
                sessionPlace.Session.Speaker.Name.ToLower().Contains(searchTerm) ||
                sessionPlace.Session.Name.Value.ToLower().Contains(searchTerm) ||
                sessionPlace.Session.Track.Name.ToLower().Contains(searchTerm) ||
                sessionPlace.Session.Description.Value.JoinSegments().ToLower().Contains(searchTerm);
        }
Esempio n. 8
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                SessionPlace newFact = new SessionPlace(memento);

                return newFact;
            }
Esempio n. 9
0
 // Business constructor
 public Schedule(
     Slot slot
     ,SessionPlace sessionPlace
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _slot = new PredecessorObj<Slot>(this, GetRoleSlot(), slot);
     _sessionPlace = new PredecessorObj<SessionPlace>(this, GetRoleSessionPlace(), sessionPlace);
 }
Esempio n. 10
0
 public void AddSchedule(SessionPlace sessionPlace)
 {
     Community.AddFact(new Schedule(this, sessionPlace));
 }
Esempio n. 11
0
 public bool IsScheduled(SessionPlace sessionPlace)
 {
     return CurrentSchedules.Any(s => s.SessionPlace == sessionPlace);
 }
Esempio n. 12
0
 public SessionViewModel(SessionPlace sessionPlace)
 {
     _sessionPlace = sessionPlace;
 }
 public SessionHeaderViewModel(SessionPlace sessionPlace, SelectionModel selectionModel)
 {
     _sessionPlace = sessionPlace;
     _selectionModel = selectionModel;
 }
Esempio n. 14
0
 public SessionViewModel(SessionPlace sessionPlace, Individual individual)
 {
     _sessionPlace = sessionPlace;
     _individual = individual;
 }
Esempio n. 15
0
 public TrackSessionViewModel(Slot slot, SessionPlace sessionPlace, ImageCache imageCache)
 {
     _slot = slot;
     _sessionPlace = sessionPlace;
     _imageCache = imageCache;
 }