Class Causation
- Namespace
- Cratis.Chronicle.Auditing
- Assembly
- Cratis.Chronicle.dll
Represents a causation instance.
public record Causation : IEquatable<Causation>
- Inheritance
-
Causation
- Implements
- Inherited Members
- Extension Methods
Constructors
Causation(Causation)
protected Causation(Causation original)
Parameters
originalCausation
Causation(DateTimeOffset, CausationType, IDictionary<string, string>)
Represents a causation instance.
public Causation(DateTimeOffset Occurred, CausationType Type, IDictionary<string, string> Properties)
Parameters
OccurredDateTimeOffsetWhen it occurred.
TypeCausationTypeType of causation.
PropertiesIDictionary<string, string>Any properties associated with the causation.
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Occurred
When it occurred.
public DateTimeOffset Occurred { get; init; }
Property Value
Properties
Any properties associated with the causation.
public IDictionary<string, string> Properties { get; init; }
Property Value
Type
Type of causation.
public CausationType Type { get; init; }
Property Value
Methods
Deconstruct(out DateTimeOffset, out CausationType, out IDictionary<string, string>)
public void Deconstruct(out DateTimeOffset Occurred, out CausationType Type, out IDictionary<string, string> Properties)
Parameters
OccurredDateTimeOffsetTypeCausationTypePropertiesIDictionary<string, string>
Equals(Causation?)
public virtual bool Equals(Causation? other)
Parameters
otherCausation
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Unknown()
Creates an unknown causation instance.
public static Causation Unknown()
Returns
- Causation
A new instance of Causation with the current time, type set to Unknown, and an empty properties dictionary.
Operators
operator ==(Causation?, Causation?)
public static bool operator ==(Causation? left, Causation? right)
Parameters
Returns
operator !=(Causation?, Causation?)
public static bool operator !=(Causation? left, Causation? right)