Skip to content

Commit

Permalink
Version 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Dec 7, 2020
1 parent a1a3fca commit ebdda7c
Show file tree
Hide file tree
Showing 11 changed files with 254 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.301'
dotnet-version: '2.2.402'
- name: Test
run: |
dotnet add CBORTest package Microsoft.NET.Test.Sdk # Update is required for GitHubActionsTestLogger to print anything
Expand Down
14 changes: 6 additions & 8 deletions CBOR.nuspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<package
><metadata><version>4.2.0</version><id>PeterO.Cbor</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 4.2:
><metadata><version>4.3.0</version><id>PeterO.Cbor</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 4.3:

- Some arithmetic methods in CBORNumber do basic overflow checks.
- Add char array and byte array overloads to ParseJSONNumber
- Support implementations of IList in CBORObject deserialization
- Internally, the code avoids storing doubles (64-bit floating-point numbers) directly in CBORNumbers, uses sorted maps rather than hash tables in some CBOR objects, and can now store text strings as UTF-8 byte arrays. This could help avoid unnecessary string conversions in many case.
- Bug fixes and performance improvements
- Now uses Numbers library version 1.7.3</releaseNotes><summary></summary><license type='expression'>CC0-1.0</license><projectUrl>https://github.com/peteroupc/CBOR</projectUrl><authors>Peter Occil</authors><description>A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049.</description><owners>Peter Occil</owners><title>CBOR (Concise Binary Object Representation)</title><tags>cbor data serialization binary json</tags><dependencies><group targetFramework='.NETStandard1.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.7.3' /></group><group targetFramework='.NETFramework2.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.7.3' /></group><group targetFramework='.NETFramework4.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.7.3' /></group></dependencies></metadata><files><file src='CBOR/bin/Release/netstandard1.0/CBOR.dll' target='/lib/netstandard1.0' /><file src='CBOR/bin/Release/netstandard1.0/CBOR.xml' target='/lib/netstandard1.0' /><file src='CBOR20/bin/Release/CBOR.dll' target='/lib/net20' /><file src='CBOR20/bin/Release/CBOR.xml' target='/lib/net20' /><file src='CBOR40/bin/Release/CBOR.dll' target='/lib/net40' /><file src='CBOR40/bin/Release/CBOR.xml' target='/lib/net40' /></files></package
>
- Fixed bugs in DateTime support
- Added CompareTo overloads in CBORNumber class
- Add NewOrderedMap method based on a suggestion by a GitHub user
- Other bug fixes</releaseNotes><summary></summary><license type='expression'>CC0-1.0</license><projectUrl>https://github.com/peteroupc/CBOR</projectUrl><authors>Peter Occil</authors><description>A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.</description><owners>Peter Occil</owners><title>CBOR (Concise Binary Object Representation)</title><tags>cbor data serialization binary json</tags><dependencies><group targetFramework='.NETStandard1.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.7.4' /></group><group targetFramework='.NETFramework2.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.7.4' /></group><group targetFramework='.NETFramework4.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.7.4' /></group></dependencies></metadata><files><file src='CBOR/bin/Release/netstandard1.0/CBOR.dll' target='/lib/netstandard1.0' /><file src='CBOR/bin/Release/netstandard1.0/CBOR.xml' target='/lib/netstandard1.0' /><file src='CBOR20/bin/Release/CBOR.dll' target='/lib/net20' /><file src='CBOR20/bin/Release/CBOR.xml' target='/lib/net20' /><file src='CBOR40/bin/Release/CBOR.dll' target='/lib/net40' /><file src='CBOR40/bin/Release/CBOR.xml' target='/lib/net40' /></files></package
>
1 change: 1 addition & 0 deletions CBOR/CBOR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Version 4.3:
- Fixed bugs in DateTime support
- Added CompareTo overloads in CBORNumber class
- Add NewOrderedMap method based on a suggestion by a GitHub user
- Other bug fixes

</PackageReleaseNotes>
<PackageTags>cbor data serialization binary json</PackageTags>
Expand Down
12 changes: 8 additions & 4 deletions CBOR/PeterO/Cbor/CBORDateConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ licensed under Creative Commons Zero (CC0):
namespace PeterO.Cbor {
internal class CBORDateConverter : ICBORToFromConverter<DateTime> {
private static string DateTimeToString(DateTime bi) {
var lesserFields = new int[7];
var year = new EInteger[1];
PropertyMap.BreakDownDateTime(bi, year, lesserFields);
return CBORUtilities.ToAtomDateTimeString(year[0], lesserFields);
try {
var lesserFields = new int[7];
var year = new EInteger[1];
PropertyMap.BreakDownDateTime(bi, year, lesserFields);
return CBORUtilities.ToAtomDateTimeString(year[0], lesserFields);
} catch (ArgumentException ex) {
throw new CBORException(ex.Message, ex);
}
}

public DateTime FromCBORObject(CBORObject obj) {
Expand Down
2 changes: 1 addition & 1 deletion CBOR/PeterO/Cbor/PropertyMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ public int GetHashCode(TKey a) {
return ret;
}
}
*/
private string CS(TKey k) {
return String.Empty;
}
*/

[System.Diagnostics.Conditional("DEBUG")]
private void CheckKeyExists(TKey key) {
Expand Down
8 changes: 4 additions & 4 deletions CBOR20/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using System.Reflection;
[assembly: System.CLSCompliant(true)]
[assembly: AssemblyInformationalVersion("4.2.0")]
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.3.0")]
[assembly: AssemblyVersion("4.3.0.0")]
[assembly: AssemblyFileVersion("4.3.0.0")]
[assembly: AssemblyProduct("CBOR (Concise Binary Object Representati" +
"on)")]
[assembly: AssemblyTitle("CBOR (Concise Binary Object Representati" +
"on)")]
[assembly: AssemblyDescription("A C# implementation of Concise Binary Ob" +
"ject Representation (CBOR), a general-pu" +
"rpose binary data format defined in RFC " +
"7049.")]
"8949.")]
[assembly: AssemblyCompany("Peter Occil")]
[assembly: AssemblyCopyright("CC0-1.0")]
8 changes: 4 additions & 4 deletions CBOR40/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using System.Reflection;
[assembly: System.CLSCompliant(true)]
[assembly: AssemblyInformationalVersion("4.2.0")]
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.3.0")]
[assembly: AssemblyVersion("4.3.0.0")]
[assembly: AssemblyFileVersion("4.3.0.0")]
[assembly: AssemblyProduct("CBOR (Concise Binary Object Representati" +
"on)")]
[assembly: AssemblyTitle("CBOR (Concise Binary Object Representati" +
"on)")]
[assembly: AssemblyDescription("A C# implementation of Concise Binary Ob" +
"ject Representation (CBOR), a general-pu" +
"rpose binary data format defined in RFC " +
"7049.")]
"8949.")]
[assembly: AssemblyCompany("Peter Occil")]
[assembly: AssemblyCopyright("CC0-1.0")]
Loading

0 comments on commit ebdda7c

Please sign in to comment.