Class CreateFileWorker
Implements
Inherited Members
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public class CreateFileWorker : WorkerBase<CreateFileWorker>, IDisposeOnFinished
Constructors
CreateFileWorker(WorkerParent, String, Func<Boolean>, String)
Initializes a new instance of the CreateFileWorker worker. It creates an empty file when it runs.
Overwrite defaults to false.
Declaration
public CreateFileWorker(WorkerParent workerParent, string workerName, Func<bool> isStartableFunc, string fileName)
Parameters
Type | Name | Description |
---|---|---|
WorkerParent | workerParent | The parent worker or worker system that the new child worker will be added to. Cannot be |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Func<Boolean> | isStartableFunc | Function to calculate the worker start constraint; it should return |
String | fileName | Name of the file. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
CreateFileWorker(WorkerParent, String, Func<Boolean>, String, Boolean)
Initializes a new instance of the CreateFileWorker worker. It creates an empty file when it runs.
Declaration
public CreateFileWorker(WorkerParent workerParent, string workerName, Func<bool> isStartableFunc, string fileName, bool overwrite)
Parameters
Type | Name | Description |
---|---|---|
WorkerParent | workerParent | The parent worker or worker system that the new child worker will be added to. Cannot be |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Func<Boolean> | isStartableFunc | Function to calculate the worker start constraint; it should return |
String | fileName | Name of the file. |
Boolean | overwrite | If set to |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
CreateFileWorker(WorkerParent, String, Func<Boolean>, String, Boolean, FileOptions)
Initializes a new instance of the CreateFileWorker worker. It creates an empty file when it runs.
Declaration
public CreateFileWorker(WorkerParent workerParent, string workerName, Func<bool> isStartableFunc, string fileName, bool overwrite, FileOptions fileOptions)
Parameters
Type | Name | Description |
---|---|---|
WorkerParent | workerParent | The parent worker or worker system that the new child worker will be added to. Cannot be |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Func<Boolean> | isStartableFunc | Function to calculate the worker start constraint; it should return |
String | fileName | Name of the file. |
Boolean | overwrite | If set to |
FileOptions | fileOptions | The file options. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
CreateFileWorker(WorkerParent, String, String)
Initializes a new instance of the CreateFileWorker worker. It creates an empty file when it runs.
Overwrite defaults to false.
Declaration
public CreateFileWorker(WorkerParent workerParent, string workerName, string fileName)
Parameters
Type | Name | Description |
---|---|---|
WorkerParent | workerParent | The parent worker or worker system that the new child worker will be added to. Cannot be |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
String | fileName | Name of the file. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
CreateFileWorker(WorkerParent, String, String, Boolean)
Initializes a new instance of the CreateFileWorker worker. It creates an empty file when it runs.
Declaration
public CreateFileWorker(WorkerParent workerParent, string workerName, string fileName, bool overwrite)
Parameters
Type | Name | Description |
---|---|---|
WorkerParent | workerParent | The parent worker or worker system that the new child worker will be added to. Cannot be |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
String | fileName | Name of the file. |
Boolean | overwrite | If set to |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
Properties
FileName
Gets or sets the name of the file. Cannot be set after the worker has started running.
Note: This property is thread-safe.
Declaration
public string FileName { get; set; }
Property Value
Type | Description |
---|---|
String |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Cannot set the value after the worker has started running. |
Methods
RunAsync()
This method can be overridden to add custom functionality to the derived worker that runs before
and after the file processing. In this case, the base class base.RunAsync()
must
be called for the worker to function correctly.
Typically, this worker is used without overriding this method.
Declaration
protected override Task<OutcomeStatus> RunAsync()
Returns
Type | Description |
---|---|
Task<OutcomeStatus> | A |