예제 #1
0
        public IndexingTaskManager(
            IClock clock,
            ShellSettings shellSettings,
            IDbConnectionAccessor dbConnectionAccessor,
            ILogger <IndexingTaskManager> logger)
        {
            _clock = clock;
            _dbConnectionAccessor = dbConnectionAccessor;
            Logger = logger;

            _tablePrefix = shellSettings["TablePrefix"];

            if (!String.IsNullOrEmpty(_tablePrefix))
            {
                _tablePrefix += '_';
            }
        }
예제 #2
0
 public NotificationRepositoryDapper(IDbConnectionAccessor dbConnectionAccessor, IStore store, ILogger <Notification> logger, ShellSettings shellSettings) : base(dbConnectionAccessor, store, logger, shellSettings)
 {
 }
예제 #3
0
 public ProductController(IDbConnectionAccessor dbAccessor, ShellSettings settings)
 {
     _dbAccessor  = dbAccessor;
     _tablePrefix = settings["TablePrefix"];
 }
예제 #4
0
 public HomeController(IStore store, IDbConnectionAccessor accessor)
 {
     _uow = new NHibernateUnitOfWork(store, accessor);
 }
예제 #5
0
 public DirectSqlStep(ISiteService siteService, IDbConnectionAccessor dbAccessor)
 {
     _siteService = siteService;
     _dbAccessor  = dbAccessor;
 }
        public SettingsService(
            ISiteService siteService,
            IDbConnectionAccessor dbConnectionAccessor,
            IStore store
            )
        {
            _dbConnectionAccessor = dbConnectionAccessor;
            _store = store;

            using (MiniProfiler.Current.Step("Common Settings Setup")) {
                var result = siteService.GetSiteSettingsAsync().Result;
                Settings = result.As <TransformalizeSettings>();

                if (Settings.CommonArrangement == string.Empty)
                {
                    Process       = new Process();
                    ProcessFacade = new Transformalize.ConfigurationFacade.Process();
                }
                else
                {
                    Process       = new Process(Settings.CommonArrangement);
                    ProcessFacade = new Transformalize.ConfigurationFacade.Process(Settings.CommonArrangement);
                }

                // parameters
                foreach (var parameter in Process.Parameters)
                {
                    Parameters.Add(parameter.Name, parameter);
                }
                foreach (var parameter in ProcessFacade.Parameters)
                {
                    ParametersFacade.Add(parameter.Name, parameter);
                }

                // maps
                foreach (var map in Process.Maps)
                {
                    Maps.Add(map.Name, map);
                }
                foreach (var map in ProcessFacade.Maps)
                {
                    MapsFacade.Add(map.Name, map);
                }

                // actions
                foreach (var action in Process.Actions)
                {
                    Actions.Add(action.Name, action);
                }
                foreach (var action in ProcessFacade.Actions)
                {
                    ActionsFacade.Add(action.Name, action);
                }

                // connections
                foreach (var connection in Process.Connections)
                {
                    Connections.Add(connection.Name, connection);
                }
                foreach (var connection in ProcessFacade.Connections)
                {
                    ConnectionsFacade.Add(connection.Name, connection);
                }

                // fields
                if (Process.Entities.Any())
                {
                    foreach (var field in Process.Entities.First().Fields)
                    {
                        Fields.Add(field.Name, field);
                    }
                }
                if (ProcessFacade.Entities.Any())
                {
                    foreach (var field in ProcessFacade.Entities.First().Fields)
                    {
                        FieldsFacade.Add(field.Name, field);
                    }
                }
            }
        }
예제 #7
0
 public CommentRepositoryDapper(IDbConnectionAccessor dbConnectionAccessor, IStore store, ILogger <CommentRecord> logger, ShellSettings shellSettings) : base(dbConnectionAccessor, store, logger, shellSettings)
 {
 }