Edit

Share via


ProxyGenerator.GetClientProxyScript Method

Definition

Retrieves the proxy generation code for the specified type.

Overloads

GetClientProxyScript(Type, String, Boolean)

Retrieves the proxy generation code for the specified type.

GetClientProxyScript(Type, String, Boolean, ServiceEndpoint)

Retrieves the proxy generation code for the specified type using the path and service end point.

GetClientProxyScript(Type, String, Boolean)

Retrieves the proxy generation code for the specified type.

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

Parameters

type
Type

The type of the object to obtain the script for.

path
String

The location of the endpoint.

debug
Boolean

true to include XML code comments; otherwise, false.

Returns

The proxy generation code.

Exceptions

The type or path parameter is null.

The specified type is not supported for proxy generation.

Remarks

The GetClientProxyScript method returns the proxy-generation ECMAScript (JavaScript) for a Web service, for a Windows Communication Foundation (WCF) service, or for static page methods that have the WebMethodAttribute attribute applied. The type parameter contains the type of the Web service class, WCF service class, or ASP.NET page class. When the type is a WCF service class or interface, the class or interface must have the ServiceContractAttribute attribute applied. If the debug parameter is true, the resulting code contains XML code comments that can be used for IntelliSense support in Visual Studio or other development environments. As a result, the size of the generated script is larger.

See also

Applies to

GetClientProxyScript(Type, String, Boolean, ServiceEndpoint)

Retrieves the proxy generation code for the specified type using the path and service end point.

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

Parameters

type
Type

The type of the object to obtain the script for.

path
String

The location of the endpoint.

debug
Boolean

true to include XML code comments; otherwise, false.

serviceEndpoint
ServiceEndpoint

The service endpoint.

Returns

The proxy generation code.

Exceptions

The type or path parameter is null.

The specified type is not supported for proxy generation.

Remarks

The GetClientProxyScript method returns the proxy-generation ECMAScript (JavaScript) for a Web service, for a Windows Communication Foundation (WCF) service, or for static page methods that have the WebMethodAttribute attribute applied. The type parameter contains the type of the Web service class, WCF service class, or ASP.NET page class. When the type is a WCF service class or interface, the class or interface must have the ServiceContractAttribute attribute applied. If the debug parameter is true, the resulting code contains XML code comments that can be used for IntelliSense support in Visual Studio or other development environments. As a result, the size of the generated script is larger.

See also

Applies to