Class Person
Represents a person in the identity system.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
public class Person : IPerson, IPersonName, IUniqueIdentifier, IHaveEmail, IEventAggregate, IHaveClaims, IEventSourced
Constructors
Person()
Properties
Gets or sets the entity's email.
Declaration
[PersonalData]
public string Email { get; set; }
Property Value
|
String
|
Implements
FirstName
Gets or sets the persons first name.
Declaration
[PersonalData]
public string FirstName { get; set; }
Property Value
|
String
|
Implements
Id
Gets the identity of the object implementing this interface.
Declaration
public Guid Id { get; set; }
Property Value
|
System.Guid
|
Implements
LastName
Gets or sets the persons last name.
Declaration
[PersonalData]
public string LastName { get; set; }
Property Value
|
String
|
Implements
Name
OrganisationId
Gets or sets the identity of the organisation that the user belongs to. Can be the same as the tenant id, but it could also be a child organisation.
Declaration
public Guid? OrganisationId { get; set; }
Property Value
|
System.Nullable<System.Guid>
|
Implements
Methods
GetClaims(String, String)
Gets a collection of claims for this person.
Declaration
public virtual IEnumerable<Claim> GetClaims(string nameClaimType = "name", string unknownName = "Okänt")
Parameters
|
String
nameClaimType
The type of claim to use for the person name. |
|
String
unknownName
The value for unkonw name, ie used when a fake person is created. |
Returns
|
IEnumerable<System.Security.Claims.Claim>
A collection of claims. |
Implements
RaiseEvent(IEvent)
Adds an event to the aggregate. The added event will be handled if an IEventSourceRepository is configured.
Declaration
public virtual void RaiseEvent(IEvent event)
Parameters
|
IEvent
event
The IEvent to add to the aggregate. |
Implements
Explicit Interface Implementations
IHaveClaims.GetClaims()
Declaration
IEnumerable<Claim> IHaveClaims.GetClaims()
Returns
|
IEnumerable<System.Security.Claims.Claim>
|
Implements
IEventSourced.ClearUncommittedEvents()
Declaration
void IEventSourced.ClearUncommittedEvents()
Implements
IEventSourced.GetUncommittedEvents()
Declaration
IEnumerable<IEvent> IEventSourced.GetUncommittedEvents()
Returns
|
IEnumerable<IEvent>
|
Implements
IEventSourced.LoadFromEvents(IEnumerable<IEvent>)
Declaration
void IEventSourced.LoadFromEvents(IEnumerable<IEvent> events)
Parameters
|
IEnumerable<IEvent>
events
|
Implements
IEventSourced.Version
Declaration
int IEventSourced.Version { get; set; }
Returns
|
System.Int32
|