Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security vulnerabilities and windows build agent errors #20

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public TimeFileScheduleWorker(
public override Task StartAsync(
CancellationToken cancellationToken)
{
logger.LogInformation("Started");
return base.StartAsync(cancellationToken);
}

public override Task StopAsync(
CancellationToken cancellationToken)
{
logger.LogInformation("Stopped");
return base.StopAsync(cancellationToken);
}

Expand Down
2 changes: 2 additions & 0 deletions sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public TimeFileWorker(
public override Task StartAsync(
CancellationToken cancellationToken)
{
logger.LogInformation("Started");
return base.StartAsync(cancellationToken);
}

public override Task StopAsync(
CancellationToken cancellationToken)
{
logger.LogInformation("Stopped");
return base.StopAsync(cancellationToken);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Atc.Hosting/Atc.Hosting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Atc" Version="2.0.500" />
<PackageReference Include="Cronos" Version="0.8.4" />
<PackageReference Include="Atc" Version="2.0.525" />
<PackageReference Include="Cronos" Version="0.9.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ internal sealed class NullBackgroundServiceHealthService : IBackgroundServiceHea
/// <summary>
/// Returns static instance of <see cref="NullBackgroundServiceHealthService"/>
/// </summary>
public static NullBackgroundServiceHealthService Instance => new NullBackgroundServiceHealthService();
public static NullBackgroundServiceHealthService Instance => new();

private NullBackgroundServiceHealthService()
{
Expand Down
11 changes: 3 additions & 8 deletions test/Atc.Hosting.Tests/XUnitTestTypes/MyWorkerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,9 @@ public MyWorkerService(
protected override Task OnExceptionAsync(
Exception exception,
CancellationToken stoppingToken)
{
if (exception is MyWorkerException)
{
throw exception;
}

return Task.CompletedTask;
}
=> exception is MyWorkerException
? throw exception
: Task.CompletedTask;

public override Task DoWorkAsync(
CancellationToken stoppingToken)
Expand Down
Loading