Skip to content

Commit

Permalink
Version 4.0.0-alpha1; etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Oct 2, 2018
1 parent 6366ee3 commit 58d38f1
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 119 deletions.
19 changes: 13 additions & 6 deletions CBOR.nuspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<package
><metadata><version>3.4.0-alpha1</version><id>PeterO.Cbor</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 3.4.0-alpha1:
><metadata><version>4.0.0-alpha1</version><id>PeterO.Cbor</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 4.0.0-alpha1:

- Add ToObject method for deserializing CBOR objects.
- Add ICBORObjectConverter interface.
- Add HasMostOuterTag method to CBORObject class.
- Add CTAP2 canonicalization support to CBOR object encoding.
- Added examples in several places in documentation.</releaseNotes><summary></summary><licenseUrl>http://creativecommons.org/publicdomain/zero/1.0/</licenseUrl><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 numbers arithmetic</tags><dependencies><group><dependency id='PeterO.Numbers' version='1.1.2' /></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
- Remove all APIs obsoleted since version 3.4. This
includes the BigInteger, ExtendedDecimal, and ExtendedFloat APIs,
which were renamed and moved to a different library, as well as the
ICBORTag and CBORTypeFilter APIs.
- Changed implementation of FromObject, including imposing a nesting depth
limit and supporting a CBORTypeMapper parameter.
- Property name conversion rules (in PODOptions) were changed
in this version with respect to FromObject. In this sense,
PODOptions.RemoveIsPrefix was removed.
- Certain other changes in CBOR object reading and validation were
made; they are largely compatible with previous versions but may be
backwards-incompatible in certain rare cases</releaseNotes><summary></summary><licenseUrl>http://creativecommons.org/publicdomain/zero/1.0/</licenseUrl><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 numbers arithmetic</tags><dependencies><group><dependency id='PeterO.Numbers' version='1.1.2' /></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
>
21 changes: 14 additions & 7 deletions CBOR/CBOR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>3.4.0-alpha1</Version>
<Version>4.0.0-alpha1</Version>
<Owners>Peter Occil</Owners>
<Description>A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049.</Description>
<Summary>A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049. </Summary>
Expand All @@ -13,13 +13,20 @@
<PackageLicenseUrl>http://creativecommons.org/publicdomain/zero/1.0/</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/peteroupc/CBOR</PackageProjectUrl>
<PackageReleaseNotes>
Version 3.4.0-alpha1:
Version 4.0.0-alpha1:

- Add ToObject method for deserializing CBOR objects.
- Add ICBORObjectConverter interface.
- Add HasMostOuterTag method to CBORObject class.
- Add CTAP2 canonicalization support to CBOR object encoding.
- Added examples in several places in documentation.
- Remove all APIs obsoleted since version 3.4. This
includes the BigInteger, ExtendedDecimal, and ExtendedFloat APIs,
which were renamed and moved to a different library, as well as the
ICBORTag and CBORTypeFilter APIs.
- Changed implementation of FromObject, including imposing a nesting depth
limit and supporting a CBORTypeMapper parameter.
- Property name conversion rules (in PODOptions) were changed
in this version with respect to FromObject. In this sense,
PODOptions.RemoveIsPrefix was removed.
- Certain other changes in CBOR object reading and validation were
made; they are largely compatible with previous versions but may be
backwards-incompatible in certain rare cases

</PackageReleaseNotes>
<PackageTags>cbor data serialization binary json numbers arithmetic</PackageTags>
Expand Down
16 changes: 14 additions & 2 deletions CBOR/PeterO/Cbor/CBORTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,20 @@ public CBORTypeMapper() {
this.converters = new Dictionary<Object, ConverterInfo>();
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORTypeMapper.AddConverter``1(System.Type,PeterO.Cbor.ICBORConverter{``0})"]/*'/>
/// <summary>Registers an object that converts objects of a given type
/// to CBOR objects (called a CBOR converter).</summary>
/// <param name='type'>A Type object specifying the type that the
/// converter converts to CBOR objects.</param>
/// <param name='converter'>The parameter <paramref name='converter'/>
/// is an ICBORConverter object.</param>
/// <typeparam name='T'>Must be the same as the "type"
/// parameter.</typeparam>
/// <returns>This object.</returns>
/// <exception cref='T:System.ArgumentNullException'>The parameter
/// <paramref name='type'/> or <paramref name='converter'/> is
/// null.</exception>
/// <exception cref='T:System.ArgumentException'>"Converter doesn't
/// contain a proper ToCBORObject method".</exception>
public CBORTypeMapper AddConverter<T>(
Type type,
ICBORConverter<T> converter) {
Expand Down
2 changes: 1 addition & 1 deletion CBOR/PeterO/Cbor/CBORUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ private static int[] ParseAtomDateTimeString(string str) {
if (bad) {
throw new ArgumentException("Invalid date/time");
}
int year = ((str[0] - '0') * 1000) + (str[1] - '0') * 100 +
int year = ((str[0] - '0') * 1000) + ((str[1] - '0') * 100) +
(str[2] - '0') * 10 + (str[3] - '0');
int month = ((str[5] - '0') * 10) + (str[6] - '0');
int day = ((str[8] - '0') * 10) + (str[9] - '0');
Expand Down
92 changes: 33 additions & 59 deletions CBOR/docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2279,9 +2279,8 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
<doc name="M:PeterO.Cbor.CBORObject.ToJSONString">

<summary>Converts this object to a string in JavaScript Object
Notation (JSON) format, using the specified options to control the
encoding process. See the overload to JSONString taking a
JSONOptions argument.
Notation (JSON) format. See the overload to JSONString taking a
JSONOptions argument for further information.
<para>If the CBOR object contains CBOR maps, or is a CBOR map
itself, the keys to the map are written out to the JSON string in
an undefined order. The example code given in
Expand Down Expand Up @@ -2476,8 +2475,8 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
</item>
<item>If the type is
<c>char</c>
, converts single-character CBOR text strings and CBOR integers from 0
through 65535 to a
, converts single-character CBOR text strings and CBOR integers from
0 through 65535 to a
<c>char</c>
object and returns that
<c>char</c>
Expand Down Expand Up @@ -2681,9 +2680,7 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
deserialization and includes custom converters from CBOR objects to
certain data types.
</param>
<param name='options'>The parameter
<paramref name='options'/>
is a PODOptions object.
<param name='options'>Specifies options for controlling deserialization of CBOR objects.
</param>
<returns>The converted object.
</returns>
Expand Down Expand Up @@ -2737,7 +2734,8 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
///) or a plain-old-data type (POCO or POJO type)
within the control of the application. If the plain-old-data type
references other data types, those types should likewise meet
either criterion above.</param><param name='options'>The parameter <paramref name='options'/> is a PODOptions object.</param><returns>The converted object.</returns><exception cref='T:System.NotSupportedException'>The given type
either criterion above.</param><param name='options'>Specifies options for controlling deserialization of CBOR objects.
</param><returns>The converted object.</returns><exception cref='T:System.NotSupportedException'>The given type
<paramref name='t'/> , or this object's CBOR type, is not
supported.</exception><exception cref='T:System.ArgumentNullException'>The parameter
<paramref name='t'/> is null.</exception><exception cref='T:System.CBORException'>The given object's nesting
Expand All @@ -2763,7 +2761,10 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
<summary><para>Converts this CBOR object to an object of an arbitrary type.
See
<see cref='M:PeterO.Cbor.CBORObject.ToObject(System.Type)'/> for
further information.</para></summary><param name='mapper'>The parameter <paramref name='mapper'/> is not documented yet.</param><typeparam name='T'>The type, class, or interface that this
further information.</para></summary><param name='mapper'>This parameter controls which data types are eligible for Plain-Old-Data
deserialization and includes custom converters from CBOR objects to
certain data types.
</param><typeparam name='T'>The type, class, or interface that this
method's return value will belong to. <b>Note:</b> For security
reasons, an application should not base this parameter on user
input or other externally supplied data. Whenever possible, this
Expand All @@ -2780,7 +2781,11 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
<summary><para>Converts this CBOR object to an object of an arbitrary type.
See
<see cref='M:PeterO.Cbor.CBORObject.ToObject(System.Type)'/> for
further information.</para></summary><param name='mapper'>The parameter <paramref name='mapper'/> is not documented yet.</param><param name='options'>The parameter <paramref name='options'/> is not documented yet.</param><typeparam name='T'>The type, class, or interface that this
further information.</para></summary><param name='mapper'>This parameter controls which data types are eligible for Plain-Old-Data
deserialization and includes custom converters from CBOR objects to
certain data types.
</param><param name='options'>Specifies options for controlling deserialization of CBOR objects.
</param><typeparam name='T'>The type, class, or interface that this
method's return value will belong to. <b>Note:</b> For security
reasons, an application should not base this parameter on user
input or other externally supplied data. Whenever possible, this
Expand All @@ -2797,7 +2802,8 @@ is less than 0, is the size of this array or greater, or is not a 32-bit signed
<summary><para>Converts this CBOR object to an object of an arbitrary type.
See
<see cref='M:PeterO.Cbor.CBORObject.ToObject(System.Type)'/> for
further information.</para></summary><param name='options'>The parameter <paramref name='options'/> is not documented yet.</param><typeparam name='T'>The type, class, or interface that this
further information.</para></summary><param name='options'>Specifies options for controlling deserialization of CBOR objects.
</param><typeparam name='T'>The type, class, or interface that this
method's return value will belong to. <b>Note:</b> For security
reasons, an application should not base this parameter on user
input or other externally supplied data. Whenever possible, this
Expand Down Expand Up @@ -3649,37 +3655,37 @@ stream.Write(bytes, 0, bytes.Length);
<c>ToObject</c></summary>

</doc>
<doc name="M:PeterO.Cbor.CBORTypeMapper.#ctor">
<summary>Initializes a new instance of the <see cref='CBORTypeMapper'/> class.
</summary>
</doc>
<doc name="M:PeterO.Cbor.CBORTypeMapper.AddConverter``1(System.Type,PeterO.Cbor.ICBORConverter{``0})">

<summary>Not documented yet.</summary><param name='type'>The parameter <paramref name='type'/> is not
documented yet.</param><param name='converter'>The parameter <paramref name='converter'/>
is not documented yet.</param><typeparam name='T'>Type parameter not documented yet.</typeparam><returns>A CBORTypeMapper object.</returns><exception cref='T:System.ArgumentNullException'>The parameter
<paramref name='type'/> or <paramref name='converter'/> is
null.</exception><exception cref='T:System.ArgumentException'>Converter doesn't
contain a proper ToCBORObject method.</exception>
<summary>Registers an object that converts objects of a given type
to CBOR objects (called a CBOR converter).</summary><param name='type'>A Type object specifying the type that the
converter converts to CBOR objects.</param><param name='converter'>The parameter <paramref name='converter'/>
is an ICBORConverter object.</param>
<returns>This object.</returns>

<typeparam name='T'>Must be the same as the "type"
parameter.</typeparam><exception cref='T:System.ArgumentNullException'>The parameter
<paramref name='type'/> or <paramref name='converter'/> is
null.</exception><exception cref='T:System.ArgumentException'>"Converter doesn't contain a
proper ToCBORObject method".</exception>
</doc>
<doc name="M:PeterO.Cbor.CBORTypeMapper.AddTypeName(System.String)">

<summary>Adds the fully qualified name of a Java or .NET type for use in type matching.</summary><param name='name'>The parameter <paramref name='name'/> is not documented yet.</param><returns>A CBORTypeMapper object.</returns><exception cref='T:System.ArgumentNullException'>The parameter <paramref name='name'/> is null.</exception><exception cref='T:System.ArgumentException'>The parameter <paramref name='name'/> is empty.</exception>
<summary>Adds the fully qualified name of a Java or .NET type for use in type matching.</summary><param name='name'>The fully qualified name of a Java or .NET class (e.g., <c>java.math.BigInteger</c> or <c>System.Globalization.CultureInfo</c>).</param><returns>This object.</returns><exception cref='T:System.ArgumentNullException'>The parameter <paramref name='name'/> is null.</exception><exception cref='T:System.ArgumentException'>The parameter <paramref name='name'/> is empty.</exception>

</doc>
<doc name="M:PeterO.Cbor.CBORTypeMapper.AddTypePrefix(System.String)">

<summary>Adds a prefix of a Java or .NET type for use in type matching. A type matches a prefix if its fully qualified name is or begins with that prefix, using codepoint-by-codepoint (case-sensitive) matching.</summary><param name='prefix'>The parameter <paramref name='prefix'/> is not documented yet.</param><returns>A CBORTypeMapper object.</returns><exception cref='T:System.ArgumentNullException'>The parameter <paramref name='prefix'/> is null.</exception><exception cref='T:System.ArgumentException'>The parameter <paramref name='prefix'/> is empty.</exception>
<summary>Adds a prefix of a Java or .NET type for use in type matching. A type matches a prefix if its fully qualified name is or begins with that prefix, using codepoint-by-codepoint (case-sensitive) matching.</summary><param name='prefix'>The prefix of a Java or .NET type (e.g., `java.math.` or `System.Globalization`).</param><returns>This object.</returns><exception cref='T:System.ArgumentNullException'>The parameter <paramref name='prefix'/> is null.</exception><exception cref='T:System.ArgumentException'>The parameter <paramref name='prefix'/> is empty.</exception>

</doc>
<doc name="P:PeterO.Cbor.CBORTypeMapper.ConverterInfo.Converter">
<summary>Gets a value not documented yet.</summary>
<value>A value not documented yet.</value>
<summary>Gets an internal API value.</summary>
<value>An internal API value.</value>
</doc>
<doc name="M:PeterO.Cbor.CBORTypeMapper.FilterTypeName(System.String)">

<summary>Not documented yet.</summary><param name='typeName'>The fully qualified name of a Java or .NET class (e.g., <c>java.math.BigInteger</c> or <c>System.Globalization.CultureInfo</c>).</param><returns>Either <c>true</c> or <c>false</c>.</returns>
<summary>Returns whether the given Java or .NET type name fits the filters given in this mapper.</summary><param name='typeName'>The fully qualified name of a Java or .NET class (e.g., <c>java.math.BigInteger</c> or <c>System.Globalization.CultureInfo</c>).</param><returns>Either <c>true</c> if the given Java or .NET type name fits the filters given in this mapper, or <c>false</c> otherwise.</returns>

</doc>
<doc name="T:PeterO.Cbor.CBORUtilities">
Expand All @@ -3688,38 +3694,6 @@ stream.Write(bytes, 0, bytes.Length);
class.
</summary>

</doc>
<doc name="M:PeterO.Cbor.FastInteger2.Multiply(System.Int32)">

<summary>Sets this object's value to the current value times another integer.
</summary><param name='val'>The integer to multiply by.
</param><returns>This instance.
</returns>

</doc>
<doc name="P:PeterO.Cbor.FastInteger2.Sign">

<summary>Gets the sign of this object's value.
</summary><value>1 if positive, -1 if negative, 0 if zero.
</value>

</doc>
<doc name="M:PeterO.Cbor.FastInteger2.Subtract(PeterO.Cbor.FastInteger2)">

<summary>Sets this object's value to the current value minus the given FastInteger
value.
</summary><param name='val'>The subtrahend.
</param><returns>This instance.
</returns>

</doc>
<doc name="M:PeterO.Cbor.FastInteger2.SubtractInt(System.Int32)">

<summary>Sets this object's value to the current value minus the given integer.
</summary><param name='val'>The subtrahend.
</param><returns>This instance.
</returns>

</doc>
<doc name="T:PeterO.Cbor.ICBORConverter`1">

Expand Down
6 changes: 3 additions & 3 deletions CBOR20/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Reflection;

[assembly: System.CLSCompliant(true)]
[assembly: AssemblyInformationalVersion("3.4.0-alpha1")]
[assembly: AssemblyVersion("3.4.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyInformationalVersion("4.0.0-alpha1")]
[assembly: AssemblyVersion("4.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyProduct("CBOR (Concise Binary Object Representati" +
"on)")]
[assembly: AssemblyTitle("CBOR (Concise Binary Object Representati" +
Expand Down
Loading

0 comments on commit 58d38f1

Please sign in to comment.