Class ServerTaskRunner
Inherited Members
Namespace: LemonEdge.Connections.Database.Tasks
Assembly: LemonEdge.Database.Connector.dll
Syntax
public class ServerTaskRunner : TaskRunnerBase, IDisposable, ITaskRunner, IProcessor
Constructors
ServerTaskRunner(Action<string>, IDatabaseInfo, IEntityUpdater, IServerTask, IReadOnlyCache, UserInfo, BusyProgressReporter, IEntityContextFactory, IServiceContext, CancellationTokenSource)
Declaration
public ServerTaskRunner(Action<string> writer, IDatabaseInfo info, IEntityUpdater updater, IServerTask task, IReadOnlyCache cache, UserInfo user, BusyProgressReporter reporter, IEntityContextFactory entityContextFactory, IServiceContext context, CancellationTokenSource cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<string> | writer | |
| IDatabaseInfo | info | |
| IEntityUpdater | updater | |
| IServerTask | task | |
| IReadOnlyCache | cache | |
| UserInfo | user | |
| BusyProgressReporter | reporter | |
| IEntityContextFactory | entityContextFactory | |
| IServiceContext | context | |
| CancellationTokenSource | cancel |
Properties
DatabaseAlias
Declaration
public string DatabaseAlias { get; }
Property Value
| Type | Description |
|---|---|
| string |
RunningOnServer
Indicates if this task runner is running on a service directly connected to the database, or through a client
Declaration
protected override bool RunningOnServer { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
CreateTaskHandler()
Creates a new handler for processing the results of a task.
Can be different for client handlers versus server handlers.
Declaration
protected override ITaskResultHandler CreateTaskHandler()
Returns
| Type | Description |
|---|---|
| ITaskResultHandler | A new handler for processing the results of a task |
Overrides
DisposeManaged()
Declaration
protected override void DisposeManaged()
Overrides
InternalCreateUpdater()
Creates a new updater context
Declaration
protected override Task<IEntityUpdater> InternalCreateUpdater()
Returns
| Type | Description |
|---|---|
| Task<IEntityUpdater> | A new updater context |
Overrides
LogError(Exception, string)
Writes any error processing the system to the log
Can be overridden by implementing classes to log errors elsewhere too
Declaration
protected override void LogError(Exception ex, string msg)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | ex | The exception being logged |
| string | msg | The message for the exception |