mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-22 08:18:26 +02:00
TypeLoader: implement Try methods (#1358)
* TypeLoader: implement Try methods * fix
This commit is contained in:
@@ -366,10 +366,8 @@ public partial class WireMockServer
|
||||
}
|
||||
else if (responseModel.BodyAsJson != null)
|
||||
{
|
||||
if (responseModel.ProtoBufMessageType != null)
|
||||
if (responseModel.ProtoBufMessageType != null && TypeLoader.TryLoadStaticInstance<IProtoBufUtils>(out var protoBufUtils))
|
||||
{
|
||||
var protoBufUtils = TypeLoader.LoadStaticInstance<IProtoBufUtils>();
|
||||
|
||||
if (responseModel.ProtoDefinition != null)
|
||||
{
|
||||
responseBuilder = protoBufUtils.UpdateResponseBuilder(responseBuilder, responseModel.ProtoBufMessageType, responseModel.BodyAsJson, responseModel.ProtoDefinition);
|
||||
|
||||
Reference in New Issue
Block a user