mirror of
https://github.com/nsnail/dot.git
synced 2025-06-17 13:03:22 +08:00
<fix>
This commit is contained in:
parent
b3f0347d54
commit
4d1a6e6e4e
@ -83,7 +83,7 @@ public partial class Main : ToolBase<Option>
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteParts(HttpResponseMessage rsp, string mainFilePath //
|
||||
private void WritePart(HttpResponseMessage rsp, string mainFilePath //
|
||||
, long startPos, long endPos //
|
||||
, Action<int> rateHandle)
|
||||
{
|
||||
@ -167,7 +167,7 @@ public partial class Main : ToolBase<Option>
|
||||
// ReSharper disable once AccessToDisposedClosure
|
||||
using var getRsp
|
||||
= http.Send(getReq, HttpCompletionOption.ResponseHeadersRead);
|
||||
WriteParts(getRsp, mainFilePath, startPos, endPos, x => {
|
||||
WritePart(getRsp, mainFilePath, startPos, endPos, x => {
|
||||
tChild.Increment(x);
|
||||
tParent.Increment(x);
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ public class Option : OptionBase
|
||||
[CommandOption("-b|--buffer-size")]
|
||||
[Description(nameof(Str.BufferSize))]
|
||||
[Localization(typeof(Str))]
|
||||
[DefaultValue(8)]
|
||||
[DefaultValue(8096)]
|
||||
public int BufferSize { get; set; }
|
||||
|
||||
[CommandOption("-c|--chunk-number")]
|
||||
|
@ -21,7 +21,7 @@ app.Configure(config => {
|
||||
config.AddCommand<Dot.Text.Main>(nameof(Dot.Text).ToLower());
|
||||
config.AddCommand<Dot.Time.Main>(nameof(Dot.Time).ToLower());
|
||||
config.AddCommand<Dot.ToLf.Main>(nameof(Dot.ToLf).ToLower());
|
||||
config.AddCommand<Dot.Get.Main>("get");
|
||||
config.AddCommand<Dot.Get.Main>(nameof(Dot.Get).ToLower());
|
||||
|
||||
|
||||
config.ValidateExamples();
|
||||
|
Loading…
x
Reference in New Issue
Block a user