File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ namespace ScriptCs.WebApi
8
8
{
9
9
public class WebApi : IScriptPackContext
10
10
{
11
- public HttpSelfHostServer CreateServer ( string baseAddress )
11
+
12
+ public HttpSelfHostServer CreateServer ( HttpSelfHostConfiguration config )
12
13
{
13
14
var caller = System . Reflection . Assembly . GetCallingAssembly ( ) ;
14
- var config = new HttpSelfHostConfiguration ( new Uri ( baseAddress ) ) ;
15
15
config . Services . Replace ( typeof ( IHttpControllerTypeResolver ) , new ControllerResolver ( caller ) ) ;
16
16
17
17
config . Routes . MapHttpRoute ( name : "DefaultApi" ,
@@ -20,5 +20,10 @@ public HttpSelfHostServer CreateServer(string baseAddress)
20
20
) ;
21
21
return new HttpSelfHostServer ( config ) ;
22
22
}
23
+
24
+ public HttpSelfHostServer CreateServer ( string baseAddress )
25
+ {
26
+ return CreateServer ( new HttpSelfHostConfiguration ( baseAddress ) ) ;
27
+ }
23
28
}
24
29
}
You can’t perform that action at this time.
0 commit comments