From 6ad9bb91427d1c4f147428b58e4b7e14a4c28c03 Mon Sep 17 00:00:00 2001 From: "Steven T. Cramer" Date: Tue, 5 Mar 2024 08:38:44 +0700 Subject: [PATCH] Update AssemlyMarkers and set strategy. --- Directory.Build.props | 2 +- Source/BlazorState/AssemlyAnnotations.cs | 18 ------------------ Source/BlazorState/AssemlyMarker.cs | 12 ++++++++++++ .../TimeWarp.State.Plus/AssemlyAnnotations.cs | 14 -------------- Source/TimeWarp.State.Plus/AssemlyMarker.cs | 12 ++++++++++++ .../Test.App/Test.App.Client/AssemblyMarker.cs | 12 ++++++++++++ Tests/Test.App/Test.App.Client/Program.cs | 4 ++-- 7 files changed, 39 insertions(+), 35 deletions(-) delete mode 100644 Source/BlazorState/AssemlyAnnotations.cs create mode 100644 Source/BlazorState/AssemlyMarker.cs delete mode 100644 Source/TimeWarp.State.Plus/AssemlyAnnotations.cs create mode 100644 Source/TimeWarp.State.Plus/AssemlyMarker.cs create mode 100644 Tests/Test.App/Test.App.Client/AssemblyMarker.cs diff --git a/Directory.Build.props b/Directory.Build.props index fc70989d1..bd14e3034 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ Steven T. Cramer Blazor State - 11.0.0-beta.11+8.0.101 + 11.0.0-beta.12+8.0.101 https://timewarpengineering.github.io/blazor-state/ TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; Pipeline; Redux; Flux Logo.png diff --git a/Source/BlazorState/AssemlyAnnotations.cs b/Source/BlazorState/AssemlyAnnotations.cs deleted file mode 100644 index b55a93669..000000000 --- a/Source/BlazorState/AssemlyAnnotations.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace BlazorState; - -/// -/// A class used to reference the assembly -/// -/// -/// When you want to scan items in assembly you have pass in a class in the assembly. -/// Refactoring by moving things around can sometimes cause issues. -/// If you want a specific Assembly you can reference this class. -/// - -[UsedImplicitly] -// ReSharper disable once InconsistentNaming -public class Blazor_State_Assembly { } - -[UsedImplicitly] -// ReSharper disable once InconsistentNaming -public class TimeWarp_State_Assembly { } diff --git a/Source/BlazorState/AssemlyMarker.cs b/Source/BlazorState/AssemlyMarker.cs new file mode 100644 index 000000000..1352d66be --- /dev/null +++ b/Source/BlazorState/AssemlyMarker.cs @@ -0,0 +1,12 @@ +namespace BlazorState; + +/// +/// Serves as a marker for the assembly, facilitating easy identification and reflection-based operations. +/// +/// +/// This class is intended to be used as a reference point within the assembly for scenarios such as assembly scanning, +/// where a stable, known type is required to locate the assembly at runtime. The class is sealed to indicate it is not +/// designed for inheritance or extension, reinforcing its role as a simple marker. +/// +[UsedImplicitly] +public sealed class AssemblyMarker { } diff --git a/Source/TimeWarp.State.Plus/AssemlyAnnotations.cs b/Source/TimeWarp.State.Plus/AssemlyAnnotations.cs deleted file mode 100644 index 9bc9ccce3..000000000 --- a/Source/TimeWarp.State.Plus/AssemlyAnnotations.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BlazorState; - -/// -/// A class used to reference the assembly -/// -/// -/// When you want to scan items in assembly you have pass in a class in the assembly. -/// Refactoring by moving things around can sometimes cause issues. -/// If you want a specific Assembly you can reference this class. -/// - -[UsedImplicitly] -// ReSharper disable once InconsistentNaming -public class TimeWarp_State_Plus_Assembly { } diff --git a/Source/TimeWarp.State.Plus/AssemlyMarker.cs b/Source/TimeWarp.State.Plus/AssemlyMarker.cs new file mode 100644 index 000000000..10d4e4e24 --- /dev/null +++ b/Source/TimeWarp.State.Plus/AssemlyMarker.cs @@ -0,0 +1,12 @@ +namespace TimeWarp.State.Plus; + +/// +/// Serves as a marker for the assembly, facilitating easy identification and reflection-based operations. +/// +/// +/// This class is intended to be used as a reference point within the assembly for scenarios such as assembly scanning, +/// where a stable, known type is required to locate the assembly at runtime. The class is sealed to indicate it is not +/// designed for inheritance or extension, reinforcing its role as a simple marker. +/// +[UsedImplicitly] +public sealed class AssemblyMarker { } diff --git a/Tests/Test.App/Test.App.Client/AssemblyMarker.cs b/Tests/Test.App/Test.App.Client/AssemblyMarker.cs new file mode 100644 index 000000000..4c537b545 --- /dev/null +++ b/Tests/Test.App/Test.App.Client/AssemblyMarker.cs @@ -0,0 +1,12 @@ +namespace Test.App.Client; + +/// +/// Serves as a marker for the assembly, facilitating easy identification and reflection-based operations. +/// +/// +/// This class is intended to be used as a reference point within the assembly for scenarios such as assembly scanning, +/// where a stable, known type is required to locate the assembly at runtime. The class is sealed to indicate it is not +/// designed for inheritance or extension, reinforcing its role as a simple marker. +/// +[UsedImplicitly] +public sealed class AssemblyMarker { } diff --git a/Tests/Test.App/Test.App.Client/Program.cs b/Tests/Test.App/Test.App.Client/Program.cs index 5175fcbca..abff843a4 100644 --- a/Tests/Test.App/Test.App.Client/Program.cs +++ b/Tests/Test.App/Test.App.Client/Program.cs @@ -30,8 +30,8 @@ public static void ConfigureServices(IServiceCollection serviceCollection) options.Assemblies = new[] { - typeof(Program).GetTypeInfo().Assembly, - typeof(StateInitializedNotificationHandler).GetTypeInfo().Assembly + typeof(Test.App.Client.AssemblyMarker).GetTypeInfo().Assembly, + typeof(TimeWarp.State.Plus.AssemblyMarker).GetTypeInfo().Assembly }; } );