Skip to content

Conversation

giantmustache
Copy link
Contributor

The Activator is used to instantiate objects, instead of calling Quantity.From.
The assumption is that there will be a constructor of new T(double value, TUnit unit).

More info in issue #934

The Activator is used to instantiate objects, instead of calling Quantity.From.
The assumption is that there will be a constructor of new T(double value, TUnit unit).
@angularsen
Copy link
Owner

Thanks, I'll try to get around to this in a couple of days.

Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Just some minor things.

Use ConcurrentDictionary
Move test to Serialization
@giantmustache giantmustache requested a review from angularsen July 5, 2021 06:44
@angularsen angularsen changed the title Add possibility to register custom types to the JsonConverter json: Support custom quantities Jul 16, 2021
@angularsen angularsen merged commit 89a1d0e into angularsen:master Jul 16, 2021
@angularsen
Copy link
Owner

@angularsen
Copy link
Owner

angularsen commented Jul 16, 2021

@giantmustache UnitsNet.Serialization.JsonNet 4.4.0 nuget is on the way out, it would be great if you could give it a try and report back that it works.

Queued build:
https://ci.appveyor.com/project/angularsen/unitsnet/builds/40017368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants