eliminates region sections

This commit is contained in:
BinaryAlley committed 2024-10-12 22:03:57 +03:00
1 parent 705c02b90d
commit 405fc1ff9a
370 files changed
+47 -1618

No files matched your search

@@ -19,11 +19,8 @@ namespace Lumina.DataAccess.Core.Repositories.Books;
/// </summary>
internal sealed class BookRepository : IBookRepository
{
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly LuminaDbContext _luminaDbContext;
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="BookRepository"/> class.
/// </summary>
@@ -32,9 +29,7 @@ internal sealed class BookRepository : IBookRepository
{
_luminaDbContext = luminaDbContext;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Adds a new book.
/// </summary>
@@ -77,5 +72,4 @@ internal sealed class BookRepository : IBookRepository
.Include(book => book.ISBNs)
.ToListAsync(cancellationToken).ConfigureAwait(false);
}
#endregion
}
@@ -5,12 +5,10 @@
/// </summary>
public interface IRepositoryFactory
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Creates a new repository of type <typeparamref name="TResult"/>.
/// </summary>
/// <typeparam name="TResult">The type of repository to create.</typeparam>
/// <returns>A repository of type <typeparamref name="TResult"/>.</returns>
TResult CreateRepository<TResult>() where TResult : notnull;
#endregion
}
@@ -12,18 +12,13 @@ namespace Lumina.DataAccess.Core.Repositories.Common.Factory;
/// </summary>
public class RepositoryDictionary
{
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly List<KeyValuePair<Type, object>> _container = [];
#endregion
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the number of added repositories.
/// </summary>
public int Count => _container.Count;
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Resets the collection of repositories.
/// </summary>
@@ -66,5 +61,4 @@ public class RepositoryDictionary
{
return (TResult)_container.FirstOrDefault(e => e.Key == key).Value;
}
#endregion
}
@@ -10,11 +10,8 @@ namespace Lumina.DataAccess.Core.Repositories.Common.Factory;
/// </summary>
public class RepositoryFactory : IRepositoryFactory
{
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly IServiceProvider _serviceProvider;
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="RepositoryFactory"/> class.
/// </summary>
@@ -23,9 +20,7 @@ public class RepositoryFactory : IRepositoryFactory
{
_serviceProvider = serviceProvider;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Creates a new repository of type <typeparamref name="TResult"/>.
/// </summary>
@@ -36,5 +31,4 @@ public class RepositoryFactory : IRepositoryFactory
{
return _serviceProvider.GetRequiredService<TResult>() ?? throw new ArgumentException();
}
#endregion
}