예제 #1
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;

            //Initialize resource types
            ResourceTypes.Initialize();
        }
예제 #2
0
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                          .AddEnvironmentVariables();

            Configuration = builder.Build();

            //Initialize ResourceTypes
            ResourceTypes.Initialize();
            ActionTypes.Initialize();
        }
예제 #3
0
        public TestStartup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddInMemoryCollection(new Dictionary <string, string>
            {
                { "EventStore:Host", "" },
                { "EventStore:Stream", "test" }
            })
                          .AddEnvironmentVariables();

            Configuration = builder.Build();

            //Initialize resource types
            ResourceTypes.Initialize();
        }