Exemplo n.º 1
0
        /// <summary>
        /// Removes the admin
        /// </summary>
        /// <param name="id">The admin's id</param>
        /// <returns>True if admin was removed successfully, otherwise - false</returns>
        public bool RemoveAdminId(long id)
        {
            if (_adminIds.Contains(id))
            {
                _adminIds.Remove(id);
                AdminListUpdatedAction?.Invoke();
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Ads the new admin
        /// </summary>
        /// <param name="id">The admin's id</param>
        /// <returns>True if admin was added successfully, otherwise - false</returns>
        public bool SetAdminId(long id)
        {
            if (!_adminIds.Contains(id))
            {
                _adminIds.Add(id);
                AdminListUpdatedAction?.Invoke();
                return(true);
            }

            return(false);
        }