Skip to content

Commit 6cda3ba

Browse files
committed
Version 2.4.1: use new version of numbers library
1 parent 3c9ff79 commit 6cda3ba

12 files changed

Lines changed: 25 additions & 18 deletions

CBOR.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
<None Include="packages.config" />
132132
</ItemGroup>
133133
<ItemGroup>
134-
<Reference Include="Numbers, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
135-
<HintPath>packages\PeterO.Numbers.0.2.0\lib\portable-net40+sl50+win+wpa81+wp80\Numbers.dll</HintPath>
134+
<Reference Include="Numbers, Version=0.2.2.0, Culture=neutral, processorArchitecture=MSIL">
135+
<HintPath>packages\PeterO.Numbers.0.2.2\lib\portable-net40+sl50+win+wpa81+wp80\Numbers.dll</HintPath>
136136
<Private>True</Private>
137137
</Reference>
138138
</ItemGroup>

CBOR.nuspec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>PeterO.Cbor</id>
5-
<version>2.4.0</version>
5+
<version>2.4.1</version>
66
<title>CBOR</title>
77
<authors>Peter Occil</authors>
88
<owners>Peter Occil</owners>
@@ -15,6 +15,9 @@
1515
</description>
1616
<summary>A C# implementation of Concise Binary Object Representation (CBOR), a data serialization format. This implementation can also convert between CBOR and JSON.</summary>
1717
<releaseNotes>
18+
In version 2.4.1:
19+
* C# implementation now uses version 0.2.2 of
20+
[`PeterO.Numbers`](https://www.nuget.org/packages/PeterO.Numbers)
1821
In version 2.4:
1922
* The arbitrary-precision classes in this library are being replaced
2023
with a new library (called PeterO.Numbers (https://www.nuget.org/packages/PeterO.Numbers) in C#). As a result, most
@@ -45,7 +48,7 @@ See the project page for release notes on previous versions: https://github.com/
4548
</releaseNotes>
4649
<copyright>Written by Peter O. in 2013-2015. Any copyright is released to the Public Domain.</copyright>
4750
<tags>cbor data serialization binary json numbers arithmetic</tags>
48-
<dependencies>
51+
<dependencies>
4952
<group>
5053
<dependency id="PeterO.Numbers" version="0.2.0" />
5154
</group>

CBORDocs/DocVisitor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ public static string FormatMethod(MethodBase method) {
150150
}
151151
if (method.IsFinal) {
152152
builder.Append("sealed ");
153-
} else if (method is MethodInfo &&
154-
IsMethodOverride((MethodInfo)method)) {
153+
} else if (method is MethodInfo && IsMethodOverride((MethodInfo)method)) {
155154
builder.Append("override ");
156155
} else if (method.IsVirtual) {
157156
builder.Append("virtual ");

CBORTest/CBORTest.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<StartupObject />
6464
</PropertyGroup>
6565
<ItemGroup>
66-
<Reference Include="Numbers, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
67-
<HintPath>..\packages\PeterO.Numbers.0.2.0\lib\portable-net45+dnxcore50+netcore45+win+wpa81+wp80\Numbers.dll</HintPath>
66+
<Reference Include="Numbers, Version=0.2.2.0, Culture=neutral, processorArchitecture=MSIL">
67+
<HintPath>..\packages\PeterO.Numbers.0.2.2\lib\portable-net45+dnxcore50+netcore45+win+wpa81+wp80\Numbers.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
7070
<Reference Include="nunit.core, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">

CBORTest/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<package id="NUnit.Runners" version="3.0.1" targetFramework="net45" />
55
<package id="NUnitTestAdapter.WithFramework" version="2.0.0" targetFramework="net45" />
66
<package id="OpenCover" version="4.6.166" targetFramework="net45" />
7-
<package id="PeterO.Numbers" version="0.2.0" targetFramework="net45" />
7+
<package id="PeterO.Numbers" version="0.2.2" targetFramework="net45" />
88
<package id="ReportGenerator" version="2.3.5.0" targetFramework="net45" />
99
</packages>

PeterO/Cbor/CBORExtendedDecimal.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public EDecimal AsExtendedDecimal(object obj) {
4343

4444
public EFloat AsExtendedFloat(object obj) {
4545
var ed = (EDecimal)obj;
46-
return ed.ToExtendedFloat();
46+
return ed.ToEFloat();
4747
}
4848

4949
public float AsSingle(object obj) {
@@ -155,7 +155,7 @@ public object Abs(object obj) {
155155
}
156156

157157
public ERational AsExtendedRational(object obj) {
158-
return ERational.FromExtendedDecimal((EDecimal)obj);
158+
return ERational.FromEDecimal((EDecimal)obj);
159159
}
160160

161161
public bool IsNegative(object obj) {

PeterO/Cbor/CBORExtendedFloat.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public double AsDouble(object obj) {
3838

3939
public EDecimal AsExtendedDecimal(object obj) {
4040
var ef = (EFloat)obj;
41-
return ef.ToExtendedDecimal();
41+
return ef.ToEDecimal();
4242
}
4343

4444
public EFloat AsExtendedFloat(object obj) {
@@ -160,7 +160,7 @@ public object Abs(object obj) {
160160
}
161161

162162
public ERational AsExtendedRational(object obj) {
163-
return ERational.FromExtendedFloat((EFloat)obj);
163+
return ERational.FromEFloat((EFloat)obj);
164164
}
165165

166166
public bool IsNegative(object obj) {

PeterO/Cbor/CBORExtendedRational.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ public EDecimal AsExtendedDecimal(object obj) {
3636
var er = (ERational)obj;
3737
return
3838

39-
er.ToExtendedDecimalExactIfPossible(EContext.Decimal128.WithUnlimitedExponents());
39+
er.ToEDecimalExactIfPossible(EContext.Decimal128.WithUnlimitedExponents());
4040
}
4141

4242
public EFloat AsExtendedFloat(object obj) {
4343
var er = (ERational)obj;
4444
return
4545

46-
er.ToExtendedFloatExactIfPossible(EContext.Binary128.WithUnlimitedExponents());
46+
er.ToEFloatExactIfPossible(EContext.Binary128.WithUnlimitedExponents());
4747
}
4848

4949
public float AsSingle(object obj) {

PeterO/Cbor/CBORJson.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ internal static void WriteJSONToInternal(
652652
}
653653
case CBORObject.CBORObjectTypeExtendedRational: {
654654
var dec = (ERational)thisItem;
655-
EDecimal f = dec.ToExtendedDecimalExactIfPossible(
655+
EDecimal f = dec.ToEDecimalExactIfPossible(
656656
EContext.Decimal128.WithUnlimitedExponents());
657657
if (!f.IsFinite) {
658658
writer.WriteString("null");

Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ Any copyright is dedicated to the Public Domain.
3333
//
3434
// You can specify all the values or you can use the default the Revision and
3535
// Build Numbers by using the '*' as shown below:
36-
[assembly: AssemblyVersion("2.4.0")]
36+
[assembly: AssemblyVersion("2.4.1")]

0 commit comments

Comments
 (0)