Esempio 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();
        }
Esempio n. 2
0
 public TokenController(IConfiguration config)
 {
     _config = config;
     os      = AnanasApplication.GetApplication().DefaultSubManager.CreateObjectSpace();
 }
Esempio n. 3
0
 public GoerksBaseController()
 {
     os = AnanasApplication.GetApplication().DefaultSubManager.CreateObjectSpace(true);
 }