36 lines
1008 B
C#
36 lines
1008 B
C#
using BeWo.Data;
|
|
using BeWo.Service.Attributes;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.ServiceModel.Channels;
|
|
using System.ServiceModel;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Web;
|
|
using System.Xml;
|
|
using System.ServiceModel.Dispatcher;
|
|
using BeWo.Service.Core;
|
|
using BeWo.Service.ServiceUtils;
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
|
using DevExpress.CodeParser;
|
|
|
|
namespace BeWo.Service.ServiceBehavior
|
|
{
|
|
public class AdminMultitenancyContextInitializer : ICallContextInitializer
|
|
{
|
|
public void AfterInvoke(object pCorrelationState)
|
|
{
|
|
if (pCorrelationState is MultitenancyOperationContextExt)
|
|
{
|
|
OperationContext.Current.Extensions.Remove((MultitenancyOperationContextExt)pCorrelationState);
|
|
}
|
|
}
|
|
|
|
public object BeforeInvoke(InstanceContext pInstanceContext, IClientChannel pChannel, Message pMessage)
|
|
{
|
|
return ServiceValidator.ValidateTenant(ref pMessage, pChannel);
|
|
}
|
|
}
|
|
}
|