public void Update(ILearningRoomWithSignIn learningRoom) { var learningRoomsWithSignIn = _learningRoomWithSignInGateway.Load(learningRoom.Reference); var signInsAdded = learningRoom.SignIns .Where(signIn => learningRoomsWithSignIn.SignIns.All(s => !s.Reference.Equals(signIn.Reference))) .ToList(); signInsAdded.ForEach(s => _signInPersistor.Add(s)); _persistence.Complete(); }
public async Task Update(ILearningRoomWithChats learningRoom) { var learningRoomWithChat = _learningRoomWithChatsGateway.Load(learningRoom.Reference); var chatsAdded = learningRoom.ChatAspects .Where(chat => !learningRoomWithChat.ChatAspects.Any(c => c.Reference.Equals(chat.Reference))) .ToList(); chatsAdded.ForEach(c => _chatPersistor.Add(c)); await _persistence.Complete(); }
public void Persist(INote note) { _noteAspectSynchronizor.Synchronize(note); var comments = note.Comments as List <CommentAspect>; var viewers = note.Viewers as List <ViewerAspect>; var tags = note.Tags as List <TagAspect>; comments.ForEach(comment => _commentAspectSynchronizor.Synchronize(comment)); viewers.ForEach(viewer => _viewerAspectSynchronizor.Synchronize(viewer)); tags.ForEach(tag => _tagAspectSynchronizor.Synchronize(tag)); _persistence.Complete(); }
public void Add(IUser user) { _userInfoPersistor.Add(user); _persistence.Complete(); }
public void Add(ILearningRoom learningRoom) { _roomPersistor.Add(learningRoom); learningRoom.Participants.ToList().ForEach(p => _participantPersistor.Add(p)); _persistence.Complete(); }
public void Persist(IImage image) { _imageAspectSynchronizor.Synchronize(image); _persistence.Complete(); _streamAspectSynchronizor.Synchronize(image); }