From 2f81a202212528126a3609da41d2e0ce92fe0f1e Mon Sep 17 00:00:00 2001 From: KurnakovMaksim Date: Thu, 16 Dec 2021 11:17:52 +0900 Subject: [PATCH] Rename Empty -> IsEmpty in Room --- .../ListenTogether.Application/Rooms/LeaveRoomRequestHandler.cs | 2 +- src/Services/ListenTogether/ListenTogether.Domain/Room.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/ListenTogether/ListenTogether.Application/Rooms/LeaveRoomRequestHandler.cs b/src/Services/ListenTogether/ListenTogether.Application/Rooms/LeaveRoomRequestHandler.cs index a8752e9..be03f42 100644 --- a/src/Services/ListenTogether/ListenTogether.Application/Rooms/LeaveRoomRequestHandler.cs +++ b/src/Services/ListenTogether/ListenTogether.Application/Rooms/LeaveRoomRequestHandler.cs @@ -40,7 +40,7 @@ public class LeaveRoomRequestHandler : IRequestHandler var requestConnectionId = request.ConnectionId; room.RemoveUser(requestConnectionId); - if (room.Empty()) + if (room.IsEmpty()) { _dbContext.Rooms.Remove(room); } diff --git a/src/Services/ListenTogether/ListenTogether.Domain/Room.cs b/src/Services/ListenTogether/ListenTogether.Domain/Room.cs index e0ff0b0..7e9a800 100644 --- a/src/Services/ListenTogether/ListenTogether.Domain/Room.cs +++ b/src/Services/ListenTogether/ListenTogether.Domain/Room.cs @@ -51,7 +51,7 @@ public class Room } } - public bool Empty() + public bool IsEmpty() { return Users.Count == 0; }