Skip to content

Commit

Permalink
Version 2.4.1: use new version of numbers library
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Feb 15, 2016
1 parent 3c9ff79 commit 6cda3ba
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 18 deletions.
4 changes: 2 additions & 2 deletions CBOR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="Numbers, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\PeterO.Numbers.0.2.0\lib\portable-net40+sl50+win+wpa81+wp80\Numbers.dll</HintPath>
<Reference Include="Numbers, Version=0.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\PeterO.Numbers.0.2.2\lib\portable-net40+sl50+win+wpa81+wp80\Numbers.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions CBOR.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>PeterO.Cbor</id>
<version>2.4.0</version>
<version>2.4.1</version>
<title>CBOR</title>
<authors>Peter Occil</authors>
<owners>Peter Occil</owners>
Expand All @@ -15,6 +15,9 @@
</description>
<summary>A C# implementation of Concise Binary Object Representation (CBOR), a data serialization format. This implementation can also convert between CBOR and JSON.</summary>
<releaseNotes>
In version 2.4.1:
* C# implementation now uses version 0.2.2 of
[`PeterO.Numbers`](https://www.nuget.org/packages/PeterO.Numbers)
In version 2.4:
* The arbitrary-precision classes in this library are being replaced
with a new library (called PeterO.Numbers (https://www.nuget.org/packages/PeterO.Numbers) in C#). As a result, most
Expand Down Expand Up @@ -45,7 +48,7 @@ See the project page for release notes on previous versions: https://github.com/
</releaseNotes>
<copyright>Written by Peter O. in 2013-2015. Any copyright is released to the Public Domain.</copyright>
<tags>cbor data serialization binary json numbers arithmetic</tags>
<dependencies>
<dependencies>
<group>
<dependency id="PeterO.Numbers" version="0.2.0" />
</group>
Expand Down
3 changes: 1 addition & 2 deletions CBORDocs/DocVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ public static string FormatMethod(MethodBase method) {
}
if (method.IsFinal) {
builder.Append("sealed ");
} else if (method is MethodInfo &&
IsMethodOverride((MethodInfo)method)) {
} else if (method is MethodInfo && IsMethodOverride((MethodInfo)method)) {
builder.Append("override ");
} else if (method.IsVirtual) {
builder.Append("virtual ");
Expand Down
4 changes: 2 additions & 2 deletions CBORTest/CBORTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Numbers, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PeterO.Numbers.0.2.0\lib\portable-net45+dnxcore50+netcore45+win+wpa81+wp80\Numbers.dll</HintPath>
<Reference Include="Numbers, Version=0.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PeterO.Numbers.0.2.2\lib\portable-net45+dnxcore50+netcore45+win+wpa81+wp80\Numbers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.core, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
Expand Down
2 changes: 1 addition & 1 deletion CBORTest/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<package id="NUnit.Runners" version="3.0.1" targetFramework="net45" />
<package id="NUnitTestAdapter.WithFramework" version="2.0.0" targetFramework="net45" />
<package id="OpenCover" version="4.6.166" targetFramework="net45" />
<package id="PeterO.Numbers" version="0.2.0" targetFramework="net45" />
<package id="PeterO.Numbers" version="0.2.2" targetFramework="net45" />
<package id="ReportGenerator" version="2.3.5.0" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions PeterO/Cbor/CBORExtendedDecimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public EDecimal AsExtendedDecimal(object obj) {

public EFloat AsExtendedFloat(object obj) {
var ed = (EDecimal)obj;
return ed.ToExtendedFloat();
return ed.ToEFloat();
}

public float AsSingle(object obj) {
Expand Down Expand Up @@ -155,7 +155,7 @@ public object Abs(object obj) {
}

public ERational AsExtendedRational(object obj) {
return ERational.FromExtendedDecimal((EDecimal)obj);
return ERational.FromEDecimal((EDecimal)obj);
}

public bool IsNegative(object obj) {
Expand Down
4 changes: 2 additions & 2 deletions PeterO/Cbor/CBORExtendedFloat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public double AsDouble(object obj) {

public EDecimal AsExtendedDecimal(object obj) {
var ef = (EFloat)obj;
return ef.ToExtendedDecimal();
return ef.ToEDecimal();
}

public EFloat AsExtendedFloat(object obj) {
Expand Down Expand Up @@ -160,7 +160,7 @@ public object Abs(object obj) {
}

public ERational AsExtendedRational(object obj) {
return ERational.FromExtendedFloat((EFloat)obj);
return ERational.FromEFloat((EFloat)obj);
}

public bool IsNegative(object obj) {
Expand Down
4 changes: 2 additions & 2 deletions PeterO/Cbor/CBORExtendedRational.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public EDecimal AsExtendedDecimal(object obj) {
var er = (ERational)obj;
return

er.ToExtendedDecimalExactIfPossible(EContext.Decimal128.WithUnlimitedExponents());
er.ToEDecimalExactIfPossible(EContext.Decimal128.WithUnlimitedExponents());
}

public EFloat AsExtendedFloat(object obj) {
var er = (ERational)obj;
return

er.ToExtendedFloatExactIfPossible(EContext.Binary128.WithUnlimitedExponents());
er.ToEFloatExactIfPossible(EContext.Binary128.WithUnlimitedExponents());
}

public float AsSingle(object obj) {
Expand Down
2 changes: 1 addition & 1 deletion PeterO/Cbor/CBORJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ internal static void WriteJSONToInternal(
}
case CBORObject.CBORObjectTypeExtendedRational: {
var dec = (ERational)thisItem;
EDecimal f = dec.ToExtendedDecimalExactIfPossible(
EDecimal f = dec.ToEDecimalExactIfPossible(
EContext.Decimal128.WithUnlimitedExponents());
if (!f.IsFinite) {
writer.WriteString("null");
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Any copyright is dedicated to the Public Domain.
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.4.0")]
[assembly: AssemblyVersion("2.4.1")]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ The following are some clarifications to RFC 7049.
Release Notes
-----------

### Version 2.4.1

* C# implementation now uses version 0.2.2 of
[`PeterO.Numbers`](https://www.nuget.org/packages/PeterO.Numbers)

### Version 2.4.0

* The arbitrary-precision classes in this library are being replaced
Expand Down
2 changes: 1 addition & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PeterO.Numbers" version="0.2.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="PeterO.Numbers" version="0.2.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
</packages>

0 comments on commit 6cda3ba

Please sign in to comment.