1
我使用ChannelFactory与我的其他业务层进行通信的方式。ChannelFactory <T>(“*”)是什么意思?
什么的ChannelFactory( “*”)的意思是,我不能让这个MSDN上的任何信息?
我使用ChannelFactory与我的其他业务层进行通信的方式。ChannelFactory <T>(“*”)是什么意思?
什么的ChannelFactory( “*”)的意思是,我不能让这个MSDN上的任何信息?
*
通配符指示使用第一个限定端点,因为对同一合同您可以有多个端点。我在MSDN上找不到任何这方面的参考,但可以看到它在内部使用。反编译使用Dotpeek,意见我的
protected void InitializeEndpoint(string configurationName, EndpointAddress address)
{
this.serviceEndpoint = this.CreateDescription();
ServiceEndpoint serviceEndpoint = (ServiceEndpoint) null;
if (configurationName != null)
// ConfigLoader checks whether the passed configurationName is a wildcard match
// and uses it when looking up channels from configuration to determine
// which channel to use
serviceEndpoint = ConfigLoader.LookupEndpoint(configurationName, address, this.serviceEndpoint.Contract);
if (serviceEndpoint != null)
{
this.serviceEndpoint = serviceEndpoint;
}
else
{
if (address != (EndpointAddress) null)
this.Endpoint.Address = address;
this.ApplyConfiguration(configurationName);
}
this.configurationName = configurationName;
this.EnsureSecurityCredentialsManager(this.serviceEndpoint);
}