File tree 4 files changed +14
-13
lines changed
Attributes/ParameterAttributes
WebApiClientCore.Extensions.OAuths
4 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace WebApiClientCore.Extensions.OAuths.TokenProviders
9
9
/// <summary>
10
10
/// 表示Token提供者抽象类
11
11
/// </summary>
12
- public abstract class TokenProvider : Disposable , ITokenProvider
12
+ public abstract class TokenProvider : ITokenProvider
13
13
{
14
14
/// <summary>
15
15
/// 最近请求到的token
@@ -108,15 +108,6 @@ public async Task<TokenResult> GetTokenAsync()
108
108
/// <returns></returns>
109
109
protected abstract Task < TokenResult ? > RefreshTokenAsync ( IServiceProvider serviceProvider , string refresh_token ) ;
110
110
111
- /// <summary>
112
- /// 释放资源
113
- /// </summary>
114
- /// <param name="disposing"></param>
115
- protected override void Dispose ( bool disposing )
116
- {
117
- this . asyncRoot . Dispose ( ) ;
118
- }
119
-
120
111
/// <summary>
121
112
/// 转换为string
122
113
/// </summary>
Original file line number Diff line number Diff line change 8
8
<SignAssembly >true</SignAssembly >
9
9
<AssemblyOriginatorKeyFile >Sign.snk</AssemblyOriginatorKeyFile >
10
10
11
- <Version >1.1.2 </Version >
11
+ <Version >1.1.3 </Version >
12
12
<Authors >laojiu</Authors >
13
13
<Company >laojiu</Company >
14
14
<Copyright >Copyright © laojiu 2017-2020</Copyright >
Original file line number Diff line number Diff line change @@ -30,11 +30,21 @@ public override Task OnRequestAsync(ApiParameterContext context)
30
30
throw new ApiInvalidConfigException ( Resx . required_HttpHost ) ;
31
31
}
32
32
33
- var keyValues = context . SerializeToKeyValues ( ) . CollectAs ( this . CollectionFormat ) ;
33
+ var keyValues = this . SerializeToKeyValues ( context ) ;
34
34
context . HttpContext . RequestMessage . RequestUri = this . CreateUri ( uri , keyValues ) ;
35
35
return Task . CompletedTask ;
36
36
}
37
37
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
+
38
48
/// <summary>
39
49
/// 创建新的uri
40
50
/// </summary>
Original file line number Diff line number Diff line change 5
5
<TargetFramework >netstandard2.1</TargetFramework >
6
6
<DocumentationFile >bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile >
7
7
8
- <Version >1.1.2 </Version >
8
+ <Version >1.1.3 </Version >
9
9
<Authors >laojiu</Authors >
10
10
<Company >laojiu</Company >
11
11
<Copyright >Copyright © laojiu 2017-2020</Copyright >
You can’t perform that action at this time.
0 commit comments