Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            ActorSystemInstance = new AkkaStateService(services);

            services.AddSingleton(typeof(AkkaStateService), ActorSystemInstance);

            services.AddMvc();

            services.AddServiceDiscovery(Configuration.GetSection("ServiceDiscovery"));
        }
Ejemplo n.º 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();

            ActorSystemInstance = new AkkaStateService();
        }