Pip-Services-Commons-Dotnet
Public Member Functions | List of all members
PipServices3.Commons.Run.INotifiable Interface Reference

Interface for components that can be asynchronously notified. The notification may include optional argument that describe the occured event. More...

Inheritance diagram for PipServices3.Commons.Run.INotifiable:
PipServices3.Commons.Commands.IEvent PipServices3.Commons.Commands.Event

Public Member Functions

Task NotifyAsync (string correlationId, Parameters args)
 Notifies the component about occured event. More...
 

Detailed Description

Interface for components that can be asynchronously notified. The notification may include optional argument that describe the occured event.

class MyComponent: INotifable
{
...
public void Notify(string correlationId, Parameters args)
{
Console.WriteLine("Occured event " + args.GetAsString("event"));
}
}
var myComponent = new MyComponent();
myComponent.Notify("123", Parameters.FromTuples("event", "Test Event"));

See Notifier, IExecutable

Member Function Documentation

◆ NotifyAsync()

Task PipServices3.Commons.Run.INotifiable.NotifyAsync ( string  correlationId,
Parameters  args 
)

Notifies the component about occured event.

Parameters
correlationId(optional) transaction id to trace execution through call chain.
argsnotification arguments.

Implemented in PipServices3.Commons.Commands.Event.


The documentation for this interface was generated from the following file: