File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
WebApiClientCore/Attributes/ParameterAttributes Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,21 @@ public override Task OnRequestAsync(ApiParameterContext context)
3030 throw new ApiInvalidConfigException ( Resx . required_HttpHost ) ;
3131 }
3232
33- var keyValues = context . SerializeToKeyValues ( ) . CollectAs ( this . CollectionFormat ) ;
33+ var keyValues = this . SerializeToKeyValues ( context ) ;
3434 context . HttpContext . RequestMessage . RequestUri = this . CreateUri ( uri , keyValues ) ;
3535 return Task . CompletedTask ;
3636 }
3737
38+ /// <summary>
39+ /// 序列化参数为keyValue
40+ /// </summary>
41+ /// <param name="context">上下文</param>
42+ /// <returns></returns>
43+ protected virtual IEnumerable < KeyValue > SerializeToKeyValues ( ApiParameterContext context )
44+ {
45+ return context . SerializeToKeyValues ( ) . CollectAs ( this . CollectionFormat ) ;
46+ }
47+
3848 /// <summary>
3949 /// 创建新的uri
4050 /// </summary>
You can’t perform that action at this time.
0 commit comments