Skip to content

Commit

Permalink
fix: Address warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
data-miner00 committed Feb 21, 2024
1 parent e24429b commit 4f9b923
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/Linker.Core/Models/UrlStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
/// </summary>
public enum UrlStatus
{
/// <summary>
/// The default value.
/// </summary>
None,

/// <summary>
/// Indicates that the Url is still accessible on last check.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Linker.Data/SQLite/ArticleRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public ArticleRepository(IDbConnection connection)
public async Task AddAsync(Article item, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
ArgumentNullException.ThrowIfNull(item);

var randomId = Guid.NewGuid().ToString();

Expand Down
8 changes: 7 additions & 1 deletion src/Linker.WebApi/Options/SQLiteOption.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
namespace Linker.WebApi.Options
{
/// <summary>
/// The options required for SQLite.
/// </summary>
internal sealed class SQLiteOption
{
public string ConnectionString { get; set; }
/// <summary>
/// Gets or sets the connection string for SQLite database.
/// </summary>
required public string ConnectionString { get; set; }
}
}
7 changes: 5 additions & 2 deletions src/Linker.WebJob/ContainerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ private static ContainerBuilder RegisterOptions(this ContainerBuilder builder)
.GetSection(nameof(UrlHealthCheckOption))
.Get<UrlHealthCheckOption>();

builder.RegisterInstance(sqliteOptions).SingleInstance();
builder.RegisterInstance(urlHealthCheckOption).SingleInstance();
ArgumentNullException.ThrowIfNull(sqliteOptions);
ArgumentNullException.ThrowIfNull(urlHealthCheckOption);

builder.RegisterInstance(sqliteOptions);
builder.RegisterInstance(urlHealthCheckOption);

return builder;
}
Expand Down

0 comments on commit 4f9b923

Please sign in to comment.