Questions tagged [unit-class-library]

5 questions
4
votes
1 answer

Self-referencing loop error when attempting serialization

I am attempting to serialize an object (specifically, a distance object in the opensource UnitClassLibrary). Because this library does not have support for serialization apparently, I am willing to modify it for my purposes. However, I am not sure…
Jake
  • 3,411
  • 4
  • 21
  • 37
2
votes
1 answer

Building a JsonConstructor to be able to deserialize my object

I am using JSON.net and am trying to serialize and deserialize a Distance object from the opensource UnitClassLibrary. Currently, I have an object serialized as the following JSON: { "ThirtySecondsOfAnInch": 454, "SixteenthsOfAnInch": 227, …
Jake
  • 3,411
  • 4
  • 21
  • 37
2
votes
0 answers

How is the necessary version of a nuget package defined?

I am trying to determine how a version number is determined for a nuget package. I assumed that this would be in the packages.config file. In the packages.config file, this is the version number it is looking for:
Jake
  • 3,411
  • 4
  • 21
  • 37
2
votes
1 answer

How to fix Precision problems

I have several classes that follow the same basic concept for dealing with units. Here is a simple example of one being used in a unit test: [Test()] public void Angle_MathOperatorTest() { Angle a1 = new Angle(AngleType.Degree,…
jth41
  • 3,808
  • 9
  • 59
  • 109
0
votes
1 answer

Scalable solution to intelligent operators for unit classes

I run this open-source library cleverly named the Unit Class Library. It's purpose, like many others is to allow for more intelligent handling of units (rounding, conversion, etc.) Here is an example of the Library at work Distance distance = new…
jth41
  • 3,808
  • 9
  • 59
  • 109