Browse Source

Apewer-6.7.1

dev
王厅 3 years ago
parent
commit
2dc4725495
  1. 2
      Apewer/Apewer.props
  2. 8
      Apewer/Network/HttpClient.cs
  3. 13
      Apewer/RuntimeUtility.cs
  4. 4
      Apewer/Source/SourceUtility.cs
  5. 2
      Apewer/Web/MiniConnection.cs
  6. 8
      ChangeLog.md

2
Apewer/Apewer.props

@ -9,7 +9,7 @@
<Description></Description>
<RootNamespace>Apewer</RootNamespace>
<Product>Apewer Libraries</Product>
<Version>6.7.0</Version>
<Version>6.7.1</Version>
</PropertyGroup>
<!-- 生成 -->

8
Apewer/Network/HttpClient.cs

@ -25,6 +25,12 @@ namespace Apewer.Network
/// <summary>获取进度的块大小,以字节为单位,默认值:1024(1KB)。</summary>
public int Block { get => _block; set => NumberUtility.Restrict(value, 1, 1048576); }
/// <summary>构建 <see cref="HttpClient"/> 的实例。</summary>
public HttpClient()
{
RequestHeaders = new StringPairs();
}
#region request
/// <summary>获取或设置将要请求的方法,默认为 GET。</summary>
@ -260,7 +266,7 @@ namespace Apewer.Network
var body = request.GetRequestStream();
BytesUtility.Read(stream, body, RequestProgress, Block);
}
else
else if (data != null)
{
request.ContentLength = data.LongLength;
var body = request.GetRequestStream();

13
Apewer/RuntimeUtility.cs

@ -794,9 +794,16 @@ namespace Apewer
if (action == null) return 0;
var stopwatch = new Stopwatch();
stopwatch.Start();
action.Invoke();
stopwatch.Stop();
return stopwatch.ElapsedMilliseconds;
try
{
action.Invoke();
stopwatch.Stop();
return stopwatch.ElapsedMilliseconds;
}
finally
{
stopwatch.Stop();
}
}
#endregion

4
Apewer/Source/SourceUtility.cs

@ -403,7 +403,7 @@ namespace Apewer.Source
if (name.IsEmpty()) continue;
// 属性不可重复。
if (!name.EndsWith("@")) name = "@" + name;
if (!name.StartsWith("@")) name = "@" + name;
if (dict.ContainsKey(name)) continue;
// SQL 语句中必须包含此参数。
@ -440,7 +440,7 @@ namespace Apewer.Source
if (name.IsEmpty()) continue;
// 属性不可重复。
if (!name.EndsWith("@")) name = "@" + name;
if (!name.StartsWith("@")) name = "@" + name;
if (names.Contains(name)) continue;
// SQL 语句中必须包含此参数。

2
Apewer/Web/MiniConnection.cs

@ -524,7 +524,7 @@ namespace Apewer.Web
}
// redirect
if (location != null) lines.Add($"Location: {lines}");
if (location != null) lines.Add($"Location: {location}");
// content-type
var contentType = response.ContentType;

8
ChangeLog.md

@ -1,6 +1,14 @@

### 最新提交
### 6.7.1
- 问题修正
- 修正了 Evaluate 可能不释放计时器的问题;
- 修正了 MiniServer 的 302 响应;
- 修正了 HttpClient.RequestData 为 NULL 时的报错;
- 修正了 HttpClient.RequestHeaders 为 NULL 时的报错;
- 修正了 Query<T> 使用字典传参时的 @ 错误。
### 6.7.0
- 大更新
- Result 模型已完全删除,使用 Result 的程序现在已经改为抛出异常,解决程序返回值混乱的问题;

Loading…
Cancel
Save