Extend TypeLoader (#1069)

* Extend PluginLoader

* rename
This commit is contained in:
Stef Heyenrath
2024-02-23 08:51:38 +01:00
committed by GitHub
parent 2364866f97
commit ce833c1f29
6 changed files with 156 additions and 95 deletions

View File

@@ -8,7 +8,6 @@ using WireMock.Admin.Mappings;
using WireMock.Extensions;
using WireMock.Matchers;
using WireMock.Models;
using WireMock.Plugin;
using WireMock.Settings;
using WireMock.Util;
@@ -53,7 +52,7 @@ internal class MatcherMapper
case "CSharpCodeMatcher":
if (_settings.AllowCSharpCodeMatcher == true)
{
return PluginLoader.Load<ICSharpCodeMatcher>(matchBehaviour, matchOperator, stringPatterns);
return TypeLoader.Load<ICSharpCodeMatcher>(matchBehaviour, matchOperator, stringPatterns);
}
throw new NotSupportedException("It's not allowed to use the 'CSharpCodeMatcher' because WireMockServerSettings.AllowCSharpCodeMatcher is not set to 'true'.");