Measurement system is not static singleton anymore#5
Conversation
Quantity is now struct. Operators overloading is added to Quantity. Fixed problem with missed png file.
|
Hello Shiko1st, |
|
P.S. Do you want to become a maintainer of this project? |
Hi Kent, yes, if possible. I have a local corporate fork, however, it would be better to use the single repo. |
Unit tests were fixed in cases where the old-style singleton approach was used. The tests logic was not changed.
Locally and on our build server all tests pass. Are there any failed tests on your side? I'm not sure what CI/CD process do you use, it seems no automatic runner here in github. Am I miss something? I will also add some new tests later with a separate commit. |
Operators and sorting tests.
|
Shiko1st, |
Motivation: In our multitenant app we need an independent instance of
MeasurementSystemfor each tenant.What have been done:
UnitOfMeasurehas been adapted to this situation and contains a reference to an instance of a parentMeasurementSystemobject.Quantityis now struct (this improves performance and memory use in case of intense calculations).Quantity. This allows to use expressions likeq1 + q2instead ofq1.Add(q2).QuantityimplementsIEquatable<>andIComparable<>withQuantityanddouble.Breaking changes: