Class Subject
- Namespace
- Cratis.Chronicle
- Assembly
- Cratis.Chronicle.dll
Represents the subject an event or read model is about — the target used as the identity for compliance concerns such as PII encryption keys. When omitted on append, the EventSourceId is used as the subject.
public record Subject : ConceptAs<string>, IComparable<ConceptAs<string>>, IComparable<string>, IComparable, IEquatable<ConceptAs<string>>, IEquatable<Subject>
- Inheritance
-
Subject
- Implements
- Inherited Members
- Extension Methods
Constructors
Subject(Subject)
protected Subject(Subject original)
Parameters
originalSubject
Subject(string)
Represents the subject an event or read model is about — the target used as the identity for compliance concerns such as PII encryption keys. When omitted on append, the EventSourceId is used as the subject.
public Subject(string Value)
Parameters
ValuestringActual value.
Fields
NotSet
Gets the representation of a Subject that has not been set.
public static readonly Subject NotSet
Field Value
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
IsSet
Gets a value indicating whether the Subject has been set.
public bool IsSet { get; }
Property Value
Methods
Deconstruct(out string)
public void Deconstruct(out string Value)
Parameters
Valuestring
Equals(Subject?)
public virtual bool Equals(Subject? other)
Parameters
otherSubject
Returns
Equals(ConceptAs<string>?)
public override sealed bool Equals(ConceptAs<string>? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
Operators
operator ==(Subject?, Subject?)
public static bool operator ==(Subject? left, Subject? right)
Parameters
Returns
implicit operator Subject(EventSourceId)
Implicitly convert from EventSourceId to Subject.
public static implicit operator Subject(EventSourceId eventSourceId)
Parameters
eventSourceIdEventSourceIdEventSourceId to convert from.
Returns
implicit operator Subject(Guid)
public static implicit operator Subject(Guid id)
Parameters
Returns
implicit operator Subject(string)
public static implicit operator Subject(string value)
Parameters
Returns
operator !=(Subject?, Subject?)
public static bool operator !=(Subject? left, Subject? right)