Skip to content

Commit

Permalink
Improve/update lib metadata (#74)
Browse files Browse the repository at this point in the history
* done

* updates
  • Loading branch information
leandromoh authored Oct 9, 2023
1 parent 7767cd8 commit e9e621e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Leandro Fernandes Vieira (leandromoh)
Copyright (c) 2023 Leandro Fernandes Vieira (leandromoh)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 9 additions & 6 deletions RecordParser.Test/FileWriterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,26 @@ public void Write_csv_file(int repeat, bool parallel, bool ordered)
const string separator = ";";

var expectedItems = new Fixture()
.CreateMany<(string Name, DateTime Birthday, decimal Money, Color Color)>(1_000)
.Repeat()
.Take(repeat)
.ToList();
.CreateMany<(string Name, DateTime Birthday, decimal Money, Color Color, int Index)>(1_000)
.Repeat()
.Take(repeat)
.Select((x, i) => { x.Index = i; return x; })
.ToList();

var writer = new VariableLengthWriterBuilder<(string Name, DateTime Birthday, decimal Money, Color Color)>()
var writer = new VariableLengthWriterBuilder<(string Name, DateTime Birthday, decimal Money, Color Color, int Index)>()
.Map(x => x.Name, 0)
.Map(x => x.Birthday, 1, (dest, value) => (value.Ticks.TryFormat(dest, out var written), written))
.Map(x => x.Money, 2)
.Map(x => x.Color, 3)
.Map(x => x.Index, 4)
.Build(separator);

var reader = new VariableLengthReaderBuilder<(string Name, DateTime Birthday, decimal Money, Color Color)>()
var reader = new VariableLengthReaderBuilder<(string Name, DateTime Birthday, decimal Money, Color Color, int Index)>()
.Map(x => x.Name, 0)
.Map(x => x.Birthday, 1, value => new DateTime(long.Parse(value)))
.Map(x => x.Money, 2)
.Map(x => x.Color, 3)
.Map(x => x.Index, 4)
.Build(separator);

// Act
Expand Down
2 changes: 1 addition & 1 deletion RecordParser.Test/RecordParser.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net7.0</TargetFrameworks>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
9 changes: 5 additions & 4 deletions RecordParser/RecordParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

<PropertyGroup>
<PackageId>RecordParser</PackageId>
<TargetFrameworks>netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
<LangVersion>10</LangVersion>
<Authors>Leandro Fernandes Vieira (leandromoh)</Authors>
<Description>
RecordParser is a expression tree based parser that helps you to write maintainable parsers with high-performance and zero allocations, thanks to Span type.
It makes easier for developers to do parsing by automating non-relevant code, which allow you to focus on the essentials of mapping.
Include readers and writers for variable-length and fixed-length records.
</Description>
<Copyright>Copyright 2021 (c) Leandro F. Vieira (leandromoh). All rights reserved.</Copyright>
<Copyright>Copyright 2023 (c) Leandro F. Vieira (leandromoh). All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/leandromoh/RecordParser</PackageProjectUrl>
<RepositoryUrl>https://github.com/leandromoh/RecordParser</RepositoryUrl>
<PackageTags>tsv parser performance csv mapper file flat reader dotnet-core span flatfile expression-tree delimited fixedlength</PackageTags>
<Version>1.3.0</Version>
<Version>2.0.0</Version>
<PackageReleaseNotes>
https://github.com/leandromoh/RecordParser/blob/master/release_notes.md
</PackageReleaseNotes>
Expand All @@ -23,6 +23,7 @@

<PropertyGroup>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -34,6 +35,6 @@
( '$(TargetFramework)' == 'net5.0' OR '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0') AND
( '$(Platform)' == 'AnyCPU') ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</PropertyGroup>

</Project>

0 comments on commit e9e621e

Please sign in to comment.