public static void AddApresentacao(this IAbstractContainer container) { container.Register <IInformacaoSistema, InformacaoSistema>(); container.Register <IMainWindow, MainWindow>().PerSingleton(); container.Register <IMainLogin, MainLogin>().PerSingleton(); container.Register <IMainCommand, MainCommand>().PerSingleton(); container.Register <IMainMensagem, MainMensagem>().PerSingleton(); container.Register <IMenuLateral, ucMenuLateral>(); container.Register <ITituloSistema, ucTituloSistema>(); container.Register <IMenuResolver, MenuResolver>(); }
public static void AddRepositorioTests(this IAbstractContainer container) { container.Register <IAbstractDataContext, AbstractDataContext>(); container.Register <IAbstractDataContextDapper, AbstractDataContextDapper>(); container.Register <IReferenciaRepository, ReferenciaRepository>(); container.Register <ITipoRepository, TipoRepository>(); container.Register <ITesteRepository, TesteRepository>(); container.Register <ITipoRepositoryContext, TipoRepositoryContext>(); container.Register <ITipoRepositoryContextDapper, TipoRepositoryContextDapper>(); container.Register <IReferenciaService, ReferenciaService>(); container.Register <ITesteService, TesteService>(); container.Register <ITipoService, TipoService>(); }
private static void InstallAssembly(IAbstractContainer container, Assembly assembly) { if (assembly == null) { return; } Logger.Debug($"assembly.FullName: {assembly.FullName}"); ClassesAssembly .GetTypes(assembly, (x) => x.Name.EndsWith("BaseInstaller")) .ForEach(type => { Logger.Debug($"type.FullName: {type.FullName}"); var method = type.GetMethods().FirstOrDefault(m => m.Name.StartsWith("Add")); Logger.Debug($"method.Name: {method.Name}"); ClasseExecute.Execute(type, method.Name, new[] { container }); }); }
public static void AddInstaller(this IAbstractContainer container) { ClearAssembly(); AddAssembly(Assembly.GetCallingAssembly()); AddAssembly(Assembly.GetEntryAssembly()); AddAssembly(Assembly.GetExecutingAssembly()); FilesAssembly .GetAssemblies(null, (x) => IsContainName(x) && !IsContainLocation(x)) .ForEach(assembly => AddAssembly(assembly)) ; var assemblies = _assemblies.ToArray(); foreach (var assembly in assemblies) { try { InstallAssembly(container, assembly); } catch (Exception ex) { Logger.Debug("erro install", ex: ex); } } }
public TelaUtils() { Container = AbstractContainer.Instance; }
public AbstractDependencyScope(IAbstractContainer container) { _container = container ?? throw new ArgumentNullException("container"); _scope = container.BeginScope(); }
public static void AddDatabaseTests(this IAbstractContainer container) { }
public AbstractDependencyResolver(IAbstractContainer container) { _container = container ?? throw new ArgumentNullException("container"); }
public static void AddRepositorioDapper(this IAbstractContainer container) { container.Register <IAbstractDataContextDapper, AbstractDataContextDapper>(); }