Fixing the unity container

This commit is contained in:
Zoe Roux
2021-05-01 02:30:57 +02:00
parent c0f1f80a40
commit 36220613ab
12 changed files with 179 additions and 64 deletions
+1 -2
View File
@@ -32,8 +32,7 @@ namespace Kyoo.Controllers
/// A list of services that are provided by this service. This allow other plugins to declare dependencies.
/// </summary>
/// <remarks>
/// You should put directly the type that you will register in configure, Kyoo will detect by itself which
/// interfaces are implemented by your type.
/// You should put the type's interface that will be register in configure.
/// </remarks>
Type[] Provides { get; }
@@ -40,7 +40,7 @@ namespace Kyoo.Controllers
/// <summary>
/// Create a new <see cref="LibraryManager"/> instancce with every repository available.
/// Create a new <see cref="LibraryManager"/> instance with every repository available.
/// </summary>
/// <param name="repositories">The list of repositories that this library manager should manage.
/// If a repository for every base type is not available, this instance won't be stable.</param>
@@ -66,7 +66,7 @@ namespace Kyoo.Controllers
{
if (_repositories.FirstOrDefault(x => x.RepositoryType == typeof(T)) is IRepository<T> ret)
return ret;
throw new ItemNotFoundException();
throw new ItemNotFoundException($"No repository found for the type {typeof(T).Name}.");
}
/// <inheritdoc />