Data Batch. Try Add(EventData) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to add an event to the batch, ensuring that the size of the batch does not exceed its maximum.
public bool TryAdd (Azure.Messaging.EventHubs.EventData eventData);
member this.TryAdd : Azure.Messaging.EventHubs.EventData -> bool
Public Function TryAdd (eventData As EventData) As Boolean
The event to attempt to add to the batch.
true if the event was added; otherwise,
When a batch is published, it will be locked for the duration of that operation. During this time,
no events may be added to the batch. Calling
TryAdd while the batch is being published will
result in an InvalidOperationException until publishing has completed.
When an event is accepted into the batch, its content and state are frozen; any changes made to the event will not be reflected in the batch nor will any state transitions be reflected to the original instance.