Skip to content

Commit 1c3610e

Browse files
committed
Merge branch 'release/5.1.0'
2 parents f1a1e5c + 5a77445 commit 1c3610e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5594
-5223
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"cake.tool": {
6-
"version": "1.1.0",
6+
"version": "2.1.0",
77
"commands": [
88
"dotnet-cake"
99
]

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ indent_size = 4
1010
insert_final_newline = false
1111
trim_trailing_whitespace = true
1212

13+
# .NET Code files
14+
[*.{cs,csx,cake,vb}]
15+
indent_style = tab
16+
tab_width = 4
17+
insert_final_newline = true
18+
1319
# Visual Studio Solution Files
1420
[*.sln]
1521
indent_style = tab

.gitattributes

Lines changed: 90 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,96 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
33

4+
#
5+
# The above will handle all files NOT found below
6+
#
7+
8+
# Documents
9+
*.bibtex text diff=bibtex
10+
*.doc diff=astextplain
11+
*.DOC diff=astextplain
12+
*.docx diff=astextplain
13+
*.DOCX diff=astextplain
14+
*.dot diff=astextplain
15+
*.DOT diff=astextplain
16+
*.pdf diff=astextplain
17+
*.PDF diff=astextplain
18+
*.rtf diff=astextplain
19+
*.RTF diff=astextplain
20+
*.md text
21+
*.tex text diff=tex
22+
*.adoc text
23+
*.textile text
24+
*.mustache text
25+
*.csv text
26+
*.tab text
27+
*.tsv text
28+
*.txt text
29+
*.sql text
30+
31+
# Graphics
32+
*.png binary
33+
*.jpg binary
34+
*.jpeg binary
35+
*.gif binary
36+
*.tif binary
37+
*.tiff binary
38+
*.ico binary
39+
# SVG treated as an asset (binary) by default.
40+
*.svg text
41+
# If you want to treat it as binary,
42+
# use the following line instead.
43+
# *.svg binary
44+
*.eps binary
45+
46+
# Scripts
47+
*.bash text eol=lf
48+
*.fish text eol=lf
49+
*.sh text eol=lf
50+
# These are explicitly windows files and should use crlf
51+
*.bat text eol=crlf
52+
*.cmd text eol=crlf
53+
*.ps1 text eol=crlf
54+
55+
# Serialisation
56+
*.json text
57+
*.toml text
58+
*.xml text
59+
*.yaml text
60+
*.yml text
61+
62+
# Archives
63+
*.7z binary
64+
*.gz binary
65+
*.tar binary
66+
*.tgz binary
67+
*.zip binary
68+
469
# Custom for Visual Studio
5-
*.cs diff=csharp
70+
*.cs diff=csharp
71+
*.sln text eol=crlf
72+
*.csproj text eol=crlf
73+
*.vbproj text eol=crlf
74+
*.vcxproj text eol=crlf
75+
*.vcproj text eol=crlf
76+
*.dbproj text eol=crlf
77+
*.fsproj text eol=crlf
78+
*.lsproj text eol=crlf
79+
*.wixproj text eol=crlf
80+
*.modelproj text eol=crlf
81+
*.sqlproj text eol=crlf
82+
*.wwaproj text eol=crlf
83+
*.xproj text eol=crlf
84+
*.props text eol=crlf
85+
*.filters text eol=crlf
86+
*.vcxitems text eol=crlf
687

788
# Standard to msysgit
8-
*.doc diff=astextplain
9-
*.DOC diff=astextplain
10-
*.docx diff=astextplain
11-
*.DOCX diff=astextplain
12-
*.dot diff=astextplain
13-
*.DOT diff=astextplain
14-
*.pdf diff=astextplain
15-
*.PDF diff=astextplain
16-
*.rtf diff=astextplain
17-
*.RTF diff=astextplain
89+
*.doc diff=astextplain
90+
*.DOC diff=astextplain
91+
*.docx diff=astextplain
92+
*.DOCX diff=astextplain
93+
*.dot diff=astextplain
94+
*.DOT diff=astextplain
95+
*.rtf diff=astextplain
96+
*.RTF diff=astextplain

.gitignore

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Ignore Visual Studio temporary files, build results, and
66
## files generated by popular Visual Studio add-ons.
77
##
8-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
8+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
99

1010
# User-specific files
1111
*.rsuser
@@ -210,9 +210,6 @@ PublishScripts/
210210
*.nuget.props
211211
*.nuget.targets
212212

213-
# Nuget personal access tokens and Credentials
214-
nuget.config
215-
216213
# Microsoft Azure Build Output
217214
csx/
218215
*.build.csdef
@@ -301,6 +298,15 @@ node_modules/
301298
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
302299
*.vbw
303300

301+
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
302+
*.vbp
303+
304+
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
305+
*.dsw
306+
*.dsp
307+
308+
# Visual Studio 6 technical files
309+
304310
# Visual Studio LightSwitch build output
305311
**/*.HTMLClient/GeneratedArtifacts
306312
**/*.DesktopClient/GeneratedArtifacts
@@ -357,6 +363,9 @@ ASALocalRun/
357363
# Local History for Visual Studio
358364
.localhistory/
359365

366+
# Visual Studio History (VSHistory) files
367+
.vshistory/
368+
360369
# BeatPulse healthcheck temp database
361370
healthchecksdb
362371

@@ -388,7 +397,6 @@ FodyWeavers.xsd
388397
*.msp
389398

390399
# JetBrains Rider
391-
.idea/
392400
*.sln.iml
393401

394402
### VisualStudio Patch ###

GitReleaseManager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ issue-labels-include:
2626
- Bug
2727
- New Feature
2828
- Improvement
29+
- Enhancement
2930
- Documentation
3031
- Security
3132
issue-labels-exclude:

GitVersion.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ branches:
1313
develop:
1414
regex: dev(elop)?(ment)?$
1515
mode: ContinuousDeployment
16-
tag: alpha
16+
tag: beta
1717
hotfix:
1818
regex: hotfix(es)?[/-]
1919
mode: ContinuousDeployment
20-
tag: beta
20+
tag: hotfix
2121
release:
2222
regex: release(s)?[/-]
2323
mode: ContinuousDeployment

Source/HttpMultipartParser.Benchmark/BenchmarkData.cs

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,52 @@
66

77
namespace HttpMultipartParser.Benchmark
88
{
9-
public class BenchmarkData
10-
{
11-
private readonly IEnumerable<(string Name, string Data)> _parameters;
12-
private readonly IEnumerable<(string Name, string FileName, string Data)> _files;
9+
public class BenchmarkData
10+
{
11+
private readonly IEnumerable<(string Name, string Data)> _parameters;
12+
private readonly IEnumerable<(string Name, string FileName, string Data)> _files;
1313

14-
public BenchmarkData(int numberOfParameters, int sizeOfParameter, int numberOfFiles, int sizeOfFile)
15-
{
16-
_parameters = Enumerable
17-
.Range(1, numberOfParameters)
18-
.Select(index => ($"parameter{index}", new string(Convert.ToChar(index), sizeOfParameter)))
19-
.ToArray();
14+
public BenchmarkData(int numberOfParameters, int sizeOfParameter, int numberOfFiles, int sizeOfFile)
15+
{
16+
_parameters = Enumerable
17+
.Range(1, numberOfParameters)
18+
.Select(index => ($"parameter{index}", new string(Convert.ToChar(index), sizeOfParameter)))
19+
.ToArray();
2020

21-
_files = Enumerable
22-
.Range(1, numberOfFiles)
23-
.Select(index => ($"file{index}", $"fileName{index}", new string(Convert.ToChar(index), sizeOfFile)))
24-
.ToArray();
25-
}
21+
_files = Enumerable
22+
.Range(1, numberOfFiles)
23+
.Select(index => ($"file{index}", $"fileName{index}", new string(Convert.ToChar(index), sizeOfFile)))
24+
.ToArray();
25+
}
2626

27-
public override string ToString()
28-
{
29-
var sb = new StringBuilder();
30-
foreach (var (Name, Data) in _parameters)
31-
{
32-
sb.Append("--boundary\n");
33-
sb.Append($"Content-Disposition: form-data; name=\"{Name}\"\n");
34-
sb.Append("\n");
35-
sb.Append($"{Data}\n");
36-
}
37-
foreach (var (Name, FileName, Data) in _files)
38-
{
39-
sb.Append("--boundary\n");
40-
sb.Append($"Content-Disposition: form-data; name=\"{Name}\"; filename=\"{FileName}\"\n");
41-
sb.Append("Content-Type: text/plain\n");
42-
sb.Append("\n");
43-
sb.Append($"{Data}\n");
44-
}
45-
sb.Append("--boundary--");
27+
public override string ToString()
28+
{
29+
var sb = new StringBuilder();
30+
foreach (var (Name, Data) in _parameters)
31+
{
32+
sb.Append("--boundary\n");
33+
sb.Append($"Content-Disposition: form-data; name=\"{Name}\"\n");
34+
sb.Append("\n");
35+
sb.Append($"{Data}\n");
36+
}
37+
foreach (var (Name, FileName, Data) in _files)
38+
{
39+
sb.Append("--boundary\n");
40+
sb.Append($"Content-Disposition: form-data; name=\"{Name}\"; filename=\"{FileName}\"\n");
41+
sb.Append("Content-Type: text/plain\n");
42+
sb.Append("\n");
43+
sb.Append($"{Data}\n");
44+
}
45+
sb.Append("--boundary--");
4646

47-
return sb.ToString();
48-
}
47+
return sb.ToString();
48+
}
4949

50-
public Stream ToStream()
51-
{
52-
var content = this.ToString();
53-
var buffer = Encoding.UTF8.GetBytes(content);
54-
return new MemoryStream(buffer);
55-
}
56-
}
50+
public Stream ToStream()
51+
{
52+
var content = this.ToString();
53+
var buffer = Encoding.UTF8.GetBytes(content);
54+
return new MemoryStream(buffer);
55+
}
56+
}
5757
}

Source/HttpMultipartParser.Benchmark/HttpMultipartParser.Benchmark.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net5.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="BenchmarkDotNet" Version="0.13.0" />
9+
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

Source/HttpMultipartParser.Benchmark/MultipartFormDataParserBenchmark.cs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@
44

55
namespace HttpMultipartParser.Benchmark
66
{
7-
[MemoryDiagnoser]
8-
[HtmlExporter]
9-
[JsonExporter]
10-
[MarkdownExporter]
11-
public class MultipartFormDataParserBenchmark
12-
{
13-
private readonly Stream small;
14-
private readonly Stream medium;
15-
private readonly Stream large;
7+
[MemoryDiagnoser]
8+
[HtmlExporter]
9+
[JsonExporter]
10+
[MarkdownExporter]
11+
public class MultipartFormDataParserBenchmark
12+
{
13+
private readonly Stream small;
14+
private readonly Stream medium;
15+
private readonly Stream large;
1616

17-
public MultipartFormDataParserBenchmark()
18-
{
19-
small = new BenchmarkData(5, 10, 1, 125000).ToStream();
20-
medium = new BenchmarkData(25, 50, 5, 250000).ToStream();
21-
large = new BenchmarkData(100, 500, 50, 500000).ToStream();
22-
}
17+
public MultipartFormDataParserBenchmark()
18+
{
19+
small = new BenchmarkData(5, 10, 1, 125000).ToStream();
20+
medium = new BenchmarkData(25, 50, 5, 250000).ToStream();
21+
large = new BenchmarkData(100, 500, 50, 500000).ToStream();
22+
}
2323

24-
[Benchmark]
25-
public async Task<MultipartFormDataParser> Small()
26-
{
27-
small.Position = 0;
28-
return await MultipartFormDataParser.ParseAsync(small, "boundary").ConfigureAwait(false);
29-
}
24+
[Benchmark]
25+
public async Task<MultipartFormDataParser> Small()
26+
{
27+
small.Position = 0;
28+
return await MultipartFormDataParser.ParseAsync(small, "boundary").ConfigureAwait(false);
29+
}
3030

31-
[Benchmark]
32-
public async Task<MultipartFormDataParser> Medium()
33-
{
34-
medium.Position = 0;
35-
return await MultipartFormDataParser.ParseAsync(medium, "boundary").ConfigureAwait(false);
36-
}
31+
[Benchmark]
32+
public async Task<MultipartFormDataParser> Medium()
33+
{
34+
medium.Position = 0;
35+
return await MultipartFormDataParser.ParseAsync(medium, "boundary").ConfigureAwait(false);
36+
}
3737

38-
[Benchmark]
39-
public async Task<MultipartFormDataParser> Large()
40-
{
41-
large.Position = 0;
42-
return await MultipartFormDataParser.ParseAsync(large, "boundary").ConfigureAwait(false);
43-
}
44-
}
38+
[Benchmark]
39+
public async Task<MultipartFormDataParser> Large()
40+
{
41+
large.Position = 0;
42+
return await MultipartFormDataParser.ParseAsync(large, "boundary").ConfigureAwait(false);
43+
}
44+
}
4545
}

0 commit comments

Comments
 (0)