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.
19 lines
524 B
C#
19 lines
524 B
C#
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;
|
|
}
|
|
}
|