From 7dc23aad43aa021b9a59adb0ea1cd05c3770b81f Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Mon, 17 Nov 2025 15:47:57 +0000 Subject: [PATCH 1/7] Optionally pass in ConcurrentDictionary --- src/ViewModels.Core/InMemoryViewModelRepository.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ViewModels.Core/InMemoryViewModelRepository.cs b/src/ViewModels.Core/InMemoryViewModelRepository.cs index 3b28f10..5cc9cca 100644 --- a/src/ViewModels.Core/InMemoryViewModelRepository.cs +++ b/src/ViewModels.Core/InMemoryViewModelRepository.cs @@ -25,7 +25,9 @@ public class InMemoryViewModelRepository : IViewModelReader, IViewModelWriter /// /// Initializes a new instance of the class which reads view models from, and writes them to, a .Net ConcurrentDictionary stored in memory. /// - public InMemoryViewModelRepository() => _entityCollections = new ConcurrentDictionary(); + /// An optional dictionary to enable preloaded state to be provided. + public InMemoryViewModelRepository(ConcurrentDictionary entityCollections = null) => + _entityCollections = entityCollections ?? new ConcurrentDictionary(); /// /// Gets the underlying dictionary which stores all of the entities in the . From 520b446d2713bf4418a1d07ef9cfb308aeea3cfa Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Tue, 18 Nov 2025 11:32:04 +0000 Subject: [PATCH 2/7] Corsham Science -> PharmaxoScientific --- src/ViewModels.Core/ViewModels.Core.csproj | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ViewModels.Core/ViewModels.Core.csproj b/src/ViewModels.Core/ViewModels.Core.csproj index dd170a1..1f14d68 100644 --- a/src/ViewModels.Core/ViewModels.Core.csproj +++ b/src/ViewModels.Core/ViewModels.Core.csproj @@ -3,13 +3,13 @@ netstandard2.0 - CorshamScience.ViewModels.Core - CorshamScience.ViewModels.Core - CorshamScience.ViewModels.Core - Corsham Science - Corsham Science + PharmaxoScientific.ViewModels.Core + PharmaxoScientific.ViewModels.Core + PharmaxoScientific.ViewModels.Core + Pharmaxo Scientific + Pharmaxo Scientific CorshamScience.ViewModels - Corsham Science 2019 + Pharmaxo Scientific 2025 A package containing .NET interfaces for reading/writing CQRS ViewModels in a generic way. https://github.com/qphl/ViewModels.Core https://raw.githubusercontent.com/qphl/ViewModels.Core/master/logo.png @@ -21,13 +21,13 @@ - bin\Debug\netstandard2.0\CorshamScience.ViewModels.Core.xml + bin\Debug\netstandard2.0\PharmaxoScientific.ViewModels.Core.xml true - bin\Release\netstandard2.0\CorshamScience.ViewModels.Core.xml + bin\Release\netstandard2.0\PharmaxoScientific.ViewModels.Core.xml @@ -38,7 +38,6 @@ - True From ca7f258fc919f0924693073222e992a3123736f9 Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Tue, 18 Nov 2025 11:40:05 +0000 Subject: [PATCH 3/7] Fix build --- src/ViewModels.Core/ViewModels.Core.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ViewModels.Core/ViewModels.Core.csproj b/src/ViewModels.Core/ViewModels.Core.csproj index 1f14d68..633a33d 100644 --- a/src/ViewModels.Core/ViewModels.Core.csproj +++ b/src/ViewModels.Core/ViewModels.Core.csproj @@ -38,6 +38,7 @@ + True From 177a35f2b9fb8c7f57931099bcd50e4ec5282022 Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Tue, 18 Nov 2025 11:58:03 +0000 Subject: [PATCH 4/7] Update namespaces --- .../InMemoryViewModelRepositoryTests.cs | 4 ++-- src/ViewModels.Core.Tests/TestEntity1.cs | 2 +- src/ViewModels.Core.Tests/TestEntity2.cs | 2 +- src/ViewModels.Core.Tests/ViewModelRepositoryTestFixture.cs | 6 +++--- src/ViewModels.Core.Tests/ViewModels.Core.Tests.csproj | 2 +- src/ViewModels.Core/Exceptions/DuplicateKeyException.cs | 2 +- src/ViewModels.Core/Exceptions/EntityNotFoundException.cs | 2 +- src/ViewModels.Core/IViewModelReader.cs | 2 +- src/ViewModels.Core/IViewModelWriter.cs | 4 ++-- src/ViewModels.Core/InMemoryViewModelRepository.cs | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ViewModels.Core.Tests/InMemoryViewModelRepositoryTests.cs b/src/ViewModels.Core.Tests/InMemoryViewModelRepositoryTests.cs index ea5e3f2..7125397 100644 --- a/src/ViewModels.Core.Tests/InMemoryViewModelRepositoryTests.cs +++ b/src/ViewModels.Core.Tests/InMemoryViewModelRepositoryTests.cs @@ -2,10 +2,10 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core.Tests +namespace PharmaxoScientific.ViewModels.Core.Tests { - using CorshamScience.ViewModels.Core; using NUnit.Framework; + using PharmaxoScientific.ViewModels.Core; /// [TestFixture] diff --git a/src/ViewModels.Core.Tests/TestEntity1.cs b/src/ViewModels.Core.Tests/TestEntity1.cs index 8c47257..29d052b 100644 --- a/src/ViewModels.Core.Tests/TestEntity1.cs +++ b/src/ViewModels.Core.Tests/TestEntity1.cs @@ -2,7 +2,7 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core.Tests +namespace PharmaxoScientific.ViewModels.Core.Tests { using System; diff --git a/src/ViewModels.Core.Tests/TestEntity2.cs b/src/ViewModels.Core.Tests/TestEntity2.cs index cec61ef..0d6a472 100644 --- a/src/ViewModels.Core.Tests/TestEntity2.cs +++ b/src/ViewModels.Core.Tests/TestEntity2.cs @@ -2,7 +2,7 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core.Tests +namespace PharmaxoScientific.ViewModels.Core.Tests { using System; diff --git a/src/ViewModels.Core.Tests/ViewModelRepositoryTestFixture.cs b/src/ViewModels.Core.Tests/ViewModelRepositoryTestFixture.cs index 088f601..834ad6a 100644 --- a/src/ViewModels.Core.Tests/ViewModelRepositoryTestFixture.cs +++ b/src/ViewModels.Core.Tests/ViewModelRepositoryTestFixture.cs @@ -2,15 +2,15 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core.Tests +namespace PharmaxoScientific.ViewModels.Core.Tests { using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; - using CorshamScience.ViewModels.Core; - using CorshamScience.ViewModels.Core.Exceptions; using NUnit.Framework; + using PharmaxoScientific.ViewModels.Core; + using PharmaxoScientific.ViewModels.Core.Exceptions; /// /// A Test Fixture for a View Model Repository. diff --git a/src/ViewModels.Core.Tests/ViewModels.Core.Tests.csproj b/src/ViewModels.Core.Tests/ViewModels.Core.Tests.csproj index 4c81c88..7b8b589 100644 --- a/src/ViewModels.Core.Tests/ViewModels.Core.Tests.csproj +++ b/src/ViewModels.Core.Tests/ViewModels.Core.Tests.csproj @@ -2,7 +2,7 @@ netcoreapp2.0 - CorshamScience.ViewModels.Core.Tests + PharmaxoScientific.ViewModels.Core.Tests diff --git a/src/ViewModels.Core/Exceptions/DuplicateKeyException.cs b/src/ViewModels.Core/Exceptions/DuplicateKeyException.cs index 3672252..4fc5e0f 100644 --- a/src/ViewModels.Core/Exceptions/DuplicateKeyException.cs +++ b/src/ViewModels.Core/Exceptions/DuplicateKeyException.cs @@ -2,7 +2,7 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core.Exceptions +namespace PharmaxoScientific.ViewModels.Core.Exceptions { using System; using System.Runtime.Serialization; diff --git a/src/ViewModels.Core/Exceptions/EntityNotFoundException.cs b/src/ViewModels.Core/Exceptions/EntityNotFoundException.cs index d94bf78..761cd61 100644 --- a/src/ViewModels.Core/Exceptions/EntityNotFoundException.cs +++ b/src/ViewModels.Core/Exceptions/EntityNotFoundException.cs @@ -2,7 +2,7 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core.Exceptions +namespace PharmaxoScientific.ViewModels.Core.Exceptions { using System; using System.Runtime.Serialization; diff --git a/src/ViewModels.Core/IViewModelReader.cs b/src/ViewModels.Core/IViewModelReader.cs index 2ae7f0b..125ba65 100644 --- a/src/ViewModels.Core/IViewModelReader.cs +++ b/src/ViewModels.Core/IViewModelReader.cs @@ -2,7 +2,7 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core +namespace PharmaxoScientific.ViewModels.Core { using System; using System.Linq; diff --git a/src/ViewModels.Core/IViewModelWriter.cs b/src/ViewModels.Core/IViewModelWriter.cs index 2ca4734..5d341f8 100644 --- a/src/ViewModels.Core/IViewModelWriter.cs +++ b/src/ViewModels.Core/IViewModelWriter.cs @@ -2,11 +2,11 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core +namespace PharmaxoScientific.ViewModels.Core { using System; using System.Linq.Expressions; - using CorshamScience.ViewModels.Core.Exceptions; + using PharmaxoScientific.ViewModels.Core.Exceptions; /// /// An interface that will be extended by any class that allows for writing view models. diff --git a/src/ViewModels.Core/InMemoryViewModelRepository.cs b/src/ViewModels.Core/InMemoryViewModelRepository.cs index 5cc9cca..ac63b6d 100644 --- a/src/ViewModels.Core/InMemoryViewModelRepository.cs +++ b/src/ViewModels.Core/InMemoryViewModelRepository.cs @@ -2,14 +2,14 @@ // Copyright (c) Corsham Science. All rights reserved. // -namespace CorshamScience.ViewModels.Core +namespace PharmaxoScientific.ViewModels.Core { using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; - using CorshamScience.ViewModels.Core.Exceptions; + using PharmaxoScientific.ViewModels.Core.Exceptions; /// /// From 60b4b72868fd14c73454f36ffa532f23e24633a5 Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Tue, 18 Nov 2025 12:18:34 +0000 Subject: [PATCH 5/7] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 266b6ef..db4d4bf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# CR.ViewModels.Core +# PharmaxoScientific.ViewModels.Core A package containing .NET interfaces for reading/writing CQRS ViewModels in a generic way. \ No newline at end of file From 08ec650e76a410534e3c1c9d28ca2ef5a5cf9a1e Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Tue, 18 Nov 2025 12:31:14 +0000 Subject: [PATCH 6/7] Add GitVersionConfig.yaml --- GitVersionConfig.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 GitVersionConfig.yaml diff --git a/GitVersionConfig.yaml b/GitVersionConfig.yaml new file mode 100644 index 0000000..81cad7b --- /dev/null +++ b/GitVersionConfig.yaml @@ -0,0 +1,2 @@ +mode: ContinuousDeployment +branches: {} From ef34ba335a751bfe5694bede4917090962ee9a70 Mon Sep 17 00:00:00 2001 From: Sam Matthews Date: Wed, 19 Nov 2025 12:33:57 +0000 Subject: [PATCH 7/7] Revert constructor changes --- src/ViewModels.Core/InMemoryViewModelRepository.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ViewModels.Core/InMemoryViewModelRepository.cs b/src/ViewModels.Core/InMemoryViewModelRepository.cs index ac63b6d..4ba2021 100644 --- a/src/ViewModels.Core/InMemoryViewModelRepository.cs +++ b/src/ViewModels.Core/InMemoryViewModelRepository.cs @@ -25,9 +25,7 @@ public class InMemoryViewModelRepository : IViewModelReader, IViewModelWriter /// /// Initializes a new instance of the class which reads view models from, and writes them to, a .Net ConcurrentDictionary stored in memory. /// - /// An optional dictionary to enable preloaded state to be provided. - public InMemoryViewModelRepository(ConcurrentDictionary entityCollections = null) => - _entityCollections = entityCollections ?? new ConcurrentDictionary(); + public InMemoryViewModelRepository() => _entityCollections = new ConcurrentDictionary(); /// /// Gets the underlying dictionary which stores all of the entities in the .