11using System ;
2- using System . Collections . Generic ;
3- using System . Collections . Specialized ;
42using System . IO ;
3+ using System . Collections . Generic ;
54using System . Linq ;
6- using System . Net ;
7- using System . Reflection ;
85using System . Threading . Tasks ;
96using Microsoft . AspNetCore . Builder ;
107using Microsoft . AspNetCore . Hosting ;
118using Microsoft . AspNetCore . Http ;
129using Microsoft . Extensions . DependencyInjection ;
13- using Microsoft . Extensions . Logging ;
10+
11+ using Funq ;
1412using ServiceStack ;
1513using ServiceStack . Logging ;
16- using Funq ;
1714using ServiceStack . Host ;
1815using ServiceStack . Text ;
19-
20- using Microsoft . AspNetCore . Http . Extensions ;
21- using Microsoft . AspNetCore . Http . Internal ;
22- using Microsoft . Extensions . Primitives ;
2316using ServiceStack . Api . Swagger ;
2417using ServiceStack . Metadata ;
2518using ServiceStack . Web ;
@@ -29,32 +22,25 @@ namespace ServiceStack.Core.SelfHost
2922 public class Startup
3023 {
3124 // This method gets called by the runtime. Use this method to add services to the container.
32- // For more information on how to configure your application, visit http ://go.microsoft.com/fwlink/?LinkID=398940
25+ // For more information on how to configure your application, visit https ://go.microsoft.com/fwlink/?LinkID=398940
3326 public void ConfigureServices ( IServiceCollection services )
3427 {
3528 }
3629
3730 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
38- public void Configure ( IApplicationBuilder app , IHostingEnvironment env , ILoggerFactory loggerFactory )
31+ public void Configure ( IApplicationBuilder app , IHostingEnvironment env )
3932 {
40- loggerFactory . AddConsole ( ) ;
41-
42- if ( env . IsDevelopment ( ) )
43- {
44- app . UseDeveloperExceptionPage ( ) ;
45- }
33+ app . UseDeveloperExceptionPage ( ) ;
4634
4735 app . UseServiceStack ( new AppHost ( ) ) ;
4836
49- app . Run ( async context =>
37+ app . Run ( async ( context ) =>
5038 {
51- context . Request . EnableRewind ( ) ;
52- await context . Response . WriteAsync ( "Hello World!!!" ) ;
39+ await context . Response . WriteAsync ( "Hello World!" ) ;
5340 } ) ;
5441 }
5542 }
5643
57-
5844 [ Route ( "/hello" ) ]
5945 [ Route ( "/hello/{Name}" ) ]
6046 public class Hello : IReturn < HelloResponse >
@@ -126,7 +112,7 @@ public class UploadStreamResponse { }
126112 public class AppHost : AppHostBase
127113 {
128114 public AppHost ( )
129- : base ( ".NET Core Test" , typeof ( MyServices ) . GetTypeInfo ( ) . Assembly ) { }
115+ : base ( ".NET Core Test" , typeof ( MyServices ) . GetAssembly ( ) ) { }
130116
131117 public override void Configure ( Container container )
132118 {
0 commit comments