diff --git a/CBOR.nuspec b/CBOR.nuspec
index 3aa8a91b..3de875b0 100644
--- a/CBOR.nuspec
+++ b/CBOR.nuspec
@@ -1,5 +1,5 @@
5.0.0-alpha1PeterO.CborfalseVersion 5.0:
+>5.0.0-alpha2PeterO.CborfalseVersion 5.0:
- Alpha version
- Some deprecated features from earlier versions were obsoleted.
@@ -13,5 +13,5 @@ Version 4.5:
- CBORObject.ToString renders strings as ASCII
- Add support for deserializing CBOR objects to IReadOnlyList, IReadOnlyCollection, and ReadOnlyDictionary
-Note that after version 4.5x, the CBOR library's repository will stop including special projects for .NET 2.0 and .NET 4.0, leaving the .NET-Standard project for building the library.CC0-1.0https://github.com/peteroupc/CBORPeter OccilA C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.Peter OccilCBOR (Concise Binary Object Representation)cbor data serialization binary json
+Note that after version 4.5x, the CBOR library's repository will stop including special projects for .NET 2.0 and .NET 4.0, leaving the .NET-Standard project for building the library.Unlicensehttps://github.com/peteroupc/CBORPeter OccilA C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.Peter Occil
CBOR (Concise Binary Object Representation)cbor data serialization binary json
\ No newline at end of file
diff --git a/CBOR/CBOR.csproj b/CBOR/CBOR.csproj
index afe0fb09..925304d8 100644
--- a/CBOR/CBOR.csproj
+++ b/CBOR/CBOR.csproj
@@ -3,15 +3,15 @@
netstandard1.0; net6.0
True
- 5.0.0-alpha1
+ 5.0.0-alpha2
README.md
Peter Occil
A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.
A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.
- Written by Peter O. Any copyright to this work is released to the Public Domain. In case this is not possible, this work is also licensed under Creative Commons Zero (CC0).
+ Written by Peter O. Any copyright to this work is released to the Public Domain. In case this is not possible, this work is also licensed under the Unlicense.
Peter Occil
PeterO.Cbor
- CC0-1.0
+ Unlicense
https://github.com/peteroupc/CBOR
Version 5.0:
diff --git a/CBOR/PeterO/Cbor/CBORObject.cs b/CBOR/PeterO/Cbor/CBORObject.cs
index 858be7b4..883293fb 100644
--- a/CBOR/PeterO/Cbor/CBORObject.cs
+++ b/CBOR/PeterO/Cbor/CBORObject.cs
@@ -3240,8 +3240,8 @@ public static CBORObject NewMap() {
/// undefined order.
/// A sequence of key-value pairs.
/// A new CBOR map.
- public static CBORObject FromMap(IEnumerable> keysAndValues) {
+ public static CBORObject FromMap(
+ IEnumerable> keysAndValues) {
var sd = new SortedDictionary();
foreach (Tuple kv in keysAndValues) {
sd.Add(kv.Item1, kv.Item2);
@@ -3264,8 +3264,8 @@ public static CBORObject NewOrderedMap() {
/// in order.
/// A sequence of key-value pairs.
/// A new CBOR map.
- public static CBORObject FromOrderedMap(IEnumerable> keysAndValues) {
+ public static CBORObject FromOrderedMap(
+ IEnumerable> keysAndValues) {
IDictionary oDict;
oDict = PropertyMap.NewOrderedDict();
foreach (Tuple kv in keysAndValues) {
diff --git a/CBORTest/CBORObjectTest.cs b/CBORTest/CBORObjectTest.cs
index 2c33a7ef..24762420 100644
--- a/CBORTest/CBORObjectTest.cs
+++ b/CBORTest/CBORObjectTest.cs
@@ -6879,20 +6879,26 @@ public static void TestWriteExtraOne(long longValue) {
}
private void TestWriteUnchangedFloatBits(int bits) {
+ try {
using (var ms = new Test.DelayingStream()) {
byte[] expectedBytes = {
(byte)0xfa,
(byte)((bits >> 24) & 0xff),
(byte)((bits >> 16) & 0xff),
(byte)((bits >> 8) & 0xff),
- (byte)(bits & 0xff)
+ (byte)(bits & 0xff),
};
CBORObject.WriteFloatingPointBits(ms, bits, 4, true);
TestCommon.AssertByteArraysEqual(expectedBytes, ms.ToArray());
}
+ } catch (IOException ex) {
+ Assert.Fail(ex.ToString());
+ throw new InvalidOperationException(ex.ToString(), ex);
+ }
}
private void TestWriteUnchangedDoubleBits(long bits) {
+ try {
using (var ms = new Test.DelayingStream()) {
byte[] expectedBytes = {
(byte)0xfb,
@@ -6903,11 +6909,15 @@ private void TestWriteUnchangedDoubleBits(long bits) {
(byte)((bits >> 24) & 0xffL),
(byte)((bits >> 16) & 0xffL),
(byte)((bits >> 8) & 0xffL),
- (byte)(bits & 0xffL)
+ (byte)(bits & 0xffL),
};
CBORObject.WriteFloatingPointBits(ms, bits, 8, true);
TestCommon.AssertByteArraysEqual(expectedBytes, ms.ToArray());
}
+ } catch (IOException ex) {
+ Assert.Fail(ex.ToString());
+ throw new InvalidOperationException(ex.ToString(), ex);
+ }
}
[Test]