Show / Hide Table of Contents

Class Person

Represents a person in the identity system.

Inheritance
Object
Person
MultitenantPerson
Inherited Members
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
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()

Creates a new instance of Person.

Declaration
public Person()

Properties

Email

Gets or sets the entity's email.

Declaration
[PersonalData]
public string Email { get; set; }
Property Value
String

Implements
IHaveEmail.Email

FirstName

Gets or sets the persons first name.

Declaration
[PersonalData]
public string FirstName { get; set; }
Property Value
String

Implements
IPersonName.FirstName

Id

Gets the identity of the object implementing this interface.

Declaration
public Guid Id { get; set; }
Property Value
System.Guid

Implements
IUniqueIdentifier.Id
IEventSourced.Id

LastName

Gets or sets the persons last name.

Declaration
[PersonalData]
public string LastName { get; set; }
Property Value
String

Implements
IPersonName.LastName

Name

Gets or sets the persons name.

Declaration
public string Name { get; }
Property Value
String

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
IPerson.OrganisationId

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
IPerson.GetClaims(String, String)

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
IEventAggregate.RaiseEvent(IEvent)

Explicit Interface Implementations

IHaveClaims.GetClaims()

Declaration
IEnumerable<Claim> IHaveClaims.GetClaims()
Returns
IEnumerable<System.Security.Claims.Claim>

Implements
IHaveClaims.GetClaims()

IEventSourced.ClearUncommittedEvents()

Declaration
void IEventSourced.ClearUncommittedEvents()
Implements
IEventSourced.ClearUncommittedEvents()

IEventSourced.GetUncommittedEvents()

Declaration
IEnumerable<IEvent> IEventSourced.GetUncommittedEvents()
Returns
IEnumerable<IEvent>

Implements
IEventSourced.GetUncommittedEvents()

IEventSourced.LoadFromEvents(IEnumerable<IEvent>)

Declaration
void IEventSourced.LoadFromEvents(IEnumerable<IEvent> events)
Parameters
IEnumerable<IEvent> events

Implements
IEventSourced.LoadFromEvents(IEnumerable<IEvent>)

IEventSourced.Version

Declaration
int IEventSourced.Version { get; set; }
Returns
System.Int32

Implements
IEventSourced.Version
Back to top Generated by DocFX