Sdl.Web.Mvc/Context/ContextClaims.cs
/// <summary>
/// Get typed values of a claim with a given property name.
/// </summary>
/// <typeparam name="T">The type of the individual claim values; an enumerable of this type will be returned.</typeparam>
/// <param name="propertyName">The property name.</param>
/// <returns>The values of the claim.</returns>
Get typed values of a claim with a given property name.
Get typed values of a claim with a given property name .
public T[] GetClaimValues<T>(string propertyName)
        {
            object claimValue;
            _claims.TryGetValue(GetClaimName(propertyName), out claimValue);
            return (claimValue == null) ? null : (from object item in (IEnumerable) claimValue select CastValue<T>(item)).ToArray();
        }
public T [ ] GetClaimValues < T > ( string propertyName ) { object claimValue ; _claims . TryGetValue ( GetClaimName ( propertyName ) , out claimValue ) ; return ( claimValue == null ) ? null : ( from object item in ( IEnumerable ) claimValue select CastValue < T > ( item ) ) . ToArray ( ) ; }
Get typed values of a claim with a given property name.
Get typed values of a claim with a given property name .
The values of the claim.
The values of the claim .
propertyName
string
The property name.
The property name .
typeparam
The type of the individual claim values; an enumerable of this type will be returned.
The type of the individual claim values ; an enumerable of this type will be returned .