Skip to content

Commit 0457468

Browse files
committed
去掉sealed修饰
1 parent da185d5 commit 0457468

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

WebApiClient/Attributes/HttpActionAttributes/HttpMethodAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace WebApiClient.Attributes
1111
/// </summary>
1212
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
1313
[DebuggerDisplay("Method = {Method}")]
14-
public abstract class HttpMethodAttribute : ApiActionAttribute
14+
public class HttpMethodAttribute : ApiActionAttribute
1515
{
1616
/// <summary>
1717
/// 获取请求方法

WebApiClient/Attributes/ParameterAttributes/PathQueryAttribute.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace WebApiClient.Attributes
1414
/// 没有任何特性修饰的参数,将默认被PathQueryAttribute修饰
1515
/// </summary>
1616
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
17-
public sealed class PathQueryAttribute : Attribute, IApiParameterAttribute
17+
public class PathQueryAttribute : Attribute, IApiParameterAttribute
1818
{
1919
/// <summary>
2020
/// 编码
@@ -91,12 +91,12 @@ public async Task BeforeRequestAsync(ApiActionContext context, ApiParameterDescr
9191
}
9292

9393
/// <summary>
94-
/// url添加query
94+
/// url添加query或替换segment
9595
/// </summary>
9696
/// <param name="url">url</param>
9797
/// <param name="keyValues">键值对</param>
9898
/// <returns></returns>
99-
private string UsePathQuery(string url, IEnumerable<KeyValuePair<string, string>> keyValues)
99+
protected string UsePathQuery(string url, IEnumerable<KeyValuePair<string, string>> keyValues)
100100
{
101101
foreach (var keyValue in keyValues)
102102
{
@@ -106,12 +106,12 @@ private string UsePathQuery(string url, IEnumerable<KeyValuePair<string, string>
106106
}
107107

108108
/// <summary>
109-
/// url添加query
109+
/// url添加query或替换segment
110110
/// </summary>
111111
/// <param name="url">url</param>
112112
/// <param name="keyValue">键值对</param>
113113
/// <returns></returns>
114-
private string UsePathQuery(string url, KeyValuePair<string, string> keyValue)
114+
protected string UsePathQuery(string url, KeyValuePair<string, string> keyValue)
115115
{
116116
var key = keyValue.Key;
117117
var value = keyValue.Value ?? string.Empty;

0 commit comments

Comments
 (0)