Exemplo n.º 1
0
        public ApiAdapter(IDataBaseManagerFactory dbEngine, string address, string port, string table, string login, string password)
        {
            DbManager   = new DatabaseManager(dbEngine, address, port, table, login, password);
            DbConnector = new DbConnector(DbManager);

            LanguageAdapter                = new LanguageAdapter(DbConnector);
            UserAdapter                    = new UserAdapter(DbConnector);
            UserDetailsAdapter             = new UserDetailsAdapter(DbConnector);
            TransactionTypeAdapter         = new TransactionTypeAdapter(DbConnector);
            TransferTypeAdapter            = new TransferTypeAdapter(DbConnector);
            FrequencyAdapter               = new FrequencyAdapter(DbConnector);
            ImportanceAdapter              = new ImportanceAdapter(DbConnector);
            TagAdapter                     = new TagAdapter(DbConnector);
            OperationAdapter               = new OperationAdapter(DbConnector);
            OperationDetailsAdapter        = new OperationDetailsAdapter(DbConnector);
            OperationTagRelationAdapter    = new OperationTagAdapter(DbConnector);
            OperationsGroupAdapter         = new OperationsGroupAdapter(DbConnector);
            OperationsGroupRelationAdapter = new OperationsGroupTagAdapter(DbConnector);
            FilterAdapter                  = new FilterAdapter(DbConnector);
            DashboardAdapter               = new DashboardAdapter(DbConnector);
            DashboardFilterRelationAdapter = new DashboardFilterRelationAdapter(DbConnector);
            BankAdapter                    = new BankAdapter(DbConnector);
            SettingsAdapter                = new SettingsAdapter(DbConnector);
            SchematicTypeAdapter           = new SchematicTypeAdapter(DbConnector);
            SchematicAdapter               = new SchematicAdapter(DbConnector);

            LanguageMapper        = new LanguageMapper();
            UserMapper            = new UserMapper();
            UserDetailsMapper     = new UserDetailsMapper();
            TransactionTypeMapper = new TransactionTypeMapper();
            TransferTypeMapper    = new TransferTypeMapper();
            FrequencyMapper       = new FrequencyMapper();
            ImportanceMapper      = new ImportanceMapper();
            TagMapper             = new TagMapper();
            TagRelationMapper     = new RelationTagMapper();
            OperationMapper       = new OperationMapper();
            OperationsGroupMapper = new OperationsGroupMapper();
            FilterMapper          = new FilterMapper();
            DashboardMapper       = new DashboardMapper();
            DashboardFilterMapper = new DashboardFilterMapper();
            BankMapper            = new BankMapper();
            SettingsMapper        = new SettingsMapper();
            SchematicTypeMapper   = new SchematicTypeMapper();
            SchematicMapper       = new SchematicMapper();
        }
Exemplo n.º 2
0
        public static void SetService()
        {
            Settings = new Settings2();

            var dataBaseData = ConfigurationManager.DataBaseData();

            DbManager   = new DatabaseManager(new MySqlConnectionFactory(), dataBaseData.Address, dataBaseData.Port, dataBaseData.Table, dataBaseData.Login, dataBaseData.Password);
            DbConnector = new DbConnector(DbManager);

            LanguageAdapter                = new LanguageAdapter(DbConnector);
            UserAdapter                    = new UserAdapter(DbConnector);
            UserDetailsAdapter             = new UserDetailsAdapter(DbConnector);
            TransactionTypeAdapter         = new TransactionTypeAdapter(DbConnector);
            TransferTypeAdapter            = new TransferTypeAdapter(DbConnector);
            FrequencyAdapter               = new FrequencyAdapter(DbConnector);
            ImportanceAdapter              = new ImportanceAdapter(DbConnector);
            TagAdapter                     = new TagAdapter(DbConnector);
            OperationAdapter               = new OperationAdapter(DbConnector);
            OperationDetailsAdapter        = new OperationDetailsAdapter(DbConnector);
            OperationTagRelationAdapter    = new OperationTagAdapter(DbConnector);
            OperationsGroupAdapter         = new OperationsGroupAdapter(DbConnector);
            OperationsGroupRelationAdapter = new OperationsGroupTagAdapter(DbConnector);

            LanguageMapper                = new LanguageMapper();
            UserMapper                    = new UserMapper();
            UserDetailsMapper             = new UserDetailsMapper();
            TransactionTypeMapper         = new TransactionTypeMapper();
            TransferTypeMapper            = new TransferTypeMapper();
            FrequencyMapper               = new FrequencyMapper();
            ImportanceMapper              = new ImportanceMapper();
            TagMapper                     = new TagMapper();
            OperationMapper               = new OperationMapper();
            OperationDetailsMapper        = new OperationDetailsMapper();
            RelationMapper                = new RelationMapper();
            OperationsGroupMapper         = new OperationsGroupMapper();
            OperationsGroupRelationMapper = new OperationsGroupRelationMapper();

            SetMainConfigurations();
        }