Fix code style issues (#113)

This commit is contained in:
Leendert de Borst
2024-07-26 00:09:54 +02:00
parent 2f7a5acf42
commit 5e18ea163f
7 changed files with 16 additions and 14 deletions

View File

@@ -6,6 +6,14 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\net8.0\AliasVault.WorkerStatus.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\net8.0\AliasVault.WorkerStatus.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json">
<Link>stylecop.json</Link>

View File

@@ -5,10 +5,10 @@
// </copyright>
//-----------------------------------------------------------------------
using Microsoft.EntityFrameworkCore;
namespace AliasVault.WorkerStatus.Database;
using Microsoft.EntityFrameworkCore;
/// <summary>
/// Interface for the WorkerStatusDbContext. Inherit from this interface to include the WorkerServiceStatus DbSet
/// which is used to store the status of worker services.
@@ -33,5 +33,3 @@ public interface IWorkerStatusDbContext : IDisposable
/// <returns>Task.</returns>
public Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}

View File

@@ -5,11 +5,11 @@
// </copyright>
//-----------------------------------------------------------------------
namespace AliasVault.WorkerStatus.Database;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AliasVault.WorkerStatus.Database;
/// <summary>
/// Represents the status of a worker service for monitoring and control.
/// </summary>

View File

@@ -5,10 +5,10 @@
// </copyright>
//-----------------------------------------------------------------------
using Microsoft.EntityFrameworkCore;
namespace AliasVault.WorkerStatus.Database;
using Microsoft.EntityFrameworkCore;
/// <summary>
/// WorkerStatusDbContext class.
/// </summary>
@@ -35,4 +35,3 @@ public class WorkerStatusDbContext : DbContext, IWorkerStatusDbContext
/// </summary>
public DbSet<WorkerServiceStatus> WorkerServiceStatuses { get; set; }
}

View File

@@ -29,7 +29,7 @@ public class GlobalServiceStatus
/// <summary>
/// Register a worker with the service.
/// </summary>
/// <param name="workerName">Name of the worker</param>
/// <param name="workerName">Name of the worker.</param>
public void RegisterWorker(string workerName)
{
_workerStatuses[workerName] = false;

View File

@@ -5,10 +5,9 @@
// </copyright>
//-----------------------------------------------------------------------
using AliasVault.WorkerStatus.Database;
namespace AliasVault.WorkerStatus;
using AliasVault.WorkerStatus.Database;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

View File

@@ -22,5 +22,3 @@ public class WorkerStatusConfiguration
/// </summary>
public string ServiceName { get; set; } = null!;
}