This commit is contained in:
nsnail 2022-12-12 20:17:46 +08:00
parent b3f0347d54
commit 4d1a6e6e4e
3 changed files with 4 additions and 4 deletions

View File

@ -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 // , long startPos, long endPos //
, Action<int> rateHandle) , Action<int> rateHandle)
{ {
@ -167,7 +167,7 @@ public partial class Main : ToolBase<Option>
// ReSharper disable once AccessToDisposedClosure // ReSharper disable once AccessToDisposedClosure
using var getRsp using var getRsp
= http.Send(getReq, HttpCompletionOption.ResponseHeadersRead); = http.Send(getReq, HttpCompletionOption.ResponseHeadersRead);
WriteParts(getRsp, mainFilePath, startPos, endPos, x => { WritePart(getRsp, mainFilePath, startPos, endPos, x => {
tChild.Increment(x); tChild.Increment(x);
tParent.Increment(x); tParent.Increment(x);
}); });

View File

@ -5,7 +5,7 @@ public class Option : OptionBase
[CommandOption("-b|--buffer-size")] [CommandOption("-b|--buffer-size")]
[Description(nameof(Str.BufferSize))] [Description(nameof(Str.BufferSize))]
[Localization(typeof(Str))] [Localization(typeof(Str))]
[DefaultValue(8)] [DefaultValue(8096)]
public int BufferSize { get; set; } public int BufferSize { get; set; }
[CommandOption("-c|--chunk-number")] [CommandOption("-c|--chunk-number")]

View File

@ -21,7 +21,7 @@ app.Configure(config => {
config.AddCommand<Dot.Text.Main>(nameof(Dot.Text).ToLower()); config.AddCommand<Dot.Text.Main>(nameof(Dot.Text).ToLower());
config.AddCommand<Dot.Time.Main>(nameof(Dot.Time).ToLower()); config.AddCommand<Dot.Time.Main>(nameof(Dot.Time).ToLower());
config.AddCommand<Dot.ToLf.Main>(nameof(Dot.ToLf).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(); config.ValidateExamples();