Skip to content
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

Use the generated class instead of anonymous type when calling servic… #543

Merged

Conversation

FrankBakkerNl
Copy link
Contributor

Proposed change

Use the generated class instead of anonymous type when calling services from methods with fields as paramaters.
This avoids Compile errors when JSON propertyies are invalid C# property names

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • The code compiles without warnings (code quality chek)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2021

Codecov Report

Merging #543 (25b2eb6) into dev (edcf04c) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #543      +/-   ##
==========================================
- Coverage   60.05%   60.02%   -0.04%     
==========================================
  Files         142      142              
  Lines        5946     5946              
  Branches      864      863       -1     
==========================================
- Hits         3571     3569       -2     
- Misses       2079     2082       +3     
+ Partials      296      295       -1     
Flag Coverage Δ
unittests 60.02% <100.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...Daemon.HassModel.CodeGenerator/ServiceArguments.cs 81.25% <100.00%> (+3.12%) ⬆️
....App/Common/Reactive/ObservableExtensionMethods.cs 52.17% <0.00%> (-13.05%) ⬇️

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 edcf04c...25b2eb6. Read the comment docs.

@helto4real helto4real merged commit 420f5d9 into net-daemon:dev Dec 10, 2021
@FrankBakkerNl FrankBakkerNl deleted the Use_Class_ForCallService_iso_Anonymous branch December 22, 2022 22:10
Ikcelaks pushed a commit to Ikcelaks/netdaemon that referenced this pull request Dec 23, 2022
net-daemon#543)

* Use the generated class instead of anonymous type when calling services from methods with fields as paramaters

* small fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants