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

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

public UnregisterFromAzurePushNotification ( ) : void
Результат void
        public void UnregisterFromAzurePushNotification()
        {
            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.UnregisterNativeAsync();
                await hub.UnregisterAllAsync(args.ChannelUri.ToString());
            };
        }