Class WorkerBase<TIn, TOut>
Worker base class
Namespace: DNVGL.One.Compute.Core.Worker
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public abstract class WorkerBase<TIn, TOut> : WorkerBase, IWorker, ILogSource where TIn : class where TOut : class
Type Parameters
Name | Description |
---|---|
TIn | |
TOut |
Methods
View SourceExecuteAsync(IWorkerExecutionStatusNotificationService, IWorkUnit, IEnumerable<Result>)
Executes the asynchronous.
Declaration
public override sealed Task<object> ExecuteAsync(IWorkerExecutionStatusNotificationService workerExecutionStatusNotificationService, IWorkUnit workUnit, IEnumerable<Result> dependencyResults)
Parameters
Type | Name | Description |
---|---|---|
IWorkerExecutionStatusNotificationService | workerExecutionStatusNotificationService | The worker execution status notification service. |
IWorkUnit | workUnit | The work unit. |
IEnumerable<Result> | dependencyResults | The dependency results. |
Returns
Type | Description |
---|---|
Task<System.Object> | Execution task |
Overrides
View SourceGetSerializationContext()
Gets the serialization context needed for deserialization of instances of type TIn
Declaration
protected virtual ISerializationContext GetSerializationContext()
Returns
Type | Description |
---|---|
ISerializationContext |
GetWorkerName()
Gets the worker name.
Declaration
protected virtual string GetWorkerName()
Returns
Type | Description |
---|---|
System.String | Worker name |
ProcessAsync(IWorkerExecutionStatusNotificationService, TIn, IEnumerable<IResult>)
Processes the input.
Declaration
protected abstract Task<TOut> ProcessAsync(IWorkerExecutionStatusNotificationService workerExecutionStatusNotificationService, TIn input, IEnumerable<IResult> dependencyResult)
Parameters
Type | Name | Description |
---|---|---|
IWorkerExecutionStatusNotificationService | workerExecutionStatusNotificationService | The worker execution status notification service. |
TIn | input | The input. |
IEnumerable<IResult> | dependencyResult | The dependency result. |
Returns
Type | Description |
---|---|
Task<TOut> | The result. |