Update the logic for ProxyAndRecord (#747)

* .

* set

* .

* .

* .

* .

* prio

* appsettings

* TinyMapperUtils

* set

* p

* nullable

* .

* ,

* fs

* .

* .

* --PreferProxyMapping
This commit is contained in:
Stef Heyenrath
2022-04-21 17:58:44 +02:00
committed by GitHub
parent 9d54994747
commit 2e5bfc41d5
30 changed files with 1900 additions and 1531 deletions

View File

@@ -0,0 +1,30 @@
using Nelibur.ObjectMapper;
using WireMock.Admin.Settings;
using WireMock.Settings;
namespace WireMock.Util
{
internal sealed class TinyMapperUtils
{
public static TinyMapperUtils Instance { get; } = new TinyMapperUtils();
private TinyMapperUtils()
{
TinyMapper.Bind<ProxyAndRecordSettings, ProxyAndRecordSettingsModel>();
TinyMapper.Bind<WebProxySettings, WebProxySettingsModel>();
TinyMapper.Bind<ProxyAndRecordSettingsModel, ProxyAndRecordSettings>();
TinyMapper.Bind<WebProxySettingsModel, WebProxySettings>();
}
public ProxyAndRecordSettingsModel Map(ProxyAndRecordSettings instance)
{
return instance == null ? null : TinyMapper.Map<ProxyAndRecordSettingsModel>(instance);
}
public ProxyAndRecordSettings Map(ProxyAndRecordSettingsModel model)
{
return model == null ? null : TinyMapper.Map<ProxyAndRecordSettings>(model);
}
}
}