Claim Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the Claim class.
Overloads
Claim(BinaryReader) |
Initializes an instance of Claim with the specified BinaryReader. |
Claim(Claim) |
Initializes a new instance of the Claim class. |
Claim(BinaryReader, ClaimsIdentity) |
Initializes a new instance of the Claim class with the specified reader and subject. |
Claim(Claim, ClaimsIdentity) |
Initializes a new instance of the Claim class with the specified security claim and subject. |
Claim(String, String) |
Initializes a new instance of the Claim class with the specified claim type, and value. |
Claim(String, String, String) |
Initializes a new instance of the Claim class with the specified claim type, value, and value type. |
Claim(String, String, String, String) |
Initializes a new instance of the Claim class with the specified claim type, value, value type, and issuer. |
Claim(String, String, String, String, String) |
Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, and original issuer. |
Claim(String, String, String, String, String, ClaimsIdentity) |
Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, original issuer and subject. |
Claim(BinaryReader)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes an instance of Claim with the specified BinaryReader.
public:
Claim(System::IO::BinaryReader ^ reader);
public Claim (System.IO.BinaryReader reader);
new System.Security.Claims.Claim : System.IO.BinaryReader -> System.Security.Claims.Claim
Public Sub New (reader As BinaryReader)
Parameters
- reader
- BinaryReader
A BinaryReader pointing to a Claim.
Exceptions
reader
is null
.
Remarks
Normally, the reader is constructed from the bytes returned from WriteTo.
Applies to
Claim(Claim)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class.
protected:
Claim(System::Security::Claims::Claim ^ other);
protected Claim (System.Security.Claims.Claim other);
new System.Security.Claims.Claim : System.Security.Claims.Claim -> System.Security.Claims.Claim
Protected Sub New (other As Claim)
Parameters
- other
- Claim
The security claim.
Exceptions
other
is null
.
Remarks
Subject is set to null
.
Applies to
Claim(BinaryReader, ClaimsIdentity)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified reader and subject.
public:
Claim(System::IO::BinaryReader ^ reader, System::Security::Claims::ClaimsIdentity ^ subject);
public Claim (System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity subject);
public Claim (System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity? subject);
new System.Security.Claims.Claim : System.IO.BinaryReader * System.Security.Claims.ClaimsIdentity -> System.Security.Claims.Claim
Public Sub New (reader As BinaryReader, subject As ClaimsIdentity)
Parameters
- reader
- BinaryReader
The binary reader.
- subject
- ClaimsIdentity
The subject that this claim describes.
Exceptions
reader
is null
.
Applies to
Claim(Claim, ClaimsIdentity)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified security claim and subject.
protected:
Claim(System::Security::Claims::Claim ^ other, System::Security::Claims::ClaimsIdentity ^ subject);
protected Claim (System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity subject);
protected Claim (System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity? subject);
new System.Security.Claims.Claim : System.Security.Claims.Claim * System.Security.Claims.ClaimsIdentity -> System.Security.Claims.Claim
Protected Sub New (other As Claim, subject As ClaimsIdentity)
Parameters
- other
- Claim
The security claim.
- subject
- ClaimsIdentity
The subject that this claim describes.
Exceptions
other
is null
.
Remarks
Subject is set to subject
.
Applies to
Claim(String, String)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified claim type, and value.
public:
Claim(System::String ^ type, System::String ^ value);
public Claim (string type, string value);
new System.Security.Claims.Claim : string * string -> System.Security.Claims.Claim
Public Sub New (type As String, value As String)
Parameters
- type
- String
The claim type.
- value
- String
The claim value.
Exceptions
type
or value
is null
.
Remarks
The Subject property is set to null
. The Issuer and OriginalIssuer properties are set to DefaultIssuer. The ValueType property is set to ClaimValueTypes.String
See also
Applies to
Claim(String, String, String)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified claim type, value, and value type.
public:
Claim(System::String ^ type, System::String ^ value, System::String ^ valueType);
public Claim (string type, string value, string valueType);
public Claim (string type, string value, string? valueType);
new System.Security.Claims.Claim : string * string * string -> System.Security.Claims.Claim
Public Sub New (type As String, value As String, valueType As String)
Parameters
- type
- String
The claim type.
- value
- String
The claim value.
Exceptions
type
or value
is null
.
Remarks
The Subject property is set to null
. The Issuer and OriginalIssuer properties are set to DefaultIssuer.
See also
Applies to
Claim(String, String, String, String)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified claim type, value, value type, and issuer.
public:
Claim(System::String ^ type, System::String ^ value, System::String ^ valueType, System::String ^ issuer);
public Claim (string type, string value, string valueType, string issuer);
public Claim (string type, string value, string? valueType, string? issuer);
new System.Security.Claims.Claim : string * string * string * string -> System.Security.Claims.Claim
Public Sub New (type As String, value As String, valueType As String, issuer As String)
Parameters
- type
- String
The claim type.
- value
- String
The claim value.
- issuer
- String
The claim issuer. If this parameter is empty or null
, then DefaultIssuer is used.
Exceptions
type
or value
is null
.
Remarks
The Subject property is set to null
. The OriginalIssuer property is set according to the value of the issuer
parameter.
See also
Applies to
Claim(String, String, String, String, String)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, and original issuer.
public:
Claim(System::String ^ type, System::String ^ value, System::String ^ valueType, System::String ^ issuer, System::String ^ originalIssuer);
public Claim (string type, string value, string valueType, string issuer, string originalIssuer);
public Claim (string type, string value, string? valueType, string? issuer, string? originalIssuer);
new System.Security.Claims.Claim : string * string * string * string * string -> System.Security.Claims.Claim
Public Sub New (type As String, value As String, valueType As String, issuer As String, originalIssuer As String)
Parameters
- type
- String
The claim type.
- value
- String
The claim value.
- issuer
- String
The claim issuer. If this parameter is empty or null
, then DefaultIssuer is used.
- originalIssuer
- String
The original issuer of the claim. If this parameter is empty or null
, then the OriginalIssuer property is set to the value of the Issuer property.
Exceptions
type
or value
is null
.
Remarks
The Subject property is set to null
.
See also
Applies to
Claim(String, String, String, String, String, ClaimsIdentity)
- Source:
- Claim.cs
- Source:
- Claim.cs
- Source:
- Claim.cs
Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, original issuer and subject.
public:
Claim(System::String ^ type, System::String ^ value, System::String ^ valueType, System::String ^ issuer, System::String ^ originalIssuer, System::Security::Claims::ClaimsIdentity ^ subject);
public Claim (string type, string value, string valueType, string issuer, string originalIssuer, System.Security.Claims.ClaimsIdentity subject);
public Claim (string type, string value, string? valueType, string? issuer, string? originalIssuer, System.Security.Claims.ClaimsIdentity? subject);
new System.Security.Claims.Claim : string * string * string * string * string * System.Security.Claims.ClaimsIdentity -> System.Security.Claims.Claim
Public Sub New (type As String, value As String, valueType As String, issuer As String, originalIssuer As String, subject As ClaimsIdentity)
Parameters
- type
- String
The claim type.
- value
- String
The claim value.
- issuer
- String
The claim issuer. If this parameter is empty or null
, then DefaultIssuer is used.
- originalIssuer
- String
The original issuer of the claim. If this parameter is empty or null
, then the OriginalIssuer property is set to the value of the Issuer property.
- subject
- ClaimsIdentity
The subject that this claim describes.
Exceptions
type
or value
is null
.