/// <summary>
        ///     Deletas all claims of a user
        /// </summary>
        /// <param name="manager"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static IdentityResult Delete <TClaim, TUser>(this UserClaimManager <TClaim, TUser> manager,
                                                            TUser user)
            where TClaim : IdentityClaim
            where TUser : IdentityUser
        {
            if (manager == null)
            {
                throw new ArgumentNullException(IdentityConstants.Manager);
            }

            return(AsyncHelper.RunSync <IdentityResult>(() => manager.DeleteAsync(user)));
        }
        /// <summary>
        ///     Gets claims of a user
        /// </summary>
        /// <param name="manager"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public static List <IdentityClaim> GetUserClaims <TClaim, TUser>(this UserClaimManager <TClaim, TUser> manager,
                                                                         string userId)
            where TClaim : IdentityClaim
            where TUser : IdentityUser
        {
            if (manager == null)
            {
                throw new ArgumentNullException(IdentityConstants.Manager);
            }

            var result = AsyncHelper.RunSync <IdentityUserClaimList>(() => manager.GetUserClaimsListAsync(userId));

            return(result.List);
        }