Resource constructor

Office 2013 and later

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

Namespace:  WebSvcResource
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

public Resource()

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

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);
Show: