Notifications 建構函式
從以 ASMX 型Notifications web 服務建立Notifications物件。
命名空間: WebSvcNotifications
組件: ProjectServerServices (在 ProjectServerServices.dll 中)
語法
'宣告
Public Sub New
'用途
Dim instance As New Notifications()
public Notifications()
備註
若要建立使用 Windows Communication Foundation (WCF) API,即等於Notifications物件,請使用其中一個NotificationsClient建構函式。
範例
在下列陳述式, NotificationsWebSvc是以 ASMX 型Notifications web 服務的任意命名空間。
private static NotificationsWebSvc.Notifications notifications = new NotificationsWebSvc.Notifications();
在下列陳述式, SvcNotifications是 wcf Notifications服務任意命名空間。endpt參數是String值,指定用戶端端點位址的名稱,在 app.config 檔案 (或 web 應用程式的 web.config 檔案中)。
private static SvcNotifications.NotificationsClient notificationsClient = new SvcNotifications.NotificationsClient(endpt);