Files
BeWoPlaner/BeWo/Multitenancy/MultitenancyEndpointBehavior.cs
2016-06-27 01:45:38 +02:00

28 lines
881 B
C#

using System;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace BeWo.Multitenancy
{
public class MultitenancyEndpointBehavior : IEndpointBehavior
{
public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
{
}
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
{
clientRuntime.MessageInspectors.Add(new MultitenancyInterceptor());
}
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
{
throw new NotImplementedException("This is a client behavior only");
}
public void Validate(ServiceEndpoint endpoint)
{
}
}
}