From 27381788642030fc5e26e286f30474104b5078ef Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Thu, 25 Dec 2025 06:54:09 -0500 Subject: [PATCH 1/7] Automapper 15 and net10 update --- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 1 + .../OLT.DataAdapters.AutoMapper.csproj | 4 +- ...ions.DependencyInjection.AutoMapper.csproj | 7 +- .../OltAutoMapperAssemblyFilter.cs | 105 -------------- ...ltServiceCollectionAutoMapperExtensions.cs | 137 +++--------------- .../OLT.DataAdapters.AutoMapper.Tests.csproj | 2 +- 7 files changed, 26 insertions(+), 231 deletions(-) delete mode 100644 src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperAssemblyFilter.cs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06304e1..b49c12f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,7 @@ jobs: dotnet-version: | 8.0.x 9.0.x + 10.0.x - name: Get branch name id: branch-name diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fae1351..ea07faf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: dotnet-version: | 8.0.x 9.0.x + 10.0.x - name: Get Version id: get_version diff --git a/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj b/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj index 3dd96d6..f759800 100644 --- a/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj +++ b/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj @@ -1,6 +1,6 @@  - net9.0;net8.0 + net10.0;net9.0;net8.0 OLT.Core DataAdapters AutoMapper Library 07F972FB-E132-4FBF-B52F-DC18A2FFB622 @@ -9,7 +9,7 @@ - + diff --git a/src/OLT.Extensions.DependencyInjection.AutoMapper/OLT.Extensions.DependencyInjection.AutoMapper.csproj b/src/OLT.Extensions.DependencyInjection.AutoMapper/OLT.Extensions.DependencyInjection.AutoMapper.csproj index a7cff30..e4c7710 100644 --- a/src/OLT.Extensions.DependencyInjection.AutoMapper/OLT.Extensions.DependencyInjection.AutoMapper.csproj +++ b/src/OLT.Extensions.DependencyInjection.AutoMapper/OLT.Extensions.DependencyInjection.AutoMapper.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0 + net10.0;net9.0;net8.0 OLT.Core Auto Mapper Extensions for Data Adapters c956c04f-4523-4f68-961c-8174803aa073 @@ -9,9 +9,8 @@ - - - + + diff --git a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperAssemblyFilter.cs b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperAssemblyFilter.cs deleted file mode 100644 index f9c2708..0000000 --- a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperAssemblyFilter.cs +++ /dev/null @@ -1,105 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using OLT.Utility.AssemblyScanner; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace OLT.Core -{ - - /// - /// Assembly Scan Filter - /// - [Obsolete("Move to OLT.Utility.AssemblyScanner")] - public class OltAutoMapperAssemblyFilter - { - - /// - /// OLT.*, MyApp.*, and includes exclustions - /// - /// - public OltAutoMapperAssemblyFilter(params string[] filters) - { - Filters.AddRange(filters); - WithDefaultDIExclusionFilters(); - } - - - /// - /// Defaults "Microsoft.*" and "System.*" to prevent Microsoft and System Assemblies from loading into the DI scan - /// - /// - /// - /// https://github.com/dotnet/SqlClient/issues/1930 - /// https://github.com/borisdj/EFCore.BulkExtensions/issues/1402 - /// - /// - public OltAutoMapperAssemblyFilter WithDefaultDIExclusionFilters() - { - this.ExcludeFilters = new List { "Microsoft.*", "System.*" }; - return this; - } - - public List Filters { get; set; } = new List(); - public List ExcludeFilters { get; set; } = new List(); - - public virtual IEnumerable FilterAssemblies(IEnumerable assemblies) - { - if (Filters.Count > 0 || ExcludeFilters.Count > 0) - { - var filtered = Filters.Count > 0 ? assemblies.Where(ShouldIncludeAssembly) : assemblies; - return ExcludeFilters.Count > 0 ? filtered.Where(p => ShouldExcludeAssembly(p) == false) : filtered; - } - - return assemblies; - } - - - - public virtual bool ShouldIncludeAssembly(Assembly assembly) - { - return Filters.Exists(filter => MatchesFilter(assembly, filter)); - } - - protected virtual bool MatchesFilter(Assembly assembly, string filter) - { - if (string.IsNullOrEmpty(filter)) - { - return false; - } - - if (assembly.FullName is null) - { - return false; - } - - if (filter.EndsWith("*")) - { - var prefix = filter.TrimEnd('*'); - return assembly.FullName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase); - } - else - { - var assemblyName = assembly.FullName.Split(',')[0]; - return string.Equals(assemblyName, filter, StringComparison.OrdinalIgnoreCase); - } - } - - public virtual bool ShouldExcludeAssembly(Assembly assembly) - { - return ExcludeFilters.Exists(filter => MatchesFilter(assembly, filter)); - } - - public virtual void RemoveAllExclusions(List assemblies) - { - ExcludeFilters.ForEach(excludeName => RemoveAll(assemblies, excludeName)); - } - - public virtual void RemoveAll(List assemblies, string excludeName) - { - assemblies.RemoveAll(p => MatchesFilter(p, excludeName)); - } - - } -} diff --git a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs index 92b1697..adb955a 100644 --- a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs +++ b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs @@ -1,127 +1,26 @@ -using AutoMapper; -using Microsoft.Extensions.DependencyInjection; -using OLT.Utility.AssemblyScanner; +using Microsoft.Extensions.DependencyInjection; using System; -using System.Collections.Generic; -using System.Reflection; -namespace OLT.Core -{ +namespace OLT.Core; +/// +/// Provides extension methods for adding AutoMapper services to the IServiceCollection. +/// +public static class OltServiceCollectionAutoMapperExtensions +{ /// - /// Provides extension methods for adding AutoMapper services to the IServiceCollection. + /// Adds AutoMapper services to the IServiceCollection. /// - public static class OltServiceCollectionAutoMapperExtensions + /// The IServiceCollection to add the services to. + /// An action to configure the OltAutoMapperBuilder. + /// The IServiceCollection with the added services. + public static IServiceCollection AddOltAutoMapper(this IServiceCollection services, Action action) { - - /// - /// Adds AutoMapper services to the IServiceCollection. - /// - /// The IServiceCollection to add the services to. - /// An action to configure the OltAutoMapperBuilder. - /// The IServiceCollection with the added services. - public static IServiceCollection AddOltAutoMapper(this IServiceCollection services, Action action) - { - ArgumentNullException.ThrowIfNull(services); - var builder = new OltAutoMapperBuilder(services); - action(builder); - builder.Build(); - return services; - } - - - - /// - /// Scans for automapper profiles using - /// - /// The IServiceCollection to add the services to. - /// An optional filter to apply to the assembly scan. - /// The IServiceCollection with the added services. - [Obsolete("Use AddOltAutoMapper")] - public static IServiceCollection AddOltInjectionAutoMapper(this IServiceCollection services, OltAutoMapperAssemblyFilter? filter = null) - { - return AddOltInjectionAutoMapper(services, new List(), null, ServiceLifetime.Transient, filter); - } - - /// - /// Scans for automapper profiles using - /// - /// The IServiceCollection to add the services to. - /// The assembly to include in the scan. - /// An optional filter to apply to the assembly scan. - /// The IServiceCollection with the added services. - /// Thrown when includeAssemblyScan is null. - [Obsolete("Use AddOltAutoMapper")] - public static IServiceCollection AddOltInjectionAutoMapper(this IServiceCollection services, Assembly includeAssemblyScan, OltAutoMapperAssemblyFilter? filter = null) - { - if (includeAssemblyScan == null) - { - throw new ArgumentNullException(nameof(includeAssemblyScan)); - } - - return AddOltInjectionAutoMapper(services, new List { includeAssemblyScan }, null, ServiceLifetime.Transient, filter); - } - - /// - /// Scans for automapper profiles using - /// - /// The IServiceCollection to add the services to. - /// The list of assemblies to include in the scan. - /// An optional filter to apply to the assembly scan. - /// The IServiceCollection with the added services. - [Obsolete("Use AddOltAutoMapper")] - public static IServiceCollection AddOltInjectionAutoMapper(this IServiceCollection services, List includeAssembliesScan, OltAutoMapperAssemblyFilter? filter = null) - { - return AddOltInjectionAutoMapper(services, includeAssembliesScan, null, ServiceLifetime.Transient, filter); - } - - /// - /// Scans for automapper profiles using - /// - /// The IServiceCollection to add the services to. - /// The list of assemblies to include in the scan. - /// An optional action to configure the IMapperConfigurationExpression. - /// The lifetime of the services to add. - /// An optional filter to apply to the assembly scan. - /// The IServiceCollection with the added services. - /// Thrown when services is null. - [Obsolete("Use AddOltAutoMapper")] - public static IServiceCollection AddOltInjectionAutoMapper(this IServiceCollection services, List includeAssembliesScan, Action? configAction, ServiceLifetime serviceLifetime = ServiceLifetime.Transient, OltAutoMapperAssemblyFilter? filter = null) - { - ArgumentNullException.ThrowIfNull(services); - includeAssembliesScan = includeAssembliesScan ?? new List(); - filter = filter ?? new OltAutoMapperAssemblyFilter(); - - var baseAssemblies = new List - { - Assembly.GetExecutingAssembly() - }; - - var entryAssembly = Assembly.GetEntryAssembly(); - if (entryAssembly != null) - { - baseAssemblies.Add(entryAssembly); - } - - baseAssemblies.AddRange(includeAssembliesScan); - - var assemblyScanner = new OLT.Utility.AssemblyScanner.OltAssemblyScanBuilder(); - assemblyScanner - .IncludeAssembly(baseAssemblies) - .DeepScan() - .ExcludeFilter(filter.ExcludeFilters.ToArray()) - .IncludeFilter(filter.Filters.ToArray()) - .ExcludeAutomapper() - .ExcludeMicrosoft(); - - - var assembliesToScan = assemblyScanner.Build(); - - var builder = new OltAutoMapperBuilder(services); - builder.WithServiceLifetime(serviceLifetime); - builder.AddMaps(assembliesToScan); - builder.Build(configAction); - return services; - } + ArgumentNullException.ThrowIfNull(services); + var builder = new OltAutoMapperBuilder(services); + action(builder); + builder.Build(); + return services; } + } diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj index 1a441d0..7818560 100644 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj +++ b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable From 6c2688500e14c276e3083710d5079a23652257b0 Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Thu, 25 Dec 2025 06:54:57 -0500 Subject: [PATCH 2/7] update OLT.DataAdapters to 10.x --- .../OLT.DataAdapters.AutoMapper.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj b/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj index f759800..6dc7d72 100644 --- a/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj +++ b/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj @@ -10,7 +10,7 @@ - + From 8175723499f16d324f25cdf7c7f8f643ef92366e Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Thu, 25 Dec 2025 06:58:38 -0500 Subject: [PATCH 3/7] dependentbot and nuget updates --- .github/dependabot.yml | 10 ++++++++++ .../OLT.DataAdapters.AutoMapper.Tests.csproj | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6af9d71..3b887de 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,3 +8,13 @@ updates: - "dependencies" - "github-actions" + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "weekly" + ignore: + - dependency-name: "AutoMapper" + - dependency-name: "AutoMapper.Collection" + labels: + - "dependencies" + - "nuget" diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj index 7818560..0d8c915 100644 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj +++ b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj @@ -6,15 +6,15 @@ - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 39152e9b3b9b836d1347d3a545d6ccd56a15bab7 Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Thu, 25 Dec 2025 07:40:14 -0500 Subject: [PATCH 4/7] Unit Test Fixes --- .../OltAutoMapperBuilder.cs | 6 +- ...ltServiceCollectionAutoMapperExtensions.cs | 6 +- .../BaseAdpaterTests.cs | 21 +++-- .../OLT.DataAdapters.AutoMapper.Tests.csproj | 8 +- ...rviceCollectionAutoMapperExtensionTests.cs | 80 ------------------- 5 files changed, 32 insertions(+), 89 deletions(-) delete mode 100644 tests/OLT.DataAdapters.AutoMapper.Tests/OltServiceCollectionAutoMapperExtensionTests.cs diff --git a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperBuilder.cs b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperBuilder.cs index 957caae..a49a373 100644 --- a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperBuilder.cs +++ b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltAutoMapperBuilder.cs @@ -85,13 +85,17 @@ public virtual OltAutoMapperBuilder AddProfiles(params Profile[] profiles) /// /// Builds the AutoMapper configuration and registers the necessary services. /// + /// License key for AutoMapper. /// An optional action to configure the AutoMapper. - public virtual void Build(Action? configAction = null) + public virtual void Build(string licenseKey, Action? configAction = null) { + ArgumentException.ThrowIfNullOrEmpty(licenseKey); + _services.AddSingleton(); _services.AddAutoMapper(cfg => { + cfg.LicenseKey = licenseKey; cfg.AddCollectionMappers(); cfg.AddProfiles(_profiles); configAction?.Invoke(cfg); diff --git a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs index adb955a..8662623 100644 --- a/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs +++ b/src/OLT.Extensions.DependencyInjection.AutoMapper/OltServiceCollectionAutoMapperExtensions.cs @@ -12,14 +12,16 @@ public static class OltServiceCollectionAutoMapperExtensions /// Adds AutoMapper services to the IServiceCollection. /// /// The IServiceCollection to add the services to. + /// License key for AutoMapper. /// An action to configure the OltAutoMapperBuilder. /// The IServiceCollection with the added services. - public static IServiceCollection AddOltAutoMapper(this IServiceCollection services, Action action) + public static IServiceCollection AddOltAutoMapper(this IServiceCollection services, string licenseKey, Action action) { ArgumentNullException.ThrowIfNull(services); + ArgumentException.ThrowIfNullOrEmpty(licenseKey); var builder = new OltAutoMapperBuilder(services); action(builder); - builder.Build(); + builder.Build(licenseKey); return services; } diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/BaseAdpaterTests.cs b/tests/OLT.DataAdapters.AutoMapper.Tests/BaseAdpaterTests.cs index 6d23214..0936ade 100644 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/BaseAdpaterTests.cs +++ b/tests/OLT.DataAdapters.AutoMapper.Tests/BaseAdpaterTests.cs @@ -1,5 +1,6 @@ -using Microsoft.Extensions.DependencyInjection; -using AutoMapper; +using AutoMapper; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using OLT.Core; using OLT.DataAdapters.AutoMapper.Tests.Adapters; using System.Collections.Generic; @@ -10,21 +11,31 @@ public abstract class BaseAdpaterTests { private readonly List DefaultMaps = new List { new AutoMapperMaps() }; - protected void RegisterMaps(IServiceCollection services, List maps) + protected void RegisterMaps(IServiceCollection services, IConfiguration configuration, List maps) { + var licenseKey = configuration.GetValue("AUTOMAPPER_LICENSE_KEY"); services.AddAutoMapper(cfg => { - maps.ForEach(map => cfg.AddProfile(map)); + cfg.LicenseKey = licenseKey; + maps.ForEach(map => cfg.AddProfile(map)); }); } protected ServiceProvider BuildProvider(List? maps = null) { + + var configuration = new ConfigurationBuilder() + .AddEnvironmentVariables() + .AddUserSecrets() + .Build(); + var services = new ServiceCollection(); + services.AddLogging(); + //using var loggerProvider = new InMemoryLoggerProvider(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - RegisterMaps(services, maps ?? DefaultMaps); + RegisterMaps(services, configuration, maps ?? DefaultMaps); return services.BuildServiceProvider(); } } diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj index 0d8c915..7c6b225 100644 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj +++ b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj @@ -3,11 +3,17 @@ net10.0 enable + a0afd969-ee06-459b-838d-86e9620e2c00 - + + + + + + diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/OltServiceCollectionAutoMapperExtensionTests.cs b/tests/OLT.DataAdapters.AutoMapper.Tests/OltServiceCollectionAutoMapperExtensionTests.cs deleted file mode 100644 index 015ccb9..0000000 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/OltServiceCollectionAutoMapperExtensionTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -//using AutoMapper; -//using Microsoft.Extensions.DependencyInjection; -//using OLT.Core; -//using System; -//using System.Collections.Generic; -//using System.Reflection; -//using Xunit; - -//namespace OLT.Extensions.DependencyInjection.AutoMapper.Tests -//{ -// public class OltServiceCollectionAutoMapperExtensionTests -// { -// [Fact] -// public void ExceptionTest() -// { -// var services = new ServiceCollection(); -// Assembly nullRef = null; -// List nullList = null; -// Action configAction = null; - -// Assert.Throws("services", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(null)); - -// Assert.Throws("includeAssemblyScan", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(null, nullRef)); -// Assert.Throws("includeAssemblyScan", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(null, nullRef, new OltAutoMapperAssemblyFilter())); - -// Assert.Throws("services", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(null, nullList)); -// Assert.Throws("services", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(null, nullList, new OltAutoMapperAssemblyFilter())); - -// Assert.Throws("includeAssemblyScan", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, nullRef)); -// Assert.Throws("includeAssemblyScan", () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, nullRef, new OltAutoMapperAssemblyFilter())); - -// var act = () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, nullList); -// Assert.Throws(act); -// act.Should().NotThrow(); - -// act = () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, new List() { this.GetType().Assembly }, configAction); -// act.Should().NotThrow(); - -// act = () => OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, new List() { this.GetType().Assembly }, cfg => cfg.DisableConstructorMapping(), ServiceLifetime.Scoped); - -// act.Should().NotThrow(); -// } - -// [Fact] -// public void InjectionTest() -// { -// var services = new ServiceCollection(); -// OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services); - -// using (var provider = services.BuildServiceProvider()) -// { -// Assert.NotNull(provider.GetService()); -// } -// } - -// [Fact] -// public void InjectionAssemblyTest() -// { -// var services = new ServiceCollection(); -// OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, this.GetType().Assembly); - -// using (var provider = services.BuildServiceProvider()) -// { -// Assert.NotNull(provider.GetService()); -// } -// } - -// [Fact] -// public void InjectionAssemblyListTest() -// { -// var services = new ServiceCollection(); -// OltServiceCollectionAutoMapperExtensions.AddOltInjectionAutoMapper(services, new List() { this.GetType().Assembly }, cfg => cfg.DisableConstructorMapping(), ServiceLifetime.Scoped); - -// using (var provider = services.BuildServiceProvider()) -// { -// Assert.NotNull(provider.GetService()); -// } -// } -// } -//} \ No newline at end of file From 49adbfb9d5978453e9df1f789644d74c77109399 Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Fri, 26 Dec 2025 07:29:05 -0500 Subject: [PATCH 5/7] cleanup --- .../OLT.DataAdapters.AutoMapper.Tests.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj index 7c6b225..5f62bba 100644 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj +++ b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj @@ -8,7 +8,6 @@ - From 6d9fed8247ed03b65aed38cffc4c0ab971a95df8 Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Fri, 23 Jan 2026 09:00:47 -0500 Subject: [PATCH 6/7] added env variable --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b49c12f..2c8a7cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ on: env: SOURCE_DIRECTORY: ${{ github.workspace }} SOLUTION_FILE: "OLT.DataAdapters.AutoMapper.sln" + AUTOMAPPER_LICENSE_KEY: ${{ secrets.AUTOMAPPER_LICENSE_KEY }} jobs: build: From 44349e04620f26de6357c01ed09ea1fe37c23fba Mon Sep 17 00:00:00 2001 From: Chris Straw Date: Wed, 25 Feb 2026 11:18:30 -0500 Subject: [PATCH 7/7] Minor updates and new slnx solution --- .config/dotnet-tools.json | 2 +- .github/dependabot.yml | 9 ++- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- OLT.DataAdapters.AutoMapper.sln | 62 ------------------- OLT.DataAdapters.AutoMapper.slnx | 19 ++++++ .../OLT.DataAdapters.AutoMapper.csproj | 2 +- .../OLT.DataAdapters.AutoMapper.Tests.csproj | 14 ++--- 8 files changed, 36 insertions(+), 76 deletions(-) delete mode 100644 OLT.DataAdapters.AutoMapper.sln create mode 100644 OLT.DataAdapters.AutoMapper.slnx diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 74e9667..1699ee0 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-sonarscanner": { - "version": "9.0.2", + "version": "11.1.0", "commands": [ "dotnet-sonarscanner" ] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3b887de..b112434 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,9 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/" # Location of package manifests + directory: "/" schedule: - interval: "weekly" + interval: "monthly" labels: - "dependencies" - "github-actions" @@ -11,10 +11,13 @@ updates: - package-ecosystem: "nuget" directory: "/" schedule: - interval: "weekly" + interval: "monthly" ignore: - dependency-name: "AutoMapper" - dependency-name: "AutoMapper.Collection" + - dependency-name: "*" + update-types: + - "version-update:semver-patch" labels: - "dependencies" - "nuget" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c8a7cb..cf0d624 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ on: env: SOURCE_DIRECTORY: ${{ github.workspace }} - SOLUTION_FILE: "OLT.DataAdapters.AutoMapper.sln" + SOLUTION_FILE: "OLT.DataAdapters.AutoMapper.slnx" AUTOMAPPER_LICENSE_KEY: ${{ secrets.AUTOMAPPER_LICENSE_KEY }} jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea07faf..de0da1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: env: PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output SOURCE_DIRECTORY: ${{ github.workspace }} - SOLUTION_FILE: "OLT.DataAdapters.AutoMapper.sln" + SOLUTION_FILE: "OLT.DataAdapters.AutoMapper.slnx" NUGET_SOURCE_URL: "https://api.nuget.org/v3/index.json" jobs: diff --git a/OLT.DataAdapters.AutoMapper.sln b/OLT.DataAdapters.AutoMapper.sln deleted file mode 100644 index ef23379..0000000 --- a/OLT.DataAdapters.AutoMapper.sln +++ /dev/null @@ -1,62 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 18 -VisualStudioVersion = 18.0.11205.157 d18.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OLT.DataAdapters.AutoMapper", "src\OLT.DataAdapters.AutoMapper\OLT.DataAdapters.AutoMapper.csproj", "{07F972FB-E132-4FBF-B52F-DC18A2FFB622}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OLT.DataAdapters.AutoMapper.Tests", "tests\OLT.DataAdapters.AutoMapper.Tests\OLT.DataAdapters.AutoMapper.Tests.csproj", "{CADA4C2D-8842-46DB-899F-F67A32459A57}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OLT.Extensions.DependencyInjection.AutoMapper", "src\OLT.Extensions.DependencyInjection.AutoMapper\OLT.Extensions.DependencyInjection.AutoMapper.csproj", "{C956C04F-4523-4F68-961C-8174803AA073}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D6AD39E5-20A1-48BA-A4BC-CC192F55B453}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0D8B221D-7865-4CEC-B2FA-77BF7F012A5E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".workflow", ".workflow", "{4633489B-3578-43A5-BBB6-8B4AE58EA573}" - ProjectSection(SolutionItems) = preProject - .github\workflows\build.yml = .github\workflows\build.yml - .github\dependabot.yml = .github\dependabot.yml - .github\workflows\release.yml = .github\workflows\release.yml - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution", ".solution", "{FF532B3D-4994-4AAE-870F-FDACD6A537C8}" - ProjectSection(SolutionItems) = preProject - .config\dotnet-tools.json = .config\dotnet-tools.json - README.md = README.md - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {07F972FB-E132-4FBF-B52F-DC18A2FFB622}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {07F972FB-E132-4FBF-B52F-DC18A2FFB622}.Debug|Any CPU.Build.0 = Debug|Any CPU - {07F972FB-E132-4FBF-B52F-DC18A2FFB622}.Release|Any CPU.ActiveCfg = Release|Any CPU - {07F972FB-E132-4FBF-B52F-DC18A2FFB622}.Release|Any CPU.Build.0 = Release|Any CPU - {CADA4C2D-8842-46DB-899F-F67A32459A57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CADA4C2D-8842-46DB-899F-F67A32459A57}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CADA4C2D-8842-46DB-899F-F67A32459A57}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CADA4C2D-8842-46DB-899F-F67A32459A57}.Release|Any CPU.Build.0 = Release|Any CPU - {C956C04F-4523-4F68-961C-8174803AA073}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C956C04F-4523-4F68-961C-8174803AA073}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C956C04F-4523-4F68-961C-8174803AA073}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C956C04F-4523-4F68-961C-8174803AA073}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {07F972FB-E132-4FBF-B52F-DC18A2FFB622} = {D6AD39E5-20A1-48BA-A4BC-CC192F55B453} - {CADA4C2D-8842-46DB-899F-F67A32459A57} = {0D8B221D-7865-4CEC-B2FA-77BF7F012A5E} - {C956C04F-4523-4F68-961C-8174803AA073} = {D6AD39E5-20A1-48BA-A4BC-CC192F55B453} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E223F339-A690-4201-BE01-4B838E79657B} - EndGlobalSection -EndGlobal diff --git a/OLT.DataAdapters.AutoMapper.slnx b/OLT.DataAdapters.AutoMapper.slnx new file mode 100644 index 0000000..f9e9a69 --- /dev/null +++ b/OLT.DataAdapters.AutoMapper.slnx @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj b/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj index 6dc7d72..421f719 100644 --- a/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj +++ b/src/OLT.DataAdapters.AutoMapper/OLT.DataAdapters.AutoMapper.csproj @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj index 5f62bba..13da038 100644 --- a/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj +++ b/tests/OLT.DataAdapters.AutoMapper.Tests/OLT.DataAdapters.AutoMapper.Tests.csproj @@ -8,18 +8,18 @@ - - - - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all