From 9d276cf083b7c1ca307e4f25260eec1b0d2e8fb8 Mon Sep 17 00:00:00 2001 From: "Luke J. Westfall" Date: Mon, 13 May 2024 18:05:59 -0400 Subject: [PATCH] fix: collection initialization simplification --- src/Server/WebApi/Mapping/MappingProfile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Server/WebApi/Mapping/MappingProfile.cs b/src/Server/WebApi/Mapping/MappingProfile.cs index 72c67bb..385265e 100644 --- a/src/Server/WebApi/Mapping/MappingProfile.cs +++ b/src/Server/WebApi/Mapping/MappingProfile.cs @@ -28,7 +28,7 @@ private void ApplyMappingsFromAssembly(Assembly assembly, Type mappedType, strin if (methodInfo is not null) { - methodInfo.Invoke(instance, new object[] { this }); + methodInfo.Invoke(instance, [this]); } else { @@ -40,7 +40,7 @@ private void ApplyMappingsFromAssembly(Assembly assembly, Type mappedType, strin { var interfaceMethodInfo = @interface.GetMethod(mappingMethodName, argumentTypes); - interfaceMethodInfo?.Invoke(instance, new object[] { this }); + interfaceMethodInfo?.Invoke(instance, [this]); } } }