Interface IEvent<TValue>
The event in a time series.
Namespace: PushTechnology.ClientInterface.Client.Features.TimeSeries
Assembly: Diffusion.Client.dll
Syntax
public interface IEvent<TValue>
Type Parameters
| Name | Description |
|---|---|
| TValue | The event value type. |
Remarks
Added in version 6.1.
Properties
IsEditEvent
Returns true if the current event is an
edit event. Otherwise false.
Declaration
bool IsEditEvent { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Metadata
Gets the IEventMetadata of the current event.
Declaration
IEventMetadata Metadata { get; }
Property Value
| Type | Description |
|---|---|
| IEventMetadata | The IEventMetadata of the current event. |
OriginalMetadata
Gets the IEventMetadata of the original event if the current event is an edit event. Otherwise it will be the same as Metadata.
Declaration
IEventMetadata OriginalMetadata { get; }
Property Value
| Type | Description |
|---|---|
| IEventMetadata | The IEventMetadata of the original event or same as Metadata. |
Remarks
The result is always the metadata of an original event, never that of an edit event.
Value
Gets the value associated with the event.
Declaration
TValue Value { get; }
Property Value
| Type | Description |
|---|---|
| TValue | The event value. |
Methods
WithValue<TNewValue>(TNewValue)
Copies this event with a different value.
Declaration
IEvent<TNewValue> WithValue<TNewValue>(TNewValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TNewValue | value | The new value. |
Returns
| Type | Description |
|---|---|
| IEvent<TNewValue> | A copy of the current event with the new |
Type Parameters
| Name | Description |
|---|---|
| TNewValue | The new value type. |
Remarks
This method is useful when further transformation of the received value is needed, but the application wishes to preserve other event attributes. For example, if a IBytes value is received which the session wishes to interpret as IJSON.
All attributes other than the value will be copied from the current event.