public void Save(SessionProjection projection)
        {
            if (_projectionsById.ContainsKey(projection.SessionId))
            {
                _projectionsById[projection.SessionId] = projection;
                return;
            }

            _projectionsById.Add(projection.SessionId, projection);
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 public Task MergeProjectionAsync(SessionProjection projection)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public void ReplaceBy(SessionProjection projection)
 {
     Save(projection);
 }
Пример #5
0
 public void Save(SessionProjection projection)
 {
     _projectionsById[projection.SessionId] = projection;
 }
Пример #6
0
 public Task MergeProjectionAsync(SessionProjection projection)
 {
     _projections[projection.Id] = projection;
     return(Task.CompletedTask);
 }