Class WebhookState

Namespace
Cratis.Chronicle.Webhooks
Assembly
Cratis.Chronicle.dll

Represents the state of a webhook.

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

Constructors

WebhookState(ObserverRunningState, bool, EventSequenceNumber, EventSequenceNumber)

Represents the state of a webhook.

public WebhookState(ObserverRunningState RunningState, bool IsSubscribed, EventSequenceNumber NextEventSequenceNumber, EventSequenceNumber LastHandledEventSequenceNumber)

Parameters

RunningState ObserverRunningState

The current running state of the webhook.

IsSubscribed bool

Indicates whether the webhook is subscribed.

NextEventSequenceNumber EventSequenceNumber

The next event sequence number.

LastHandledEventSequenceNumber EventSequenceNumber

The last handled event sequence number.

WebhookState(WebhookState)

protected WebhookState(WebhookState original)

Parameters

original WebhookState

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

IsSubscribed

Indicates whether the webhook is subscribed.

public bool IsSubscribed { get; init; }

Property Value

bool

LastHandledEventSequenceNumber

The last handled event sequence number.

public EventSequenceNumber LastHandledEventSequenceNumber { get; init; }

Property Value

EventSequenceNumber

NextEventSequenceNumber

The next event sequence number.

public EventSequenceNumber NextEventSequenceNumber { get; init; }

Property Value

EventSequenceNumber

RunningState

The current running state of the webhook.

public ObserverRunningState RunningState { get; init; }

Property Value

ObserverRunningState

Methods

Deconstruct(out ObserverRunningState, out bool, out EventSequenceNumber, out EventSequenceNumber)

public void Deconstruct(out ObserverRunningState RunningState, out bool IsSubscribed, out EventSequenceNumber NextEventSequenceNumber, out EventSequenceNumber LastHandledEventSequenceNumber)

Parameters

RunningState ObserverRunningState
IsSubscribed bool
NextEventSequenceNumber EventSequenceNumber
LastHandledEventSequenceNumber EventSequenceNumber

Equals(WebhookState?)

public virtual bool Equals(WebhookState? other)

Parameters

other WebhookState

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 ==(WebhookState?, WebhookState?)

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

Parameters

left WebhookState
right WebhookState

Returns

bool

operator !=(WebhookState?, WebhookState?)

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

Parameters

left WebhookState
right WebhookState

Returns

bool