Class EventSourceDefinition
- Namespace
- Cratis.Chronicle.EventSources
- Assembly
- Cratis.Chronicle.dll
Represents a discovered IEventSource definition.
public record EventSourceDefinition : IEquatable<EventSourceDefinition>
- Inheritance
-
EventSourceDefinition
- Implements
- Inherited Members
- Extension Methods
Constructors
EventSourceDefinition(EventSourceDefinition)
protected EventSourceDefinition(EventSourceDefinition original)
Parameters
originalEventSourceDefinition
EventSourceDefinition(Type, string, string, ConcurrencyDimensions, IReadOnlyList<EventStream>)
Represents a discovered IEventSource definition.
public EventSourceDefinition(Type ClrType, string Name, string Description, ConcurrencyDimensions Concurrency, IReadOnlyList<EventStream> Streams)
Parameters
ClrTypeTypeThe type carrying the definition.
NamestringThe name of the event source, which is the event source type of appended events.
DescriptionstringThe description of the event source.
ConcurrencyConcurrencyDimensionsThe default dimensions that take part in concurrency checks.
StreamsIReadOnlyList<EventStream>The streams of the event source.
Properties
ClrType
The type carrying the definition.
public Type ClrType { get; init; }
Property Value
Concurrency
The default dimensions that take part in concurrency checks.
public ConcurrencyDimensions Concurrency { get; init; }
Property Value
Description
The description of the event source.
public string Description { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
EventSourceType
Gets the name as an EventSourceType.
public EventSourceType EventSourceType { get; }
Property Value
Name
The name of the event source, which is the event source type of appended events.
public string Name { get; init; }
Property Value
Streams
The streams of the event source.
public IReadOnlyList<EventStream> Streams { get; init; }
Property Value
Methods
ConcurrencyFor(EventStream?)
Gets the dimensions that apply to an append, from the stream when one is given and declares any, otherwise from the event source.
public ConcurrencyDimensions ConcurrencyFor(EventStream? stream)
Parameters
streamEventStreamThe stream the append is to, if any.
Returns
- ConcurrencyDimensions
The effective ConcurrencyDimensions.
Deconstruct(out Type, out string, out string, out ConcurrencyDimensions, out IReadOnlyList<EventStream>)
public void Deconstruct(out Type ClrType, out string Name, out string Description, out ConcurrencyDimensions Concurrency, out IReadOnlyList<EventStream> Streams)
Parameters
ClrTypeTypeNamestringDescriptionstringConcurrencyConcurrencyDimensionsStreamsIReadOnlyList<EventStream>
Equals(EventSourceDefinition?)
public virtual bool Equals(EventSourceDefinition? other)
Parameters
otherEventSourceDefinition
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
FindStream(string)
Find a stream by name.
public EventStream? FindStream(string name)
Parameters
namestringThe name of the stream.
Returns
- EventStream
The EventStream if the definition has it; otherwise null.
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(EventSourceDefinition?, EventSourceDefinition?)
public static bool operator ==(EventSourceDefinition? left, EventSourceDefinition? right)
Parameters
leftEventSourceDefinitionrightEventSourceDefinition
Returns
operator !=(EventSourceDefinition?, EventSourceDefinition?)
public static bool operator !=(EventSourceDefinition? left, EventSourceDefinition? right)
Parameters
leftEventSourceDefinitionrightEventSourceDefinition