Claim.CreateMailAddressClaim(MailAddress) Method

Definition

Creates a Claim object that represents the specified email address.

public:
 static System::IdentityModel::Claims::Claim ^ CreateMailAddressClaim(System::Net::Mail::MailAddress ^ mailAddress);
public static System.IdentityModel.Claims.Claim CreateMailAddressClaim (System.Net.Mail.MailAddress mailAddress);
static member CreateMailAddressClaim : System.Net.Mail.MailAddress -> System.IdentityModel.Claims.Claim
Public Shared Function CreateMailAddressClaim (mailAddress As MailAddress) As Claim

Parameters

mailAddress
MailAddress

A MailAddress that specifies the email address this claim represents. This parameter must not be null. If this parameter is null, this method throws an ArgumentNullException exception.

Returns

The Claim object this method creates.

Exceptions

The mailAddress parameter is null.

Remarks

The Claim object this method creates has the property values shown in the following table.

Property Value
ClaimType Email
Resource The value of the mailAddress parameter.
Right PossessProperty.

Applies to