From c87f46af137156599689cfeabe33566d440de92a Mon Sep 17 00:00:00 2001 From: stidsborg Date: Fri, 8 Dec 2023 12:37:44 +0100 Subject: [PATCH] Add ++ operator to SyncedCounter --- .../Utils/SyncedCounter.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/Cleipnir.ResilientFunctions.Tests/Utils/SyncedCounter.cs b/Core/Cleipnir.ResilientFunctions.Tests/Utils/SyncedCounter.cs index a36ae532..d324bde7 100644 --- a/Core/Cleipnir.ResilientFunctions.Tests/Utils/SyncedCounter.cs +++ b/Core/Cleipnir.ResilientFunctions.Tests/Utils/SyncedCounter.cs @@ -19,4 +19,10 @@ public int Increment() lock (_sync) return _current++; } + + public static SyncedCounter operator ++(SyncedCounter counter) + { + counter.Increment(); + return counter; + } } \ No newline at end of file