public void Save(SessionProjection projection) { if (_projectionsById.ContainsKey(projection.SessionId)) { _projectionsById[projection.SessionId] = projection; return; } _projectionsById.Add(projection.SessionId, projection); }
private async Task ProjectAsync(SessionId id) { var session = await _sessionRepository.GetAsync(id); if (session != null) { var speakers = await Task.WhenAll(session.Speakers.Select(async s => (await _personProjectionStore.GetNameAsync(s)) !)); var projection = new SessionProjection(session.Id, session.Title, session.Description, session.Schedule, session.Status, session.Tags, speakers); await _sessionProjectionStore.MergeProjectionAsync(projection); } }
public Task MergeProjectionAsync(SessionProjection projection) { throw new NotImplementedException(); }
public void ReplaceBy(SessionProjection projection) { Save(projection); }
public void Save(SessionProjection projection) { _projectionsById[projection.SessionId] = projection; }
public Task MergeProjectionAsync(SessionProjection projection) { _projections[projection.Id] = projection; return(Task.CompletedTask); }