MessageBusExecuteOnceWithReturnAsyncTParameter, TReturn(String, TParameter, MessageBusPublisherOptionsTParameter, TReturn, NullableCancellationToken) Method
Asynchronously executes as publisher specified by message name with the argument provided and get the return value.
Namespace: SecretNest.MessageBusAssembly: SecretNest.MessageBus.DirectRelease (in SecretNest.MessageBus.DirectRelease.dll) Version: 1.0.0
public override Task<TReturn> ExecuteOnceWithReturnAsync<TParameter, TReturn>(
string messageName,
TParameter argument,
MessageBusPublisherOptions<TParameter, TReturn>? options = null,
CancellationToken? cancellationToken = null
)
Public Overrides Function ExecuteOnceWithReturnAsync(Of TParameter, TReturn) (
messageName As String,
argument As TParameter,
Optional options As MessageBusPublisherOptions(Of TParameter, TReturn) = Nothing,
Optional cancellationToken As CancellationToken? = Nothing
) As Task(Of TReturn)
- 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 .
- TParameter
- The type of the parameter.
- TReturn
- The type of the return value.
TaskTReturnA task that represents the asynchronous operation, which wraps the return value.