Ejemplo n.º 1
0
        /// <summary>
        /// Clears any current ClaimsActions and maps all values from the json user data as claims, excluding the specified types.
        /// </summary>
        /// <param name="collection">The <see cref="ClaimActionCollection"/>.</param>
        /// <param name="exclusions">The types to exclude.</param>
        public static void MapAllExcept(this ClaimActionCollection collection, params string[] exclusions)
        {
            if (collection == null)
            {
                throw new ArgumentNullException(nameof(collection));
            }

            collection.MapAll();
            collection.DeleteClaims(exclusions);
        }
 /// <summary>
 /// Clears any current ClaimsActions and maps all values from the json user data as claims, excluding the specified types.
 /// </summary>
 /// <param name="collection"></param>
 /// <param name="exclusions"></param>
 public static void MapAllExcept(this ClaimActionCollection collection, params string[] exclusions)
 {
     collection.MapAll();
     collection.DeleteClaims(exclusions);
 }