From e553f14c6bf0239e2e8851d1cab24c494a78089b Mon Sep 17 00:00:00 2001 From: Ben Oukhanov Date: Wed, 12 Apr 2023 20:33:14 +0300 Subject: [PATCH] feat(game-service): add client count --- .../Components/Client/GameClientCollection.cs | 5 +++++ .../Components/Client/IGameClientCollection.cs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/game-service/Game.Application/Components/Client/GameClientCollection.cs b/src/game-service/Game.Application/Components/Client/GameClientCollection.cs index ebfdd9fac..dd5be6450 100644 --- a/src/game-service/Game.Application/Components/Client/GameClientCollection.cs +++ b/src/game-service/Game.Application/Components/Client/GameClientCollection.cs @@ -55,5 +55,10 @@ public bool TryGet(int id, out IGameClient gameClient) { return collection.TryGetValue(id, out gameClient); } + + public int Count() + { + return collection.Count; + } } } \ No newline at end of file diff --git a/src/game-service/Game.Application/Components/Client/IGameClientCollection.cs b/src/game-service/Game.Application/Components/Client/IGameClientCollection.cs index 4ce270701..be5ae7bfc 100644 --- a/src/game-service/Game.Application/Components/Client/IGameClientCollection.cs +++ b/src/game-service/Game.Application/Components/Client/IGameClientCollection.cs @@ -7,5 +7,7 @@ public interface IGameClientCollection void Remove(int id); bool TryGet(int id, out IGameClient gameClient); + + int Count(); } } \ No newline at end of file