public ApplicationDatabaseService(
[NotNull] IApplicationDatabaseRepository applicationRepository,
[NotNull] IEnumerable<ISupportsModelPersistence> databaseDependents,
[NotNull] MonitorableDependencies monitorableDependencies,
[NotNull] ICredentialStore credentialStore,
[NotNull] ILogger logger)
{
if (applicationRepository == null)
{
throw new ArgumentNullException(nameof(applicationRepository));
}
if (databaseDependents == null)
{
throw new ArgumentNullException(nameof(databaseDependents));
}
if (monitorableDependencies == null) throw new ArgumentNullException(nameof(monitorableDependencies));
if (credentialStore == null) throw new ArgumentNullException(nameof(credentialStore));
if (logger == null) throw new ArgumentNullException(nameof(logger));
this.applicationRepository = applicationRepository;
this.monitorableDependencies = monitorableDependencies;
this.credentialStore = credentialStore;
this.logger = logger;
this.databaseDependents = databaseDependents.OrderBy(d => d.LoadSequence).ToList();
this.monitorableDependencies.NotifyOfDependencyChange<IApplicationDatabaseService>(this);
InitialiseDirtyDataTable();
}