Remove interface for all Settings (#736)

This commit is contained in:
Stef Heyenrath
2022-03-10 20:58:18 +01:00
committed by GitHub
parent 3087ce55b1
commit bb3147eb8d
34 changed files with 238 additions and 511 deletions

View File

@@ -209,7 +209,7 @@ namespace WireMock.Serialization
return mappingModel;
}
private static WebProxyModel MapWebProxy(IWebProxySettings settings)
private static WebProxyModel MapWebProxy(WebProxySettings settings)
{
return settings != null ? new WebProxyModel
{

View File

@@ -8,10 +8,10 @@ namespace WireMock.Serialization
{
internal class MappingToFileSaver
{
private readonly IWireMockServerSettings _settings;
private readonly WireMockServerSettings _settings;
private readonly MappingConverter _mappingConverter;
public MappingToFileSaver(IWireMockServerSettings settings, MappingConverter mappingConverter)
public MappingToFileSaver(WireMockServerSettings settings, MappingConverter mappingConverter)
{
Guard.NotNull(settings, nameof(settings));

View File

@@ -15,9 +15,9 @@ namespace WireMock.Serialization
{
internal class MatcherMapper
{
private readonly IWireMockServerSettings _settings;
private readonly WireMockServerSettings _settings;
public MatcherMapper(IWireMockServerSettings settings)
public MatcherMapper(WireMockServerSettings settings)
{
_settings = settings ?? throw new ArgumentNullException(nameof(settings));
}
@@ -54,7 +54,7 @@ namespace WireMock.Serialization
return PluginLoader.Load<ICSharpCodeMatcher>(matchBehaviour, stringPatterns);
}
throw new NotSupportedException("It's not allowed to use the 'CSharpCodeMatcher' because IWireMockServerSettings.AllowCSharpCodeMatcher is not set to 'true'.");
throw new NotSupportedException("It's not allowed to use the 'CSharpCodeMatcher' because WireMockServerSettings.AllowCSharpCodeMatcher is not set to 'true'.");
case nameof(LinqMatcher):
return new LinqMatcher(matchBehaviour, throwExceptionWhenMatcherFails, stringPatterns);