Example #1
0
        /// <summary>
        /// Checks whether a notification channel with the given ID is blocked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnClickIsChannelBlocked(object sender, System.EventArgs e)
        {
            string Tag = "IsChannelBlocked";

            try
            {
                bool isChannelBlocked = NotificationController.ChannelBlocked(this, CoreConstants.NotificationChannelId + 45);
                if (isChannelBlocked)
                {
                    log.Info(Tag, "The channel is blocked!");
                }
                else
                {
                    log.Info(Tag, "The channel is not blocked!");
                }
            }
            catch (ApiException exception)
            {
                log.Error(Tag, "Error/Exception: " + exception);
            }
        }
 public bool ChannelBlocked(string channelId)
 {
     return(NotificationController.ChannelBlocked(Application.Context, channelId));
 }