arnaudleclerc / AzureMapsControl.Components

Razor Components for azure-maps-control
MIT License
34 stars 12 forks source link

Easier number to Expression #72

Closed mitikov closed 2 years ago

mitikov commented 2 years ago

Being an enrichment wrapper around double?, it makes sense to let compiler convert number to Expression where it needs.

The first commit illustrates a single prop forces us to use 2 times new ExpressionOrNumber() even though intend is crystal clear and non-twofold.

@arnaudleclerc what do you think?

Thanks.

codecov-commenter commented 2 years ago

Codecov Report

Merging #72 (e466ca6) into develop (e5b879f) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop      #72   +/-   ##
========================================
  Coverage    86.45%   86.45%           
========================================
  Files          124      124           
  Lines         3655     3655           
========================================
  Hits          3160     3160           
  Misses         495      495           
Flag Coverage Δ
unittests 86.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/AzureMapsControl.Components/Atlas/Expression.cs 96.15% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e5b879f...e466ca6. Read the comment docs.

arnaudleclerc commented 2 years ago

Thanks, everything looks fine. That's another great addition to the expressions :)

Would you mind also updating the documentation to explain that it is now possible to affect a double directly to an expression ? Otherwise, I am afraid this will remain mostly unknown.

You can find the documentation on docs/expressions.

mitikov commented 2 years ago

@arnaudleclerc Sure, docs updated.