Schrieb die Schnittstellen des Envelope Mail Service für das Senden und Senden von Zugangscode-Mails und injizierte Speicher-Cache.
This commit is contained in:
parent
42258cbbb8
commit
037ebfbe5c
@ -1,8 +1,13 @@
|
||||
using DigitalData.EmailProfilerDispatcher.Application.Contracts;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.EmailProfilerDispatcher.Application.Contracts;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Common;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts
|
||||
{
|
||||
public interface IEnvelopeMailService : IEmailOutService
|
||||
{
|
||||
Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType);
|
||||
Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,36 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.EmailProfilerDispatcher.Application.DTOs.EmailOut;
|
||||
using DigitalData.EmailProfilerDispatcher.Application.Services;
|
||||
using DigitalData.EmailProfilerDispatcher.Infrastructure.Contracts;
|
||||
using DigitalData.UserManager.Application;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Common;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
public class EnvelopeMailService : EmailOutService<Resource>, IEnvelopeMailService
|
||||
{
|
||||
public EnvelopeMailService(IEmailOutRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, IEmailTemplateService tempService) : base(repository, localizer, mapper)
|
||||
private readonly IEmailTemplateService _tempService;
|
||||
private readonly IMemoryCache _cache;
|
||||
|
||||
public EnvelopeMailService(IEmailOutRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, IEmailTemplateService tempService, IMemoryCache cache) : base(repository, localizer, mapper)
|
||||
{
|
||||
_tempService = tempService;
|
||||
_cache = cache;
|
||||
}
|
||||
|
||||
public Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto envelopeReceiverDto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -176,6 +176,8 @@ try
|
||||
builder.Services.AddScoped<IEnvelopeMailService, EnvelopeMailService>();
|
||||
builder.Services.AddDispatcher<EGDbContext, Resource>();
|
||||
|
||||
builder.Services.AddMemoryCache();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user