public SessionHeaderViewModel(SessionPlace sessionPlace, Individual individual, SelectionModel selectionModel, Action showSession) { _sessionPlace = sessionPlace; _individual = individual; _selectionModel = selectionModel; _showSession = showSession; }
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; }
public void RemoveSchedule(SessionPlace sessionPlace) { foreach (Schedule schedule in CurrentSchedules .Where(s => s.SessionPlace == sessionPlace)) { Community.AddFact(new ScheduleRemove(schedule)); } }
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)); } } }
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)); }
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); }
public CorrespondenceFact CreateFact(FactMemento memento) { SessionPlace newFact = new SessionPlace(memento); return newFact; }
// 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); }
public void AddSchedule(SessionPlace sessionPlace) { Community.AddFact(new Schedule(this, sessionPlace)); }
public bool IsScheduled(SessionPlace sessionPlace) { return CurrentSchedules.Any(s => s.SessionPlace == sessionPlace); }
public SessionViewModel(SessionPlace sessionPlace) { _sessionPlace = sessionPlace; }
public SessionHeaderViewModel(SessionPlace sessionPlace, SelectionModel selectionModel) { _sessionPlace = sessionPlace; _selectionModel = selectionModel; }
public SessionViewModel(SessionPlace sessionPlace, Individual individual) { _sessionPlace = sessionPlace; _individual = individual; }
public TrackSessionViewModel(Slot slot, SessionPlace sessionPlace, ImageCache imageCache) { _slot = slot; _sessionPlace = sessionPlace; _imageCache = imageCache; }