Exemple #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            var options = new SegonaOptions();

            Configuration.GetSection("segona").Bind(options);

            services.AddMvc();
            services.AddSegona(x => x.Options = options);
        }
Exemple #2
0
        protected TestBase()
        {
            var configuration = new ConfigurationBuilder()
                                .SetBasePath(Directory.GetCurrentDirectory())
                                .AddJsonFile("appsettings.json")
                                .Build();

            Options = new SegonaOptions();
            configuration.GetSection("segona").Bind(Options);

            ConfigureServices();

            ConfigureLogging(Provider.GetService <ILoggerFactory>());
        }