Click or drag to resize

OrchestratorConfigSetAsyncOutputConsumer Method (FuncTupleIEnumerableTupleString, Object, Int32, Task)

Designates an asynchronous output consumer action. This overload of the SetAsyncOutputConsumer method is intended for use in case of record-centric output to multiple targets and no need to access the global cache. To use this overload, the OutputDataKind setting must be either XML or JSON or UnboundJSON. See the note below for differences between these kinds.

Namespace:  Mavidian.DataConveyer.Orchestrators
Assembly:  DataConveyer (in DataConveyer.dll) Version: 3.4.6+1324144ff7
Syntax
public void SetAsyncOutputConsumer(
	Func<Tuple<IEnumerable<Tuple<string, Object>>, int>, Task> consumerToSet
)

Parameters

consumerToSet
Type: SystemFuncTupleIEnumerableTupleString, Object, Int32, Task
An asynchronous action (task-returning function) that takes a single parameter: a tuple containing a record expressed as a sequence of key-value pairs and a corresponding target number. The action has no access to global cache.
Remarks
When the method parameter (the consumerToSet action) is expressed using lambda expression, it may be necessary to disambiguate the type of the actions's argument; for example:
config.SetOutputConsumer(async (Tuple<IEnumerable<Tuple<string, object>>, int> tpl) => { ... await ... });
Note Note

Data passed by Data Conveyer to this action (i.e. the "record expressed as a sequence of key-value pairs") is shaped differently depending on the OutputDataKind setting.

In case of XML, values for all fields are converted to string type with the format (if any specified in ExplicitTypeDefinitions or TypeDefiner) applied.

In case of JSON, values for all fields except for those of the DateTime type, are passed in their native type and no format gets applied. However, values for fields of the DateTime type are converted to strings with the format applied (just like in case of XML). This behavior derives from the JSON standard, which provides native support for data types handled by Data Conveyer, except for the DateTime type.

See Also