MessageBusExecuteOnceAndGetMessageInstanceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken) Method

Asynchronously executes as publisher specified by message name with the argument provided and get the return value with the instance information of this executing.

Definition

Namespace: SecretNest.MessageBus
Assembly: SecretNest.MessageBus.DirectRelease (in SecretNest.MessageBus.DirectRelease.dll) Version: 1.0.0
C#
public override Task<MessageInstanceWithExecutorResult<TReturn>> ExecuteOnceAndGetMessageInstanceWithReturnAsync<TParameter, TReturn>(
	string messageName,
	TParameter argument,
	MessageBusPublisherOptions<TParameter, TReturn>? options = null,
	CancellationToken? cancellationToken = null
)

Parameters

messageName  String
The name of this message.
argument  TParameter
Argument.
options  MessageBusPublisherOptionsTParameter, TReturn  (Optional)
The instance of publisher options. Default is .
cancellationToken  NullableCancellationToken  (Optional)
The token to monitor for cancellation requests. The default value is .

Type Parameters

TParameter
The type of the parameter.
TReturn
The type of the return value.

Return Value

TaskMessageInstanceWithExecutorResultTReturn
A task that represents the asynchronous operation, which wraps the return value with the instance information of this executing.

See Also