@@ -1,4 +1,5 @@
using ComputerHardwareStoreBusinessLogic.BusinessLogic ;
using ComputerHardwareStoreContracts.BindingModels ;
using ComputerHardwareStoreContracts.BusinessLogicsContracts ;
using ComputerHardwareStoreContracts.StorageContracts ;
using ComputerHardwareStoreDatabaseImplement.Implements ;
@@ -35,16 +36,16 @@ builder.Services.AddTransient<IStoreKeeperLogic, StoreKeeperLogic>();
builder . Services . AddEndpointsApiExplorer ( ) ;
builder . Services . AddSwaggerGen ( ) ;
var app = builder . Build ( ) ;
var mailSender = app . Services. GetService< AbstractMailWorker> ( ) ;
mailSender? . MailConfig( new MailConfigBindingModel
{
MailLogin = builder. Configuration? . GetSection( "MailLogin") ? . Value ? . ToString ( ) ? ? string. Empty ,
MailPassword = builder. Configuration? . GetSection( "MailPassword") ? . Value ? . ToString ( ) ? ? string. Empty ,
SmtpClientHost = builder. Configuration? . GetSection( "SmtpClientHost") ? . Value ? . ToString ( ) ? ? string. Empty ,
SmtpClientPort = Convert. ToInt32( builder. Configuration? . GetSection( "SmtpClientPort") ? . Value ? . ToString ( ) ) ,
PopHost = builder. Configuration? . GetSection( "PopHost") ? . Value ? . ToString ( ) ? ? string. Empty ,
PopPort = Convert. ToInt32( builder. Configuration? . GetSection( "PopPort") ? . Value ? . ToString ( ) )
} ) ;
//var mailSender = app. Services. GetService< AbstractMailWorker>() ;
// mailSender?. MailConfig(new MailConfigBindingModel
// {
// MailLogin = builder. Configuration?. GetSection( "MailLogin")?.Value?.ToString() ?? string. Empty,
// MailPassword = builder. Configuration?. GetSection( "MailPassword")?.Value?.ToString() ?? string. Empty,
// SmtpClientHost = builder. Configuration?. GetSection( "SmtpClientHost")?.Value?.ToString() ?? string. Empty,
// SmtpClientPort = Convert. ToInt32( builder. Configuration?. GetSection( "SmtpClientPort")?.Value?.ToString()) ,
// PopHost = builder. Configuration?. GetSection( "PopHost")?.Value?.ToString() ?? string. Empty,
// PopPort = Convert. ToInt32( builder. Configuration?. GetSection( "PopPort")?.Value?.ToString() )
//}) ;
// Configure the HTTP request pipeline.
if ( app . Environment . IsDevelopment ( ) )
{