Fix typos

This commit is contained in:
softworkz
2025-10-13 15:23:59 +02:00
parent 96063bbe7d
commit 2e051762dd
2 changed files with 8 additions and 8 deletions

View File

@@ -83,7 +83,7 @@
if (newState < this.state)
{
throw new Exception($"Invalid state transision from {this.state} to {newState}: " + this.GetType().Name);
throw new Exception($"Invalid state transition from {this.state} to {newState}: " + this.GetType().Name);
}
var oldState = this.state;

View File

@@ -7,20 +7,20 @@
internal class AspNetLifetimeAdapter : LifetimeServiceBase
{
private readonly IHostApplicationLifetime lifetimeSercice;
private readonly IHostApplicationLifetime lifetimeService;
public AspNetLifetimeAdapter(IHostApplicationLifetime lifetimeSercice)
public AspNetLifetimeAdapter(IHostApplicationLifetime lifetimeService)
{
this.lifetimeSercice = lifetimeSercice;
this.lifetimeService = lifetimeService;
this.lifetimeSercice.ApplicationStarted.Register(() => this.TransitionState(LifetimeState.Ready));
this.lifetimeSercice.ApplicationStopping.Register(() => this.TransitionState(LifetimeState.Stopping));
this.lifetimeSercice.ApplicationStopped.Register(() => this.TransitionState(LifetimeState.Stopped));
this.lifetimeService.ApplicationStarted.Register(() => this.TransitionState(LifetimeState.Ready));
this.lifetimeService.ApplicationStopping.Register(() => this.TransitionState(LifetimeState.Stopping));
this.lifetimeService.ApplicationStopped.Register(() => this.TransitionState(LifetimeState.Stopped));
}
protected override Task StopCore()
{
this.lifetimeSercice.StopApplication();
this.lifetimeService.StopApplication();
return Task.CompletedTask;
}
}