Skip to content

Add IValueQuantity<TValue> interface to expose the value type #1207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 26, 2023

Conversation

tmilnthorp
Copy link
Collaborator

@tmilnthorp tmilnthorp commented Feb 17, 2023

Ref #1205

  • Add IValueQuantity<TValue> extending IQuantity to expose double/decimal types instead of QuantityValue
  • Add IQuantity<TUnitType, out TValueType>, extending IValueQuantity<TValue> with value specific As(TUnitType) method
  • Mark IDecimalQuantity obsolete, replaced by above

@tmilnthorp tmilnthorp changed the title Tmilntho/valuequantity Add IValueQuantity interface to generically handle backing-types Feb 17, 2023
@angularsen
Copy link
Owner

Yeah this should work 👍
If it covers your use case, then I'm for it.

@tmilnthorp
Copy link
Collaborator Author

Yeah this should work 👍 If it covers your use case, then I'm for it.

Works for me!

@tmilnthorp
Copy link
Collaborator Author

@angularsen added some tests and fixed up doc. Should be good to go!

@angularsen angularsen changed the title Add IValueQuantity interface to generically handle backing-types Add IValueQuantity<TValue> interface to expose the value type Feb 26, 2023
@tmilnthorp
Copy link
Collaborator Author

@angularsen thanks!

@angularsen angularsen merged commit 1e5381c into angularsen:master Feb 26, 2023
@angularsen
Copy link
Owner

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