fork download
  1. public Startup(IHostingEnvironment env)
  2. {
  3. var builder = new ConfigurationBuilder()
  4. .SetBasePath(env.ContentRootPath)
  5. .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
  6. .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
  7. .AddEnvironmentVariables();
  8.  
  9. if (env.IsDevelopment())
  10. {
  11. // This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately.
  12. builder.AddApplicationInsightsSettings(developerMode: true);
  13. }
  14. Configuration = builder.Build();
  15. }
  16.  
  17. public IConfigurationRoot Configuration { get; }
  18.  
  19. // This method gets called by the runtime. Use this method to add services to the container.
  20. public void ConfigureServices(IServiceCollection services)
  21. {
  22. // Add framework services.
  23. services.AddApplicationInsightsTelemetry(Configuration);
  24. services.AddMvc();
  25. services.AddSingleton(Configuration);
  26. services.AddIdentity<User, IdentityRole>()
  27. .AddEntityFrameworkStores<ResultsContext>();
  28. services.AddDbContext<ResultsContext>(option => option.UseSqlServer(Configuration.GetConnectionString("DartuConnection")));
  29. services.AddScoped<IParticipantResultsRepository, ParticipantResultsRepository>();
  30. }
  31.  
  32. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
  33. public void Configure(IApplicationBuilder app, IHostingEnvironment env,
  34. ILoggerFactory loggerFactory)
  35. {
  36. loggerFactory.AddConsole(Configuration.GetSection("Logging"));
  37. loggerFactory.AddDebug();
  38.  
  39. app.UseApplicationInsightsRequestTelemetry();
  40.  
  41. if (env.IsDevelopment())
  42. {
  43. app.UseDeveloperExceptionPage();
  44. app.UseBrowserLink();
  45. }
  46. else
  47. {
  48. app.UseExceptionHandler("/Home/Error");
  49. }
  50.  
  51. app.UseApplicationInsightsExceptionTelemetry();
  52. app.UseStaticFiles();
  53. //app.UseNodeModules(env);
  54. app.UseIdentity();
  55.  
  56. app.UseMvc(routes =>
  57. {
  58. routes.MapRoute(
  59. name: "default",
  60. template: "{controller=Home}/{action=Index}/{id?}");
  61. });
  62. }
  63. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,8): error CS1525: Unexpected symbol `Startup', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty