.NETAPI reference
Events
Events in the .NET SDK.
EventsResource
classclass Inverge.Nexus.Resources.EventsResourceProduct analytics — events correlated to a person and a session.
Track is buffered by default and shipped on a background loop,
so it costs microseconds inside a request handler and never fails it. Call
FlushAsync (or the client's) before a short-lived process exits.
| Constant | Description |
|---|---|
const int MaxBatchSize = 1000 | The most events the ingest endpoint accepts in one request. |
BatchAsync()
methodTask<int> BatchAsync(IEnumerable<NexusEvent> events, NexusTelemetryContext? context = null, CancellationToken cancellationToken = default)Sends many events that share one identity immediately, bypassing the buffer.
Parameters
Prop
Type
Returns Task<int> — How many events the server wrote.
FlushAsync()
methodTask FlushAsync(CancellationToken cancellationToken = default)Ships every buffered event right now.
Parameters
Prop
Type
Track()
methodvoid Track(string name, object? properties = null, DateTimeOffset? timestamp = null, NexusTelemetryContext? context = null)Captures one event. Returns as soon as it is buffered.
nexus.Events.Track("order_placed", new { total = 42, currency = "USD" });Parameters
Prop
Type
