Class CompareDatabases
Inherited Members
Namespace: LemonEdge.Connections.Database.Tasks.Process
Assembly: LemonEdge.Database.Connector.dll
Syntax
[ServerTask("Compare Databases", "1B830EBD-35B2-4400-9A04-A21A48FC2CFB", typeof(CompareDatabaseParameters), CanOnlyRunOnServer = true, Description = "Compares all tables between two databases and results on any differences by table/key.")]
public class CompareDatabases : ITaskProcessor, IProcessor, IDisposable
Constructors
CompareDatabases(IDatabaseInfoManager, IReflectionHelper, IFactoryInjector, IEntityDescriptorFactory, IResultsComparerFactory)
Declaration
public CompareDatabases(IDatabaseInfoManager databaseInfoManager, IReflectionHelper reflectionHelper, IFactoryInjector factoryInjector, IEntityDescriptorFactory entityDescriptorFactory, IResultsComparerFactory resultsComparerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IDatabaseInfoManager | databaseInfoManager | |
| IReflectionHelper | reflectionHelper | |
| IFactoryInjector | factoryInjector | |
| IEntityDescriptorFactory | entityDescriptorFactory | |
| IResultsComparerFactory | resultsComparerFactory |
Properties
Cache
A local cache for performance
Declaration
public IReadOnlyCache Cache { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCache |
Reporter
A reporter to provide feedback to a log, or client depending on the context the process is running under
Declaration
public BusyProgressReporter Reporter { get; set; }
Property Value
| Type | Description |
|---|---|
| BusyProgressReporter |
Updater
A context to ensure the process can query, load and modify all LemonEdge data
Declaration
public IEntityUpdater Updater { get; }
Property Value
| Type | Description |
|---|---|
| IEntityUpdater |
User
The current logged in user the process is running under
Declaration
public UserInfo User { get; }
Property Value
| Type | Description |
|---|---|
| UserInfo |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Init(ITaskRunner, ServerTaskParameter)
Initializes the task processor with the parameters for processing the task
Declaration
public Task Init(ITaskRunner runner, ServerTaskParameter processTaskParameter)
Parameters
| Type | Name | Description |
|---|---|---|
| ITaskRunner | runner | The context within which the task is being processed |
| ServerTaskParameter | processTaskParameter |
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operationn |
ProcessTask(CancellationToken)
A function that implements the process for this task using the parameters provided during Init(ITaskRunner, ServerTaskParameter)
Declaration
public Task<object> ProcessTask(CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancel | A cancellation token for cancelling any long running task |
Returns
| Type | Description |
|---|---|
| Task<object> | An optional object detailing the result which can be converted using ITaskResultHandler into a ServerTaskResult, or is a ServerTaskResult itself |