From 868d851874b6f906d2eab86e67ff501f99e03a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E4=BA=91=E9=87=91YunjinXu?= Date: Mon, 23 Jun 2025 16:50:55 +0800 Subject: [PATCH] refactor: remove wf Exists debug condition --- src/Dtmworkflow/WorkflowGlobalTransaction.cs | 2 -- tests/Dtmworkflow.Tests/WorkflowGlobalTransactionTest.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/Dtmworkflow/WorkflowGlobalTransaction.cs b/src/Dtmworkflow/WorkflowGlobalTransaction.cs index ce4bbec..fcb1b96 100644 --- a/src/Dtmworkflow/WorkflowGlobalTransaction.cs +++ b/src/Dtmworkflow/WorkflowGlobalTransaction.cs @@ -62,11 +62,9 @@ public async Task ExecuteByQS(Microsoft.AspNetCore.Http.IQueryCollection query, } #endif - #if DEBUG // for sample only public bool Exists(string name) { return this._handlers.ContainsKey(name); } - #endif } } diff --git a/tests/Dtmworkflow.Tests/WorkflowGlobalTransactionTest.cs b/tests/Dtmworkflow.Tests/WorkflowGlobalTransactionTest.cs index 7757ada..361592b 100644 --- a/tests/Dtmworkflow.Tests/WorkflowGlobalTransactionTest.cs +++ b/tests/Dtmworkflow.Tests/WorkflowGlobalTransactionTest.cs @@ -7,7 +7,6 @@ namespace Dtmworkflow.Tests; public class WorkflowGlobalTransactionTest { - #if DEBUG [Fact] public void Exists() { @@ -34,5 +33,4 @@ public void Exists() Assert.False(wf2.Exists("my-wf2")); Assert.False(wf2.Exists("my-wf3")); } - #endif } \ No newline at end of file