ProxyGenerator.GetClientProxyScript 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定類型的代理產生碼。
多載
| 名稱 | Description |
|---|---|
| GetClientProxyScript(Type, String, Boolean) |
取得指定類型的代理產生碼。 |
| GetClientProxyScript(Type, String, Boolean, ServiceEndpoint) |
利用路徑與服務端點取得指定類型的代理產生碼。 |
GetClientProxyScript(Type, String, Boolean)
取得指定類型的代理產生碼。
public:
static System::String ^ GetClientProxyScript(Type ^ type, System::String ^ path, bool debug);
public static string GetClientProxyScript(Type type, string path, bool debug);
static member GetClientProxyScript : Type * string * bool -> string
Public Shared Function GetClientProxyScript (type As Type, path As String, debug As Boolean) As String
參數
- type
- Type
要取得腳本的物件類型。
- path
- String
端點的位置。
- debug
- Boolean
true包含 XML 程式碼註解;否則,。 false
傳回
代理產生代碼。
例外狀況
type或path參數為 null。
該類型不支援代理產生。
備註
GetClientProxyScript 方法回傳代理產生 ECMAScript(JavaScript),用於網路服務、Windows Communication Foundation(WCF)服務,或是套用 WebMethodAttribute 屬性的靜態頁面方法。
type 參數包含網路服務類別、WCF 服務類別或 ASP.NET 頁面類別的類型。 當型別是 WCF 服務類別或介面時,類別或介面必須套用該 ServiceContractAttribute 屬性。 若 debug 參數為 true,則產生的程式碼包含可用於 IntelliSense 支援的 XML註解,適用於Visual Studio或其他開發環境中的 IntelliSense。 因此,產生的腳本大小會變大。
另請參閱
適用於
GetClientProxyScript(Type, String, Boolean, ServiceEndpoint)
利用路徑與服務端點取得指定類型的代理產生碼。
public:
static System::String ^ GetClientProxyScript(Type ^ type, System::String ^ path, bool debug, System::ServiceModel::Description::ServiceEndpoint ^ serviceEndpoint);
public static string GetClientProxyScript(Type type, string path, bool debug, System.ServiceModel.Description.ServiceEndpoint serviceEndpoint);
static member GetClientProxyScript : Type * string * bool * System.ServiceModel.Description.ServiceEndpoint -> string
Public Shared Function GetClientProxyScript (type As Type, path As String, debug As Boolean, serviceEndpoint As ServiceEndpoint) As String
參數
- type
- Type
要取得腳本的物件類型。
- path
- String
端點的位置。
- debug
- Boolean
true包含 XML 程式碼註解;否則,。 false
- serviceEndpoint
- ServiceEndpoint
服務端點。
傳回
代理產生代碼。
例外狀況
type或path參數為 null。
該類型不支援代理產生。
備註
GetClientProxyScript 方法回傳代理產生 ECMAScript(JavaScript),用於網路服務、Windows Communication Foundation(WCF)服務,或是套用 WebMethodAttribute 屬性的靜態頁面方法。
type 參數包含網路服務類別、WCF 服務類別或 ASP.NET 頁面類別的類型。 當型別是 WCF 服務類別或介面時,類別或介面必須套用該 ServiceContractAttribute 屬性。 若 debug 參數為 true,則產生的程式碼包含可用於 IntelliSense 支援的 XML註解,適用於Visual Studio或其他開發環境中的 IntelliSense。 因此,產生的腳本大小會變大。