File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1- using System . Threading . Tasks ;
1+ using System . Collections . Generic ;
2+ using System . Threading . Tasks ;
23using Microsoft . Owin ;
34
45namespace TinyFox . FastWebApi
@@ -14,7 +15,7 @@ public abstract class BaseWebApi
1415 /// <summary>
1516 /// 请求(输入)对象
1617 /// </summary>
17- protected IOwinRequest Request ;
18+ protected IOwinRequest Request ;
1819
1920 /// <summary>
2021 /// 应答(输出)对象
@@ -31,6 +32,23 @@ public abstract class BaseWebApi
3132 /// </summary>
3233 protected HttpSession Session ;
3334
35+ /// <summary>
36+ /// 路由参数
37+ /// </summary>
38+ protected readonly IDictionary < string , string > RouteArgs = new Dictionary < string , string > ( ) ;
39+
40+
41+ /// <summary>
42+ /// 添加路由参数
43+ /// </summary>
44+ /// <param name="key"></param>
45+ /// <param name="value"></param>
46+ internal void AddRouteArgs ( string key , string value )
47+ {
48+ RouteArgs [ key ] = value ;
49+ }
50+
51+
3452 /// <summary>
3553 /// 处理请求
3654 /// </summary>
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public override Task Invoke(IOwinContext c)
5454 {
5555 var app = _router . RouteTo ( c ) ;
5656 if ( app == null ) return _next . Invoke ( c ) ;
57+
5758 return app . ProcessRequest ( c ) ;
5859 }
5960
You can’t perform that action at this time.
0 commit comments