From 10aeb625e14a51d06160e0070a24526ba63b00f1 Mon Sep 17 00:00:00 2001 From: Meik Date: Fri, 26 Jun 2026 20:11:06 +0200 Subject: [PATCH] fix: register Web API explorer for sandbox --- F4SDM42WebApi/C4ITF4SDM42WebApi.dll.host.config | 1 + F4SDM42WebApi/DependencyRegistrator.cs | 16 ++++++++++++++++ F4SDM42WebApi/F4SD - M42WebApi.csproj | 7 ++++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 F4SDM42WebApi/DependencyRegistrator.cs diff --git a/F4SDM42WebApi/C4ITF4SDM42WebApi.dll.host.config b/F4SDM42WebApi/C4ITF4SDM42WebApi.dll.host.config index a5c4cd8..eb4eb95 100644 --- a/F4SDM42WebApi/C4ITF4SDM42WebApi.dll.host.config +++ b/F4SDM42WebApi/C4ITF4SDM42WebApi.dll.host.config @@ -7,6 +7,7 @@ + diff --git a/F4SDM42WebApi/DependencyRegistrator.cs b/F4SDM42WebApi/DependencyRegistrator.cs new file mode 100644 index 0000000..b1c8a05 --- /dev/null +++ b/F4SDM42WebApi/DependencyRegistrator.cs @@ -0,0 +1,16 @@ +using System; +using System.Web.Http; +using System.Web.Http.Description; + +using Matrix42.Hosting.Contracts; + +namespace C4IT.F4SD.Properties +{ + public sealed class DependencyRegistrator : DependencyRegistratorBase, IDependencyRegistrator + { + public void Register(IDependencyContainer container, IDependencyResolver resolver) + { + container.RegisterSingletonType((Type _) => new ApiExplorer(new HttpConfiguration())); + } + } +} diff --git a/F4SDM42WebApi/F4SD - M42WebApi.csproj b/F4SDM42WebApi/F4SD - M42WebApi.csproj index 3b8e241..2bcc94e 100644 --- a/F4SDM42WebApi/F4SD - M42WebApi.csproj +++ b/F4SDM42WebApi/F4SD - M42WebApi.csproj @@ -13,7 +13,7 @@ false 6673a25d-33d6-4072-91d9-abed4be1a966 C4ITF4SD*.* - 1.4.0.7 + 1.4.0.8 true @@ -62,6 +62,10 @@ M42Libraries\26.1\System.Net.Http.Formatting.dll false + + M42Libraries\26.1\System.Web.Http.dll + false + M42Libraries\26.1\update4u.SPS.DataLayer.dll false @@ -78,6 +82,7 @@ +