INotificationHandler.Register Method (ApiServices, HttpRequestContext, NotificationRegistration)

 

This method is called when a client is registering to receive notifications. It is called just before the request is submitted to the Notification Hub and so the implementation of this method can modify the registration before it is submitted.

Namespace:   Microsoft.WindowsAzure.Mobile.Service.Notifications
Assembly:  Microsoft.WindowsAzure.Mobile.Service (in Microsoft.WindowsAzure.Mobile.Service.dll)

Function Register (
	services As ApiServices,
	context As HttpRequestContext,
	registration As NotificationRegistration
) As Task

Parameters

services
Type: Microsoft.WindowsAzure.Mobile.Service.ApiServices

The ApiServices for this service.

context
Type: System.Web.Http.Controllers.HttpRequestContext

The HttpRequestContext providing information about the request.

registration
Type: Microsoft.WindowsAzure.Mobile.Service.Notifications.NotificationRegistration

The NotificationRegistration describing this registration.

Return Value

Type: System.Threading.Tasks.Task

A Task representing the registration handler operation.

If this method throws an HttpResponseException then the registration process will terminate immediately and the HttpResponseMessage will be used as the HTTP response. Any other unhandled exception will cause the registration process to terminate with an error.

Return to top
Show: