An abstract class in Alta.Analytics.Runtime, Alta.Analytics.
Base class for analytics events in the current system. Holds the event data and lets instruments add extra properties once VContainer injects the event.
Constructors
| Member | What it is |
|---|
protected AnalyticsEvent(string eventName, int? userId = null) | Creates an AnalyticsEvent from eventName and userId. |
Fields
4 private and internal fields
Properties
| Member | What it is |
|---|
IReadonlyAnalyticsData Data { get; } | The event's data, read only. |
virtual string EventName { get; } | The event's name, set by the constructor. |
int? UserId { get; } | The user ID from the data, or null. |
Methods
| Member | What it is |
|---|
void AddInstrument(IAnalyticsInstrument instrument) | Adds an instrument that appends its result to the data. Waits until injection if the event has not been injected yet. |
void AddProperty(string propertyName, object value) | Adds a property to the event's data. |
void Inject(IObjectResolver resolver) | Called by VContainer (from AnalyticsService.Send). Stores the resolver and runs any waiting instruments. |
1 private and internal method
| Member | What it is |
|---|
private void InjectCachedInstruments() | Injects and runs instruments added before the event was injected, then clears them. |