Class DataStream<T>
Represents a data stream with a specific type of body.
Inherited Members
Namespace: Innovt.Domain.Core.Streams
Assembly: Innovt.Domain.Core.dll
Syntax
public class DataStream<T> : IDataStream<T>, IDataStream where T : class
Type Parameters
Name | Description |
---|---|
T | The type of the body. |
Constructors
| Edit this page View SourceDataStream()
Default constructor for DataStream.
Declaration
public DataStream()
DataStream(string, string?, string?, T)
Initializes a new instance of the DataStream class with specified properties.
Declaration
public DataStream(string version, string? partition, string? traceId, T body)
Parameters
Type | Name | Description |
---|---|---|
string | version | The version of the data stream. |
string | partition | The partition identifier of the data stream. |
string | traceId | The trace identifier associated with the data stream. |
T | body | The body of the data stream. |
Properties
| Edit this page View SourceApproximateArrivalTimestamp
Gets or sets the approximate arrival timestamp of the data stream.
Declaration
public DateTime ApproximateArrivalTimestamp { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Body
Gets or sets the body of the data stream.
Declaration
public T Body { get; set; }
Property Value
Type | Description |
---|---|
T |
EventId
Gets or sets the event identifier associated with the data stream.
Declaration
public string? EventId { get; set; }
Property Value
Type | Description |
---|---|
string |
Partition
Gets or sets the partition identifier of the data stream.
Declaration
public string? Partition { get; set; }
Property Value
Type | Description |
---|---|
string |
PublishedAt
Gets or sets the date and time when the data stream was published.
Declaration
public DateTimeOffset? PublishedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset? |
TraceId
Gets or sets the trace identifier associated with the data stream.
Declaration
public string? TraceId { get; set; }
Property Value
Type | Description |
---|---|
string |
Version
Gets or sets the version of the data stream.
Declaration
public string Version { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceEmpty()
Creates an empty data stream with no body.
Declaration
public static IEmptyDataStream Empty()
Returns
Type | Description |
---|---|
IEmptyDataStream | An instance of an empty data stream. |