public TesteBase(ITestOutputHelper saida) { this.Console = saida; ContainerDI.Inicializar(); //ConfiguracaoRecursos.AdicionarRecurso(typeof(Properties.Resources)); //Configuracao.DisplayNameExtrator = () => new DisplayNameExtratorPadrao(); }
public static void Main(string[] args) { var container = new ContainerDI(false); container.Registrar <IUnidadeTrabalho, UnityOfWorkFlashCard>(EscopoComponente.WebRequest); container.Registrar <TextFileToFlashCards, TextFileToFlashCards>(); container.Registrar <ICollectionFlashCardService, CollectionFlashCardService>(); container.FinalizarRegistros(); try { var importer = container.GetService <TextFileToFlashCards>(); importer.ProcessFolder(@"C:\tmp\LivrosEmTexto"); Console.WriteLine("Acabou"); } catch (Exception ex) { Console.WriteLine($"Erro: {ex.Message}"); } _ = Console.ReadLine(); }
/// <summary> /// Gets the database manager to execute T-SQL statements against it /// </summary> /// <returns></returns> protected void SetContainer(DatabaseServers dBServer = DatabaseServers.DB_DEMO) { var configurationName = this.Configuration["ENVIRONMENT"]; var keyName = $"{configurationName}:{dBServer.ToString()}"; var connection = this.Configuration[keyName]; var commandTimeout = this.Configuration["FRAMEWORK.COMMAND.TIMEOUT"].ToInt(); var connectionTimeout = this.Configuration["FRAMEWORK.CONNECTION.TIMEOUT"].ToInt(); var traceEnabled = this.Configuration["FRAMEWORK.TRACE.ENABLED"].ToBool(); var traceFilePath = this.Configuration["FRAMEWORK.TRACE.PATH"]; if (!traceEnabled) { traceFilePath = string.Empty; } connection = Cryptography.DecryptUsingTripleDES(connection); var databaseContext = new SQLDatabaseContext(connection, commandTimeout, connectionTimeout); var databaseRepository = new SQLDatabaseRepository(false, traceFilePath); container = new ContainerDI(databaseContext, databaseRepository); }
public UserBLL(ContainerDI container) : base(container) { }
public ClientBLL(ContainerDI container) : base(container) { }