refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Persistence;
|
||||
|
||||
/// <summary>
|
||||
/// Hosted service that initializes the SQLite schema on startup.
|
||||
/// Runs before the Akka actor system starts creating actors.
|
||||
/// </summary>
|
||||
public class SiteStorageInitializer : IHostedService
|
||||
{
|
||||
private readonly SiteStorageService _storage;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new <see cref="SiteStorageInitializer"/>.
|
||||
/// </summary>
|
||||
/// <param name="storage">The site storage service whose schema is initialized on startup.</param>
|
||||
public SiteStorageInitializer(SiteStorageService storage)
|
||||
{
|
||||
_storage = storage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the SQLite schema before the actor system starts.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token for the startup operation.</param>
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _storage.InitializeAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No-op stop; schema initialization does not require cleanup.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Unused cancellation token.</param>
|
||||
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
}
|
||||
Reference in New Issue
Block a user