Class SourceDefinition

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

Represents the definition of a capture source.

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

Constructors

SourceDefinition(SourceDefinition)

protected SourceDefinition(SourceDefinition original)

Parameters

original SourceDefinition

SourceDefinition(SourceType, string?, string?, string?, string?, string?, SourceAuthorization?, string?, IReadOnlyList<string>?)

Represents the definition of a capture source.

public SourceDefinition(SourceType Type, string? Api = null, string? Poll = null, string? Route = null, string? Path = null, string? Topic = null, SourceAuthorization? Authorization = null, string? Sequence = null, IReadOnlyList<string>? Events = null)

Parameters

Type SourceType

The SourceType.

Api string

Optional API name for API sources.

Poll string

Optional poll interval for API sources.

Route string

Optional route for API sources.

Path string

Optional path for webhook sources.

Topic string

Optional topic for message sources.

Authorization SourceAuthorization

Optional authentication configuration. This is configured in code when the source is configured, not through the Capture Declaration Language, so that secrets never live in capture text.

Sequence string

Optional inbox event sequence for events sources, e.g. inbox-fulfillment.

Events IReadOnlyList<string>

The names of the public event types an events source captures from.

Properties

Api

Optional API name for API sources.

public string? Api { get; init; }

Property Value

string

Authorization

Optional authentication configuration. This is configured in code when the source is configured, not through the Capture Declaration Language, so that secrets never live in capture text.

public SourceAuthorization? Authorization { get; init; }

Property Value

SourceAuthorization

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Events

The names of the public event types an events source captures from.

public IReadOnlyList<string>? Events { get; init; }

Property Value

IReadOnlyList<string>

Path

Optional path for webhook sources.

public string? Path { get; init; }

Property Value

string

Poll

Optional poll interval for API sources.

public string? Poll { get; init; }

Property Value

string

Route

Optional route for API sources.

public string? Route { get; init; }

Property Value

string

Sequence

Optional inbox event sequence for events sources, e.g. inbox-fulfillment.

public string? Sequence { get; init; }

Property Value

string

Topic

Optional topic for message sources.

public string? Topic { get; init; }

Property Value

string

Type

public SourceType Type { get; init; }

Property Value

SourceType

Methods

Deconstruct(out SourceType, out string?, out string?, out string?, out string?, out string?, out SourceAuthorization?, out string?, out IReadOnlyList<string>?)

public void Deconstruct(out SourceType Type, out string? Api, out string? Poll, out string? Route, out string? Path, out string? Topic, out SourceAuthorization? Authorization, out string? Sequence, out IReadOnlyList<string>? Events)

Parameters

Type SourceType
Api string
Poll string
Route string
Path string
Topic string
Authorization SourceAuthorization
Sequence string
Events IReadOnlyList<string>

Equals(SourceDefinition?)

public virtual bool Equals(SourceDefinition? other)

Parameters

other SourceDefinition

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

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

Parameters

left SourceDefinition
right SourceDefinition

Returns

bool

operator !=(SourceDefinition?, SourceDefinition?)

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

Parameters

left SourceDefinition
right SourceDefinition

Returns

bool