This method iterates through the collection of ClaimsIdentities and determines which identity must be used as the primary one.
Namespace: Microsoft.IdentityModel.Claims
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)

Usage

Visual Basic
Dim identities As ClaimsIdentityCollection
Dim returnValue As IClaimsIdentity

returnValue = ClaimsPrincipal.SelectPrimaryIdentity(identities)

Syntax

Visual Basic
Public Shared Function SelectPrimaryIdentity ( _
		identities As ClaimsIdentityCollection _
) As IClaimsIdentity
C#
public static IClaimsIdentity SelectPrimaryIdentity (
		ClaimsIdentityCollection identities
)
C++
public:
static IClaimsIdentity^ SelectPrimaryIdentity (
		ClaimsIdentityCollection^ identities
)
J#
public static IClaimsIdentity SelectPrimaryIdentity (
		ClaimsIdentityCollection identities
)
JScript
public static function SelectPrimaryIdentity (
		identities : ClaimsIdentityCollection
) : IClaimsIdentity

Parameters

identities

Exceptions

Exception type Condition

Remarks

If the identities collection contains a WindowsClaimsIdentity, it is the most preferred. If the identities collection contains an RsaClaimsIdentity, it is the least preferred.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

See Also