A set of data encapsulating an event and the associated metadata for use with Event Hubs operations.
System.Object
EventData
public class EventData
Initializes a new instance of the EventData class.
public EventData (BinaryData eventBody);
System.BinaryData eventBody The raw data as binary to use as the body of the event. |
Initializes a new instance of the EventData class.
public EventData (ReadOnlyMemory<byte> eventBody);
System.ReadOnlyMemory<System.Byte> eventBody The raw data to use as the body of the event. |
Initializes a new instance of the EventData class.
[System.ComponentModel.EditorBrowsable] protected EventData (BinaryData eventBody, System.Collections.Generic.IDictionary<string,object> properties = null, System.Collections.Generic.IReadOnlyDictionary<string,object> systemProperties = null, long sequenceNumber = -9223372036854775808, long offset = -9223372036854775808, DateTimeOffset enqueuedTime = null, string partitionKey = null);
System.BinaryData eventBody The raw data to use as the body of the event. |
System.Collections.Generic.IDictionary<System.String,System.Object> properties The set of free-form event properties to send with the event. |
System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> systemProperties The set of system properties received from the Event Hubs service. |
System.Int64 sequenceNumber The sequence number assigned to the event when it was enqueued in the associated Event Hub partition. |
System.Int64 offset The offset of the event when it was received from the associated Event Hub partition. |
System.DateTimeOffset enqueuedTime The date and time, in UTC, of when the event was enqueued in the Event Hub partition. |
System.String partitionKey The partition hashing key associated with the event when it was published. |
Initializes a new instance of the EventData class.
[System.ComponentModel.EditorBrowsable] protected EventData (ReadOnlyMemory<byte> eventBody, System.Collections.Generic.IDictionary<string,object> properties = null, System.Collections.Generic.IReadOnlyDictionary<string,object> systemProperties = null, long sequenceNumber = -9223372036854775808, long offset = -9223372036854775808, DateTimeOffset enqueuedTime = null, string partitionKey = null);
System.ReadOnlyMemory<System.Byte> eventBody The raw data to use as the body of the event. |
System.Collections.Generic.IDictionary<System.String,System.Object> properties The set of free-form event properties to send with the event. |
System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> systemProperties The set of system properties received from the Event Hubs service. |
System.Int64 sequenceNumber The sequence number assigned to the event when it was enqueued in the associated Event Hub partition. |
System.Int64 offset The offset of the event when it was received from the associated Event Hub partition. |
System.DateTimeOffset enqueuedTime The date and time, in UTC, of when the event was enqueued in the Event Hub partition. |
System.String partitionKey The partition hashing key associated with the event when it was published. |
The data associated with the event.
[System.ComponentModel.EditorBrowsable] public ReadOnlyMemory<byte> Body { get; }
System.ReadOnlyMemory<System.Byte> |
The data associated with the event, in stream form.
[System.ComponentModel.EditorBrowsable] public System.IO.Stream BodyAsStream { get; }
System.IO.Stream A System.IO.Stream containing the raw data representing the EventBody of the event. The caller is assumed to have ownership of the stream, including responsibility for managing its lifespan and ensuring proper disposal. |
The date and time, in UTC, of when the event was enqueued in the Event Hub partition.
public DateTimeOffset EnqueuedTime { get; }
System.DateTimeOffset |
The data associated with the event, in System.BinaryData form, providing support for a variety of data transformations and Azure.Core.Serialization.ObjectSerializer integration.
public BinaryData EventBody { get; }
System.BinaryData |
The offset of the event when it was received from the associated Event Hub partition.
public long Offset { get; }
System.Int64 |
The partition hashing key applied to the batch that the associated EventData, was published with.
public string PartitionKey { get; }
System.String |
The set of free-form event properties which may be used for passing metadata associated with the event body during Event Hubs operations.
public System.Collections.Generic.IDictionary<string,object> Properties { get; }
System.Collections.Generic.IDictionary<System.String,System.Object> |
var eventData = new EventData(serializedTelemetryData); eventData.Properties["eventType"] = "com.microsoft.Azure.monitoring.EtlEvent";
The sequence number assigned to the event when it was enqueued in the associated Event Hub partition.
public long SequenceNumber { get; }
System.Int64 |
The set of free-form event properties which were provided by the Event Hubs service to pass metadata associated with the event or associated Event Hubs operation.
public System.Collections.Generic.IReadOnlyDictionary<string,object> SystemProperties { get; }
System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> |
Determines whether the specified System.Object is equal to this instance.
[System.ComponentModel.EditorBrowsable] public override bool Equals (object obj);
System.Object obj The System.Object to compare with this instance. |
System.Boolean
|
Returns a hash code for this instance.
[System.ComponentModel.EditorBrowsable] public override int GetHashCode ();
System.Int32 A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Converts the instance to string representation.
[System.ComponentModel.EditorBrowsable] public override string ToString ();
System.String A System.String that represents this instance. |
ncG1vNJzZmiZqqq%2Fpr%2FDpJuom6Njr627wWeaqKqVY8SqusOorqxmnprBcHDWnplonJ%2Bpu6bAjnqxrqqVY5qmv9KanqKml2OSt7HNrX%2BumqNkgm%2BAjWpmmqiZZI67wdGeZYado6iuqLXNoGV%2BrpWjwYnBwaxmerKlp7JvmcSsqpqfmaO0b5HVnqWtgKWXwG%2BR1Z6lrXyRqa5vtNOmow%3D%3D