Skip to main content

Method: Emit Events - C Sharp

public async static Task EmitEvent(IEnumerable<EmitEventArgs> events) {}
ParameterTypeDescription
eventsIEnumerable<EmitEventArgs>Collection of events

A method of the Event Agent.

Emit one or more events to event store.

Parameter Type

EmitEventArgs

Properties:

PropertyTypeDescription
LabelNamestringEvent label (event name)
SourceDigitalIdentitystringSource digital identity (DID)
TargetDigitalIdentitystringTarget digital identity (DID)
MetastringAdditional payload. Maximum length 215 bytes.
TypestringEvent type or group

Constructor:

public EmitEventArgs(
string labelName, // LabelName
string sourceDigitalIdentity, // SourceDigitalIdentity
string targetDigitalIdentity, // TargetDigitalIdentity
string meta, // Meta
string type // Type
)
info

Type is simply a metadata tag for assigning the "type" of events.

warning

Events won't be searchable immediately after being emitted. You would have to wait a short while to try again.

Examples

Emit Multiple Events

await EventAgent.EmitEvent(
new List<EmitEventArgs>
{
new EmitEventArgs(
"Event label 1",
"Source DID 1",
"Target DID 1",
"",
"default"
),
new EmitEventArgs(
"Event label 2",
"Source DID 2",
"Target DID 2",
"",
"default"
),
// ...
}
);