  | SecurityExtensionsGetFirstClaimValue Method (IClaimsPrincipal, String) | 
 
            Gets the first value of a matching claim type from an 
IClaimsPrincipal searching in the order specified in the parameters.
            
 
    Namespace: 
   SanteDB.Core.Security
    Assembly:
   SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntaxpublic static string GetFirstClaimValue(
	this IClaimsPrincipal principal,
	params string[] claimTypes
)
<ExtensionAttribute>
Public Shared Function GetFirstClaimValue ( 
	principal As IClaimsPrincipal,
	ParamArray claimTypes As String()
) As String
public:
[ExtensionAttribute]
static String^ GetFirstClaimValue(
	IClaimsPrincipal^ principal, 
	... array<String^>^ claimTypes
)
[<ExtensionAttribute>]
static member GetFirstClaimValue : 
        principal : IClaimsPrincipal * 
        claimTypes : string[] -> string 
Parameters
- principal
 - Type: SanteDB.Core.Security.ClaimsIClaimsPrincipal
The claims principal to search. - claimTypes
 - Type: SystemString
The ordered set of claim types to search. 
Return Value
Type: 
StringA value for the first instance of the first claim type found or null.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
IClaimsPrincipal. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).
See Also