次の方法で共有


Events Constructor

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

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

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New Events()
public Events()

Remarks

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

Examples

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

private static EventsWebSvc.Events events = new EventsWebSvc.Events();

In the following statement, SvcEvents is an arbitrary namespace for the WCF-based Events 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 SvcEvents.EventsClient eventsClient = new SvcEvents.EventsClient(endpt);

See Also

Reference

Events Class

Events Members

Events Web Service