47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System.ServiceModel;
|
|
using System.ServiceModel.Channels;
|
|
using System.ServiceModel.Description;
|
|
using System.ServiceModel.Dispatcher;
|
|
using Serilog;
|
|
|
|
namespace CRIF.ACTion.Services.Crif
|
|
{
|
|
public class WcfInspectorBehavior : IWcfInspectorBehavior
|
|
{
|
|
public WcfInspectorBehavior()
|
|
{
|
|
}
|
|
|
|
|
|
public void AfterReceiveReply(ref Message reply, object correlationState)
|
|
{
|
|
Log.Debug("Reply received: {reply}", reply);
|
|
}
|
|
|
|
public object BeforeSendRequest(ref Message request, IClientChannel channel)
|
|
{
|
|
|
|
Log.Debug("Sending request: {request}", request);
|
|
|
|
return null;
|
|
}
|
|
|
|
public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
|
|
{
|
|
}
|
|
|
|
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
|
|
{
|
|
clientRuntime.ClientMessageInspectors.Add(this);
|
|
}
|
|
|
|
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
|
|
{
|
|
}
|
|
|
|
public void Validate(ServiceEndpoint endpoint)
|
|
{
|
|
}
|
|
}
|
|
}
|