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);
}