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
originalSourceDefinition
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
TypeSourceTypeThe SourceType.
ApistringOptional API name for API sources.
PollstringOptional poll interval for API sources.
RoutestringOptional route for API sources.
PathstringOptional path for webhook sources.
TopicstringOptional topic for message sources.
AuthorizationSourceAuthorizationOptional 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.
SequencestringOptional inbox event sequence for events sources, e.g. inbox-fulfillment.
EventsIReadOnlyList<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
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
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Events
The names of the public event types an events source captures from.
public IReadOnlyList<string>? Events { get; init; }
Property Value
Path
Optional path for webhook sources.
public string? Path { get; init; }
Property Value
Poll
Optional poll interval for API sources.
public string? Poll { get; init; }
Property Value
Route
Optional route for API sources.
public string? Route { get; init; }
Property Value
Sequence
Optional inbox event sequence for events sources, e.g. inbox-fulfillment.
public string? Sequence { get; init; }
Property Value
Topic
Optional topic for message sources.
public string? Topic { get; init; }
Property Value
Type
The SourceType.
public SourceType Type { get; init; }
Property Value
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
TypeSourceTypeApistringPollstringRoutestringPathstringTopicstringAuthorizationSourceAuthorizationSequencestringEventsIReadOnlyList<string>
Equals(SourceDefinition?)
public virtual bool Equals(SourceDefinition? other)
Parameters
otherSourceDefinition
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
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 ==(SourceDefinition?, SourceDefinition?)
public static bool operator ==(SourceDefinition? left, SourceDefinition? right)
Parameters
leftSourceDefinitionrightSourceDefinition
Returns
operator !=(SourceDefinition?, SourceDefinition?)
public static bool operator !=(SourceDefinition? left, SourceDefinition? right)
Parameters
leftSourceDefinitionrightSourceDefinition