Compartilhar via


SPClaimExtensionMethods.NameEquals Method

Returns a value that indicates whether two ClaimsIdentity objects represent the same user.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function NameEquals ( _
    thisClaimsIdentity As IClaimsIdentity, _
    claimsIdentity As Object _
) As Boolean
'Usage
Dim thisClaimsIdentity As IClaimsIdentity
Dim claimsIdentity As Object
Dim returnValue As Boolean

returnValue = thisClaimsIdentity.NameEquals(claimsIdentity)
public static bool NameEquals(
    this IClaimsIdentity thisClaimsIdentity,
    Object claimsIdentity
)

Parameters

  • thisClaimsIdentity
    Type: IClaimsIdentity

    The value of the claim.

  • claimsIdentity
    Type: System.Object

    The second claim identity to compare.

Return Value

Type: System.Boolean
true if two ClaimsIdentity objects have matching name properties; otherwise, false. The default is false when the SPClaimExtensionMethods object does not implement IClaimsIdentity.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IClaimsIdentity. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=office.14) or https://msdn.microsoft.com/en-us/library/bb383977(v=office.14).

See Also

Reference

SPClaimExtensionMethods Class

SPClaimExtensionMethods Members

Microsoft.SharePoint.Administration.Claims Namespace