C-DEngine 5.105

TheCommRequestResponse..::..PublishRequestJSonAsync<(Of <(<'inputT, outputT>)>)> Method (TheMessageAddress, TheMessageAddress, inputT, TimeSpan)

Sends a message with JSON-serialized parameters to the targetThing and returns the payload of the response message as a deserialized object.

Namespace:  nsCDEngine.Communication
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static Task<outputT> PublishRequestJSonAsync<inputT, outputT>(
	TheMessageAddress originator,
	TheMessageAddress target,
	inputT messageParameters,
	TimeSpan timeout
)
Public Shared Function PublishRequestJSonAsync(Of inputT, outputT) ( _
	originator As TheMessageAddress, _
	target As TheMessageAddress, _
	messageParameters As inputT, _
	timeout As TimeSpan _
) As Task(Of outputT)
public:
generic<typename inputT, typename outputT>
static Task<outputT>^ PublishRequestJSonAsync(
	TheMessageAddress^ originator, 
	TheMessageAddress^ target, 
	inputT messageParameters, 
	TimeSpan^ timeout
)

Type Parameters

inputT
outputT

Parameters

originator
Type: nsCDEngine.Communication..::..TheMessageAddress
Thing or engine to use for response messages. If NULL defaults to ContentService.
target
Type: nsCDEngine.Communication..::..TheMessageAddress
Thing or engine to which the message is to be sent.
messageParameters
Type: inputT
The object to send as the payload of the message.
timeout
Type: TimeSpan
If the response message is not returned twithin this time, the result of the Task will be set to null.

Return Value