Ejemplo n.º 1
0
        private void ConfigureAnanas()
        {
            IConfigurationRoot configuration = new ConfigurationBuilder()
                                               .SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
                                               .AddJsonFile("appsettings.json")
                                               .Build();

            var                   types            = CollectTypes();
            string                connectionString = configuration.GetConnectionString("SQLiteDB");
            AnanasApplication     app           = AnanasApplication.GetApplication();
            ApplicationSubManager sqlitemanager = new ApplicationSubManager(new DependencyConfigurationSQLite(), connectionString);

            app.RegisterApplicationSubManager("localManager", sqlitemanager, true);

            foreach (var type in types)
            {
                sqlitemanager.RegisterType(type);
            }

            app.Start();
        }
Ejemplo n.º 2
0
 public TokenController(IConfiguration config)
 {
     _config = config;
     os      = AnanasApplication.GetApplication().DefaultSubManager.CreateObjectSpace();
 }
Ejemplo n.º 3
0
 public GoerksBaseController()
 {
     os = AnanasApplication.GetApplication().DefaultSubManager.CreateObjectSpace(true);
 }