共用方式為


PeerResolver.Initialize 方法

定義

使用新提供的端點位址和設定,初始化目前的對等解析程式執行個體。

public:
 virtual void Initialize(System::ServiceModel::EndpointAddress ^ address, System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::Description::ClientCredentials ^ credentials, System::ServiceModel::PeerResolvers::PeerReferralPolicy referralPolicy);
public virtual void Initialize (System.ServiceModel.EndpointAddress address, System.ServiceModel.Channels.Binding binding, System.ServiceModel.Description.ClientCredentials credentials, System.ServiceModel.PeerResolvers.PeerReferralPolicy referralPolicy);
abstract member Initialize : System.ServiceModel.EndpointAddress * System.ServiceModel.Channels.Binding * System.ServiceModel.Description.ClientCredentials * System.ServiceModel.PeerResolvers.PeerReferralPolicy -> unit
override this.Initialize : System.ServiceModel.EndpointAddress * System.ServiceModel.Channels.Binding * System.ServiceModel.Description.ClientCredentials * System.ServiceModel.PeerResolvers.PeerReferralPolicy -> unit
Public Overridable Sub Initialize (address As EndpointAddress, binding As Binding, credentials As ClientCredentials, referralPolicy As PeerReferralPolicy)

參數

address
EndpointAddress

EndpointAddress,其中包含這個對等解析程式執行個體的新端點位址。

binding
Binding

Binding,其中指定這個對等解析程式的新網路繫結。

credentials
ClientCredentials

ClientCredentials,其中指定這個對等解析程式的新用戶端認證。

referralPolicy
PeerReferralPolicy

PeerReferralPolicy,其中指定這個對等解析程式的新轉介原則。

備註

這個方法只是初始化現有的對等解析程式執行個體,並不會建立新的執行個體。 若要建立新的對等解析程式,請在對應的繫結項目 (例如,PnrpPeerResolverBindingElement) 上呼叫 CreatePeerResolver 方法。

適用於