Class SnapshotBuilder
public class SnapshotBuilder : IVisitor
- Inheritance
-
SnapshotBuilder
- Implements
- Inherited Members
Constructors
SnapshotBuilder()
public SnapshotBuilder()
SnapshotBuilder(ModelSnapshot)
public SnapshotBuilder(ModelSnapshot existingModel)
Parameters
existingModelModelSnapshot
Methods
Build()
public ModelSnapshot Build()
Returns
BuildEmpty()
Create an empty snapshot with no CreateModel event
public static ModelSnapshot BuildEmpty()
Returns
BuildFromEvents(IEnumerable<IEvent>)
public static ModelSnapshot BuildFromEvents(IEnumerable<IEvent> events)
Parameters
eventsIEnumerable<IEvent>
Returns
BuildFromEvents(IEnumerable<IEvent>, CancellationToken)
Create a model snapshot from model event history
public static ModelSnapshot BuildFromEvents(IEnumerable<IEvent> events, CancellationToken cancellationToken)
Parameters
eventsIEnumerable<IEvent>cancellationTokenCancellationToken
Returns
Exceptions
- InvalidEventException
Thrown when processing the history would produce an invalid state
- OperationCanceledException
Thrown when the cancellation token's source is cancelled.
BuildFromModelAndChanges(ModelSnapshot, IEnumerable<IEvent>, IProgress<IEvent>?)
public static ModelSnapshot BuildFromModelAndChanges(ModelSnapshot existingModel, IEnumerable<IEvent> events, IProgress<IEvent>? progress = null)
Parameters
existingModelModelSnapshoteventsIEnumerable<IEvent>progressIProgress<IEvent>
Returns
BuildFromModelAndChanges(ModelSnapshot, IEnumerable<IEvent>, CancellationToken, IProgress<IEvent>?)
public static ModelSnapshot BuildFromModelAndChanges(ModelSnapshot existingModel, IEnumerable<IEvent> events, CancellationToken cancellationToken, IProgress<IEvent>? progress = null)
Parameters
existingModelModelSnapshoteventsIEnumerable<IEvent>cancellationTokenCancellationTokenprogressIProgress<IEvent>
Returns
BuildHistoricalVersions(IEnumerable<IEvent>)
Create a model snapshot from model event history
public static IReadOnlyDictionary<Version, ModelSnapshot> BuildHistoricalVersions(IEnumerable<IEvent> events)
Parameters
eventsIEnumerable<IEvent>
Returns
Exceptions
- InvalidEventException
Thrown when processing the history would produce an invalid state
ToString()
public override string ToString()
Returns
Visit(CopyAttributesV1Event)
public void Visit(CopyAttributesV1Event e)
Parameters
Visit(CopyAttributesV2Event)
public void Visit(CopyAttributesV2Event e)
Parameters
Visit(CopyAttributesV3Event)
public void Visit(CopyAttributesV3Event e)
Parameters
Visit(CopyForeignKeyV1Event)
public void Visit(CopyForeignKeyV1Event e)
Parameters
Visit(CopyForeignKeyV2Event)
public void Visit(CopyForeignKeyV2Event e)
Parameters
Visit(CopyRelationshipV1Event)
public void Visit(CopyRelationshipV1Event e)
Parameters
Visit(TagRelationshipSideV1Event)
public void Visit(TagRelationshipSideV1Event e)