// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { var nostradamusPrecalc = new NostradamusPrecalc(); services.AddSingleton(nostradamusPrecalc); services.AddScoped <Lefty>(); services.AddScoped <Spinner>(); services.AddScoped <Brainiac>(); services.AddScoped <Nostradamus>(); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); }
public void Setup() { this.precalc = new NostradamusPrecalc(); this.brain = new Nostradamus(this.precalc); }