Example #1
0
        public virtual void ConfigureServices(IServiceCollection services)
        {
            var dbContext = ConfigurationController.GetDatabaseContext(Configuration);

            services.AddSingleton(new DatabaseController(dbContext));

            services.AddControllers();
            services.AddAuthentication("BasicAuthentication").AddScheme <AuthenticationSchemeOptions, BasicAuthenticationHandler>("BasicAuthentication", null);
        }
Example #2
0
        public InfoResult GetInfo()
        {
            var information = ConfigurationController.GetInformation(_configuration);

            return(new InfoResult(information.Title, information.Description, Assembly.GetEntryAssembly()?.GetName().Version?.ToString() ?? "Unkown"));
        }