Ejemplo n.º 1
0
        /// <summary>
        /// Remove a user group from the UniFi controller
        /// </summary>
        /// <param name="item">User group to remove</param>
        /// <returns><c>TRUE</c> if there was an item to remove, otherwise <c>FALSE</c></returns>
        public async Task <bool> Remove(UserGroup item)
        {
            if (!CachedCollection.Contains(item))
            {
                return(false);
            }

            await API.SiteUserGroupsDelete(item.UserGroupId);

            await Refresh();

            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Remove a port forwarding rule from the UniFi controller
        /// </summary>
        /// <param name="item">Port forwarding rule to remove</param>
        /// <returns><c>TRUE</c> if there was an item to remove, otherwise <c>FALSE</c></returns>
        public async Task <bool> Remove(PortForward item)
        {
            if (!CachedCollection.Contains(item))
            {
                return(false);
            }

            await API.SitePortForwardsDelete(item.PortForwardId);

            await Refresh();

            return(true);
        }