ProxyGenerator.GetClientProxyScript 方法

定义

检索指定类型的代理生成代码。

重载

名称 说明
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.

返回

代理生成代码。

例外

typepath参数为 null.

代理生成不支持指定类型。

注解

GetClientProxyScript 方法返回 Web 服务的代理生成 ECMAScript(JavaScript),对于 Windows Communication Foundation (WCF) 服务或应用了 WebMethodAttribute 属性的静态页面方法。 type 参数包含 Web 服务类、WCF 服务类或 ASP.NET 页类的类型。 当类型为 WCF 服务类或接口时,类或接口必须 ServiceContractAttribute 应用该属性。 如果 debug 参数为 true,则生成的代码包含可用于 Visual Studio 或其他开发环境中的 IntelliSense 支持的 XML 代码注释。 因此,生成的脚本的大小更大。

另请参阅

适用于

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

服务终结点。

返回

代理生成代码。

例外

typepath参数为 null.

代理生成不支持指定类型。

注解

GetClientProxyScript 方法返回 Web 服务的代理生成 ECMAScript(JavaScript),对于 Windows Communication Foundation (WCF) 服务或应用了 WebMethodAttribute 属性的静态页面方法。 type 参数包含 Web 服务类、WCF 服务类或 ASP.NET 页类的类型。 当类型为 WCF 服务类或接口时,类或接口必须 ServiceContractAttribute 应用该属性。 如果 debug 参数为 true,则生成的代码包含可用于 Visual Studio 或其他开发环境中的 IntelliSense 支持的 XML 代码注释。 因此,生成的脚本的大小更大。

另请参阅

适用于