Condividi tramite


Web.RegisterPushNotificationSubscriber method

Return a GUID, and registers the push notification subscriber for the site. If the registration already exists, the service token is updated with the new value.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Function RegisterPushNotificationSubscriber ( _
    deviceAppInstanceId As Guid, _
    serviceToken As String _
) As PushNotificationSubscriber
'Usage
Dim instance As Web
Dim deviceAppInstanceId As Guid
Dim serviceToken As String
Dim returnValue As PushNotificationSubscriber

returnValue = instance.RegisterPushNotificationSubscriber(deviceAppInstanceId, _
    serviceToken)
public PushNotificationSubscriber RegisterPushNotificationSubscriber(
    Guid deviceAppInstanceId,
    string serviceToken
)

Parameters

  • deviceAppInstanceId
    Type: System.Guid

    Device app instance identifier.

  • serviceToken
    Type: System.String

    Token provided by the notification service to the device to receive notifications.

Return value

Type: Microsoft.SharePoint.Client.PushNotificationSubscriber
Registered push notification subscriber.

Remarks

The serviceToken parameter must not be a null reference (Nothing in Visual Basic). It must not be empty.

See also

Reference

Web class

Web members

Microsoft.SharePoint.Client namespace