ChannelFactory.ApplyConfiguration(String) 方法

定義

使用指定組態檔所提供的行為以及通道處理站之服務端點中的行為,初始化通道處理站。

protected:
 virtual void ApplyConfiguration(System::String ^ configurationName);
protected virtual void ApplyConfiguration (string configurationName);
abstract member ApplyConfiguration : string -> unit
override this.ApplyConfiguration : string -> unit
Protected Overridable Sub ApplyConfiguration (configurationName As String)

參數

configurationName
String

組態檔的名稱。

例外狀況

通道處理站的服務端點為 null

備註

如果 configurationNamenull,則只會載入服務端點中的指定行為。 如果使用萬用字元 "*",便會使用用戶端組態檔中的任何端點組態,不過只在確實有一個端點時才這樣做。 否則,會擲回例外狀況。 任何 configurationName 的其他值 (包括空字串 "") 都會符合具有相同名稱的端點組態。 如需用戶端設定的討論,請參閱 WCF 用戶端 組態主題。

適用於