ClaimsPrincipal ClaimsPrincipal ClaimsPrincipal ClaimsPrincipal Constructors

Definition

Overloads

ClaimsPrincipal() ClaimsPrincipal() ClaimsPrincipal()

Initializes a new instance of the ClaimsPrincipal class.

ClaimsPrincipal(IEnumerable<ClaimsIdentity>) ClaimsPrincipal(IEnumerable<ClaimsIdentity>) ClaimsPrincipal(IEnumerable<ClaimsIdentity>) ClaimsPrincipal(IEnumerable<ClaimsIdentity>)

Initializes a new instance of the ClaimsPrincipal class using the specified claims identities.

ClaimsPrincipal(BinaryReader) ClaimsPrincipal(BinaryReader) ClaimsPrincipal(BinaryReader) ClaimsPrincipal(BinaryReader)

Initializes an instance of ClaimsPrincipal with the specified BinaryReader.

ClaimsPrincipal(IIdentity) ClaimsPrincipal(IIdentity) ClaimsPrincipal(IIdentity) ClaimsPrincipal(IIdentity)

Initializes a new instance of the ClaimsPrincipal class from the specified identity.

ClaimsPrincipal(IPrincipal) ClaimsPrincipal(IPrincipal) ClaimsPrincipal(IPrincipal) ClaimsPrincipal(IPrincipal)

Initializes a new instance of the ClaimsPrincipal class from the specified principal.

ClaimsPrincipal(SerializationInfo, StreamingContext) ClaimsPrincipal(SerializationInfo, StreamingContext) ClaimsPrincipal(SerializationInfo, StreamingContext) ClaimsPrincipal(SerializationInfo, StreamingContext)

Initializes a new instance of the ClaimsPrincipal class from a serialized stream created by using ISerializable.

ClaimsPrincipal() ClaimsPrincipal() ClaimsPrincipal()

Initializes a new instance of the ClaimsPrincipal class.

public:
 ClaimsPrincipal();
public ClaimsPrincipal ();
Public Sub New ()

Remarks

No identities are associated with the new instance. (The Identities collection is empty).

ClaimsPrincipal(IEnumerable<ClaimsIdentity>) ClaimsPrincipal(IEnumerable<ClaimsIdentity>) ClaimsPrincipal(IEnumerable<ClaimsIdentity>) ClaimsPrincipal(IEnumerable<ClaimsIdentity>)

Initializes a new instance of the ClaimsPrincipal class using the specified claims identities.

public:
 ClaimsPrincipal(System::Collections::Generic::IEnumerable<System::Security::Claims::ClaimsIdentity ^> ^ identities);
public ClaimsPrincipal (System.Collections.Generic.IEnumerable<System.Security.Claims.ClaimsIdentity> identities);
new System.Security.Claims.ClaimsPrincipal : seq<System.Security.Claims.ClaimsIdentity> -> System.Security.Claims.ClaimsPrincipal
Public Sub New (identities As IEnumerable(Of ClaimsIdentity))

Parameters

identities
IEnumerable<ClaimsIdentity>

The identities from which to initialize the new claims principal.

Exceptions

Remarks

The Identities collection is initialized with the specified identities.

ClaimsPrincipal(BinaryReader) ClaimsPrincipal(BinaryReader) ClaimsPrincipal(BinaryReader) ClaimsPrincipal(BinaryReader)

Initializes an instance of ClaimsPrincipal with the specified BinaryReader.

public:
 ClaimsPrincipal(System::IO::BinaryReader ^ reader);
public ClaimsPrincipal (System.IO.BinaryReader reader);
new System.Security.Claims.ClaimsPrincipal : System.IO.BinaryReader -> System.Security.Claims.ClaimsPrincipal
Public Sub New (reader As BinaryReader)

Parameters

Exceptions

Remarks

Normally, the BinaryReader is constructed using the bytes from WriteTo and initialized in the same way as the BinaryWriter.

ClaimsPrincipal(IIdentity) ClaimsPrincipal(IIdentity) ClaimsPrincipal(IIdentity) ClaimsPrincipal(IIdentity)

Initializes a new instance of the ClaimsPrincipal class from the specified identity.

public:
 ClaimsPrincipal(System::Security::Principal::IIdentity ^ identity);
public ClaimsPrincipal (System.Security.Principal.IIdentity identity);
new System.Security.Claims.ClaimsPrincipal : System.Security.Principal.IIdentity -> System.Security.Claims.ClaimsPrincipal
Public Sub New (identity As IIdentity)

Parameters

identity
IIdentity IIdentity IIdentity IIdentity

The identity from which to initialize the new claims principal.

Exceptions

Remarks

If the specified identity is assignable from ClaimsIdentity, it is used to initialize the Identities collection. Otherwise, a ClaimsIdentity is created using the specified identity and is used to initialize the collection.

ClaimsPrincipal(IPrincipal) ClaimsPrincipal(IPrincipal) ClaimsPrincipal(IPrincipal) ClaimsPrincipal(IPrincipal)

Initializes a new instance of the ClaimsPrincipal class from the specified principal.

public:
 ClaimsPrincipal(System::Security::Principal::IPrincipal ^ principal);
public ClaimsPrincipal (System.Security.Principal.IPrincipal principal);
new System.Security.Claims.ClaimsPrincipal : System.Security.Principal.IPrincipal -> System.Security.Claims.ClaimsPrincipal
Public Sub New (principal As IPrincipal)

Parameters

principal
IPrincipal IPrincipal IPrincipal IPrincipal

The principal from which to initialize the new claims principal.

Exceptions

Remarks

If the specified principal is assignable from ClaimsPrincipal, all of its identities are added to the Identities collection. If the specified principal is not assignable from ClaimsPrincipal, a new ClaimsIdentity is created from the IIdentity in its IPrincipal.Identity property and added to the Identities collection.

ClaimsPrincipal(SerializationInfo, StreamingContext) ClaimsPrincipal(SerializationInfo, StreamingContext) ClaimsPrincipal(SerializationInfo, StreamingContext) ClaimsPrincipal(SerializationInfo, StreamingContext)

Initializes a new instance of the ClaimsPrincipal class from a serialized stream created by using ISerializable.

protected:
 ClaimsPrincipal(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Security.SecurityCritical]
protected ClaimsPrincipal (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Security.Claims.ClaimsPrincipal : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.Claims.ClaimsPrincipal
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

context
StreamingContext StreamingContext StreamingContext StreamingContext

The context for serialization.

Exceptions

Security

SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Applies to