Class CollectionTargetFactory
Factory methods that create a CollectionTarget<TInput> or CollectionTarget<TInput, TCollection> dataflow worker, which consumes incoming rows and adds them to an ICollection<T>.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Get the factory from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>).
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public static class CollectionTargetFactory
Methods
CollectionTarget<TInput>(in DownstreamFactory<TInput>)
Initializes a new instance of the CollectionTarget<TInput> dataflow worker, which consumes incoming rows and adds them to an automatically created List<T>.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
The target gets a name derived from the upstream worker and port: "CollectionTarget(UpstreamWorkerName[OutputPortName])".
Declaration
public static CollectionTarget<TInput> CollectionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory)
where TInput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
Returns
| Type | Description |
|---|---|
| CollectionTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInput | The type of the input rows. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | UpstreamPort must be set with this overload. |
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
CollectionTarget<TInput>(in DownstreamFactory<TInput>, String)
Initializes a new instance of the CollectionTarget<TInput> dataflow worker, which consumes incoming rows and adds them to an automatically created List<T>.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static CollectionTarget<TInput> CollectionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName)
where TInput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Returns
| Type | Description |
|---|---|
| CollectionTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInput | The type of the input rows. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
CollectionTarget<TInput, TCollection>(in DownstreamFactory<TInput>, TCollection)
Initializes a new instance of the CollectionTarget<TInput, TCollection> dataflow worker, which consumes incoming rows and adds them to the specified ICollection<T>.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
The target gets a name derived from the upstream worker and port: "CollectionTarget(UpstreamWorkerName[OutputPortName])".
Declaration
public static CollectionTarget<TInput, TCollection> CollectionTarget<TInput, TCollection>(this in DownstreamFactory<TInput> downstreamFactory, TCollection rows)
where TInput : class where TCollection : class, ICollection<TInput>
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| TCollection | rows | The collection. Must implement ICollection<T>.
Can be |
Returns
| Type | Description |
|---|---|
| CollectionTarget<TInput, TCollection> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInput | The type of the input rows. |
| TCollection | The type of the collection. Does not need to be specified when |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | UpstreamPort must be set with this overload. |
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
CollectionTarget<TInput, TCollection>(in DownstreamFactory<TInput>, String, TCollection)
Initializes a new instance of the CollectionTarget<TInput, TCollection> dataflow worker, which consumes incoming rows and adds them to the specified ICollection<T>.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static CollectionTarget<TInput, TCollection> CollectionTarget<TInput, TCollection>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, TCollection rows)
where TInput : class where TCollection : class, ICollection<TInput>
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| TCollection | rows | The collection. Must implement ICollection<T>.
Can be |
Returns
| Type | Description |
|---|---|
| CollectionTarget<TInput, TCollection> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInput | The type of the input rows. |
| TCollection | The type of the collection. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|