Show / Hide Table of Contents

Class WorkerBase<TIn, TOut>

Worker base class

Inheritance
System.Object
WorkerBase
WorkerBase<TIn, TOut>
Implements
IWorker
ILogSource
Inherited Members
WorkerBase.Logger
WorkerBase.GetLogger()
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 Source

ExecuteAsync(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
WorkerBase.ExecuteAsync(IWorkerExecutionStatusNotificationService, IWorkUnit, IEnumerable<Result>)
View Source

GetSerializationContext()

Gets the serialization context needed for deserialization of instances of type TIn

Declaration
protected virtual ISerializationContext GetSerializationContext()
Returns
Type Description
ISerializationContext
View Source

GetWorkerName()

Gets the worker name.

Declaration
protected virtual string GetWorkerName()
Returns
Type Description
System.String

Worker name

View Source

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.

Implements

IWorker
ILogSource

See Also

IWorker
  • View Source
Back to top Copyright © DNV GL AS. All rights reserved.