From 0d308cee6eb7e8e9e1d92506fe04dffe732091dd Mon Sep 17 00:00:00 2001 From: Heku Date: Tue, 14 Apr 2026 21:17:26 +0800 Subject: [PATCH] Code cleanup and typo fix (#7393) * Drop IsExternalInit.cs * Fixed a wrong cref namespace in comment * Mark IWorkflowHost obsoleted too * Remove Source Link package reference Starting with .NET 8, Source Link for GitHub is included in the .NET SDK and enabled by default. https://github.com/dotnet/sourcelink?tab=readme-ov-file#using-source-link-in-net-projects --- Directory.Packages.props | 1 - src/Directory.Build.props | 1 - src/apps/Directory.Build.props | 1 - src/clients/Elsa.Api.Client/IsExternalInit.cs | 7 ------- .../Flowchart/Models/FlowchartExecutionMode.cs | 2 +- .../Elsa.Workflows.Core/IsExternalInit.cs | 17 ----------------- .../Contracts/IWorkflowHost.cs | 1 + .../Elsa.Workflows.Runtime/IsExternalInit.cs | 16 ---------------- 8 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 src/clients/Elsa.Api.Client/IsExternalInit.cs delete mode 100644 src/modules/Elsa.Workflows.Core/IsExternalInit.cs delete mode 100644 src/modules/Elsa.Workflows.Runtime/IsExternalInit.cs diff --git a/Directory.Packages.props b/Directory.Packages.props index d47a5fe18..ccc5badb8 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -131,7 +131,6 @@ - diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 6330b1711..2b0debfb6 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -14,7 +14,6 @@ - \ No newline at end of file diff --git a/src/apps/Directory.Build.props b/src/apps/Directory.Build.props index 0d8817302..d532ebc62 100644 --- a/src/apps/Directory.Build.props +++ b/src/apps/Directory.Build.props @@ -12,6 +12,5 @@ - \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/IsExternalInit.cs b/src/clients/Elsa.Api.Client/IsExternalInit.cs deleted file mode 100644 index 653e3c181..000000000 --- a/src/clients/Elsa.Api.Client/IsExternalInit.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System.ComponentModel; - -// ReSharper disable once CheckNamespace -namespace System.Runtime.CompilerServices; - -[EditorBrowsable(EditorBrowsableState.Never)] -internal sealed class IsExternalInit; \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowchartExecutionMode.cs b/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowchartExecutionMode.cs index 0368f0c70..4a811f2a0 100644 --- a/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowchartExecutionMode.cs +++ b/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowchartExecutionMode.cs @@ -6,7 +6,7 @@ namespace Elsa.Workflows.Activities.Flowchart.Models; public enum FlowchartExecutionMode { /// - /// Use the default mode as specified by . + /// Use the default mode as specified by . /// Default = 0, diff --git a/src/modules/Elsa.Workflows.Core/IsExternalInit.cs b/src/modules/Elsa.Workflows.Core/IsExternalInit.cs deleted file mode 100644 index dfaa576cd..000000000 --- a/src/modules/Elsa.Workflows.Core/IsExternalInit.cs +++ /dev/null @@ -1,17 +0,0 @@ -// // Licensed to the .NET Foundation under one or more agreements. -// // The .NET Foundation licenses this file to you under the MIT license. -// -// using System.ComponentModel; -// -// // ReSharper disable once CheckNamespace -// namespace System.Runtime.CompilerServices -// { -// /// -// /// Reserved to be used by the compiler for tracking metadata. -// /// This class should not be used by developers in source code. -// /// -// [EditorBrowsable(EditorBrowsableState.Never)] -// internal static class IsExternalInit -// { -// } -// } \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Runtime/Contracts/IWorkflowHost.cs b/src/modules/Elsa.Workflows.Runtime/Contracts/IWorkflowHost.cs index d2f3f1f59..d00c12601 100644 --- a/src/modules/Elsa.Workflows.Runtime/Contracts/IWorkflowHost.cs +++ b/src/modules/Elsa.Workflows.Runtime/Contracts/IWorkflowHost.cs @@ -8,6 +8,7 @@ namespace Elsa.Workflows.Runtime; /// /// Represents a single workflow instance that can be executed and takes care of publishing various lifecycle events. /// +[Obsolete("Use IWorkflowRuntime and IWorkflowClient services instead.")] public interface IWorkflowHost { /// diff --git a/src/modules/Elsa.Workflows.Runtime/IsExternalInit.cs b/src/modules/Elsa.Workflows.Runtime/IsExternalInit.cs deleted file mode 100644 index 8ef825334..000000000 --- a/src/modules/Elsa.Workflows.Runtime/IsExternalInit.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.ComponentModel; - -// ReSharper disable once CheckNamespace -namespace System.Runtime.CompilerServices; - -/// -/// Reserved to be used by the compiler for tracking metadata. -/// This class should not be used by developers in source code. -/// -[EditorBrowsable(EditorBrowsableState.Never)] -internal static class IsExternalInit -{ -} \ No newline at end of file