Class CaptureObservation

Namespace
Cratis.Chronicle.Concepts.Captures
Assembly
Cratis.Chronicle.dll

Represents the last observed state of a capture's source - the baseline the next capture cycle diffs against. Persisted so a capture resumes from where it left off when the kernel restarts.

public record CaptureObservation : IEquatable<CaptureObservation>
Inheritance
CaptureObservation
Implements
Inherited Members
Extension Methods

Constructors

CaptureObservation(CaptureId, IReadOnlyList<CaptureObservedItem>)

Represents the last observed state of a capture's source - the baseline the next capture cycle diffs against. Persisted so a capture resumes from where it left off when the kernel restarts.

public CaptureObservation(CaptureId Id, IReadOnlyList<CaptureObservedItem> Items)

Parameters

Id CaptureId

The CaptureId the observation belongs to.

Items IReadOnlyList<CaptureObservedItem>

The items as they were last observed.

CaptureObservation(CaptureObservation)

protected CaptureObservation(CaptureObservation original)

Parameters

original CaptureObservation

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Id

The CaptureId the observation belongs to.

public CaptureId Id { get; init; }

Property Value

CaptureId

Items

The items as they were last observed.

public IReadOnlyList<CaptureObservedItem> Items { get; init; }

Property Value

IReadOnlyList<CaptureObservedItem>

Methods

Deconstruct(out CaptureId, out IReadOnlyList<CaptureObservedItem>)

public void Deconstruct(out CaptureId Id, out IReadOnlyList<CaptureObservedItem> Items)

Parameters

Id CaptureId
Items IReadOnlyList<CaptureObservedItem>

Empty(CaptureId)

Creates an empty CaptureObservation for a capture that has not observed anything yet.

public static CaptureObservation Empty(CaptureId id)

Parameters

id CaptureId

The CaptureId.

Returns

CaptureObservation

An empty CaptureObservation.

Equals(CaptureObservation?)

public virtual bool Equals(CaptureObservation? other)

Parameters

other CaptureObservation

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CaptureObservation?, CaptureObservation?)

public static bool operator ==(CaptureObservation? left, CaptureObservation? right)

Parameters

left CaptureObservation
right CaptureObservation

Returns

bool

operator !=(CaptureObservation?, CaptureObservation?)

public static bool operator !=(CaptureObservation? left, CaptureObservation? right)

Parameters

left CaptureObservation
right CaptureObservation

Returns

bool