次の方法で共有


Resource Constructor

Creates an Resource object from the ASMX-based Resource web service.

Namespace:  [Resource Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/Resource.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/Resource.asmx?wsdl

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New Resource()
public Resource()

Remarks

To create an object that is equivalent to Resource by using the Windows Communication Foundation (WCF) API, use one of the ResourceClient constructors.

Examples

In the following statement, ResourceWebSvc is an arbitrary namespace for the ASMX-based Resource web service.

private static ResourceWebSvc.Resource resource = new ResourceWebSvc.Resource();

In the following statement, SvcResource is an arbitrary namespace for the WCF-based Resource service. The endpt parameter is a String value that specifies the name of the client endpoint address in the app.config file (or in the web.config file for web applications).

private static SvcResource.ResourceClient resourceClient = new SvcResource.ResourceClient(endpt);

See Also

Reference

Resource Class

Resource Members

Resource Web Service