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

Interface for components that can be called to execute work. More...

Inheritance diagram for PipServices3.Commons.Run.IExecutable:
PipServices3.Commons.Commands.ICommand PipServices3.Commons.Commands.Command PipServices3.Commons.Commands.InterceptedCommand

Public Member Functions

Task< object > ExecuteAsync (string correlationId, Parameters args)
 Executes component with arguments and receives execution result. More...
 

Detailed Description

Interface for components that can be called to execute work.

class EchoComponent: IExecutable
{
...
public void Execute(string correlationId, Parameters args)
{
var result = args.GetAsObject("message");
}
}
var echo = new EchoComponent();
string message = "Test";
echo.Execute("123", Parameters.FromTuples("message", message));

See Executor, INotifiable, Parameters

Member Function Documentation

◆ ExecuteAsync()

Task<object> PipServices3.Commons.Run.IExecutable.ExecuteAsync ( string  correlationId,
Parameters  args 
)

Executes component with arguments and receives execution result.

Parameters
correlationId(optional) transaction id to trace execution through call chain.
argsexecution arguments.
Returns
execution result

Implemented in PipServices3.Commons.Commands.InterceptedCommand, and PipServices3.Commons.Commands.Command.


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