共用方式為


ProxyGenerator.GetClientProxyScript 方法

定義

擷取指定型別的 Proxy 產生程式碼。

多載

GetClientProxyScript(Type, String, Boolean)

擷取指定型別的 Proxy 產生程式碼。

GetClientProxyScript(Type, String, Boolean, ServiceEndpoint)

使用路徑和服務端點,擷取指定之型別的 Proxy 產生程式碼。

GetClientProxyScript(Type, String, Boolean)

擷取指定型別的 Proxy 產生程式碼。

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

如果要包含 XML 程式碼註解,則為 true,否則為 false

傳回

Proxy 產生程式碼。

例外狀況

typepath 參數為 null

Proxy 產生不支援指定型別。

備註

方法會 GetClientProxyScript 傳回 Web 服務的 Proxy 產生 ECMAScript (JavaScript) 、Windows Communication Foundation (WCF) 服務,或套 WebMethodAttribute 用 屬性的靜態頁面方法。 參數 type 包含 Web 服務類別、WCF 服務類別或 ASP.NET 網頁類別的類型。 當類型是 WCF 服務類別或介面時,類別或介面必須套 ServiceContractAttribute 用 屬性。 debug如果 參數是 true ,產生的程式碼會包含 XML 程式碼批註,可用於 Visual Studio 或其他開發環境中的 IntelliSense 支援。 因此,產生的腳本大小較大。

另請參閱

適用於

GetClientProxyScript(Type, String, Boolean, ServiceEndpoint)

使用路徑和服務端點,擷取指定之型別的 Proxy 產生程式碼。

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

如果要包含 XML 程式碼註解,則為 true,否則為 false

serviceEndpoint
ServiceEndpoint

服務端點。

傳回

Proxy 產生程式碼。

例外狀況

typepath 參數為 null

Proxy 產生不支援指定型別。

備註

方法會 GetClientProxyScript 傳回 Web 服務的 Proxy 產生 ECMAScript (JavaScript) 、Windows Communication Foundation (WCF) 服務,或套 WebMethodAttribute 用 屬性的靜態頁面方法。 參數 type 包含 Web 服務類別、WCF 服務類別或 ASP.NET 網頁類別的類型。 當類型是 WCF 服務類別或介面時,類別或介面必須套 ServiceContractAttribute 用 屬性。 debug如果 參數是 true ,產生的程式碼會包含 XML 程式碼批註,可用於 Visual Studio 或其他開發環境中的 IntelliSense 支援。 因此,產生的腳本大小較大。

另請參閱

適用於