问题描述
我正在使用带有“Castle.DynamicProxy.proxygenerator”的城堡使用代码创建WCF服务代理。这是创建频道的现有类:
public class Channelproxygenerator : IChannelproxygenerator
{
private readonly proxygenerator proxygenerator;
public Channelproxygenerator()
{
proxygenerator = new proxygenerator();
}
public TInterface CreateCannelWithRetries<TInterface>(IServiceProxy<TInterface> serviceProxy) where TInterface : class
{
return proxygenerator.CreateInterfaceProxyWithTargetInterface(serviceProxy.Channel);
}
}
我希望能够创建代理,但通过指定其名称来使用特定端点,如 https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee535060(v=office.14) 中所述。原因是我需要为同一个合约支持多个端点配置。
这可以使用 Castle 还是我应该使用其他替代方案?我没有看到任何支持它的重载。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)