Partager via


Calendar Constructor

Creates a Calendar object from the ASMX-based Calendar web service.

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

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New Calendar()
public Calendar()

Remarks

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

Examples

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

private static CalendarWebSvc.Calendar calendar = new CalendarWebSvc.Calendar();

In the following statement, SvcCalendar is an arbitrary namespace for the WCF-based Calendar 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 SvcCalendar.CalendarClient calendarClient = new SvcCalendar.CalendarClient(endpt);

See Also

Reference

Calendar Class

Calendar Members

Calendar Web Service