Refactor IPdfPageImageRenderer registration
Encapsulated the registration of IPdfPageImageRenderer into a new AddDocInfrastructure extension method in the DependencyInjection class within the EnvelopeGenerator.Infrastructure.Doc namespace. Updated Program.cs to use the AddDocInfrastructure method, improving modularity and centralizing the service registration logic.
This commit is contained in:
18
EnvelopeGenerator.Infrastructure.Doc/DependencyInjection.cs
Normal file
18
EnvelopeGenerator.Infrastructure.Doc/DependencyInjection.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Doc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EnvelopeGenerator.Infrastructure.Doc;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddDocInfrastructure(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IPdfPageImageRenderer, PdfPageImageRenderer>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user