我需要为WCF消费者提供某种标识符,以了解他们正在访问哪种服务。
private Server GetCurrentServer()
{
OperationContext OperationContext = OperationContext.Current;
Server server = null;
if (OperationContext != null)
{
server = Cloud.Servers.FirstOrDefault(S => S.Config.ServerSubDomain == OperationContext.Host.Description.Name);
return server;
}
}
我正在考虑通过更改此处设置的默认值将标识符放入“ Host.Description.Name”中。这会对WCF操作产生影响吗?