AzurePushNotification.Plugin.AzurePushNotificationImplementation.RegisterForAzurePushNotification C# (CSharp) Метод

RegisterForAzurePushNotification() публичный Метод

public RegisterForAzurePushNotification ( ) : void
Результат void
        public void RegisterForAzurePushNotification()
        {
            var channel = HttpNotificationChannel.Find("MyPushChannel");
            if (channel == null)
            {
                channel = new HttpNotificationChannel("MyPushChannel");
                channel.Open();
                channel.BindToShellToast();
            }

            channel.ChannelUriUpdated += async (o, args) =>
            {
                var hub = new NotificationHub(PushNotificationCredentials.AzureNotificationHubName, PushNotificationCredentials.AzureListenConnectionString);

                await hub.RegisterNativeAsync(args.ChannelUri.ToString(), PushNotificationCredentials.Tags);
            };
        }