#region ========================================================================= USING =====================================================================================
using Nemera.Plugins.Contracts.Core.Reading;
using Nemera.Plugins.Epub.Core;
using Microsoft.Extensions.DependencyInjection;
using System;
#endregion
namespace Nemera.Plugins.Epub.Common.DependencyInjection;
///
/// Utility class for registering the services of the EPUB format reader into the Dependency Injection container.
///
internal static class EpubServices
{
///
/// Registers the services of the EPUB format reader into the Dependency Injection container.
///
/// The service collection to add the services to.
/// The unique identifier of the plugin that provides the book reader.
/// The updated .
internal static IServiceCollection AddEpubReader(this IServiceCollection services, Guid pluginId)
{
ArgumentNullException.ThrowIfNull(services);
// Register the book reader as a keyed by pluginId transient service, so it can be resolved specifically among other IBookReader implementations.
services.AddKeyedTransient(pluginId);
return services;
}
}