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

Add ObjectPath to AspNetItemValueLayoutRenderer #890

Merged
merged 3 commits into from
Nov 27, 2022

Conversation

bakgerman
Copy link
Contributor

Changed as little code as possible, added 2 new unit tests

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2022

Codecov Report

Base: 70% // Head: 69% // Decreases project coverage by -1% ⚠️

Coverage data is based on head (7bf39f0) compared to base (0176c44).
Patch coverage: 67% of modified lines in pull request are covered.

Additional details and impacted files
@@          Coverage Diff          @@
##           master   #890   +/-   ##
=====================================
- Coverage      70%    69%   -1%     
=====================================
  Files          65     65           
  Lines        1218   1245   +27     
  Branches      308    323   +15     
=====================================
+ Hits          850    861   +11     
- Misses        229    237    +8     
- Partials      139    147    +8     
Impacted Files Coverage Δ
src/Shared/Internal/PropertyReader.cs 56% <50%> (-13%) ⬇️
...d/LayoutRenderers/AspNetItemValueLayoutRenderer.cs 94% <100%> (+1%) ⬆️
.../Shared/LayoutRenderers/AspNetMvcActionRenderer.cs 67% <0%> (-13%) ⬇️
...red/LayoutRenderers/AspNetMvcControllerRenderer.cs 67% <0%> (-13%) ⬇️
...tRenderers/AspNetRequestRouteParametersRenderer.cs 17% <0%> (+7%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Allows to use either Item or ObjectPath
@snakefoot
Copy link
Contributor

snakefoot commented Nov 26, 2022

Thank you for making the pull-request. The objectpath for ${event-properties} works like this:

public class Person
{
    public string FirstName { get; set; }
}

logger.Info("Hello {Customer}",  new Person { FirstName = "Bob" });

Where you can lookup the FirstName-property like this ${event-properties:item=Customer:objectpath=FirstName} (Outputs: "Bob")

So AspNetItemValueLayoutRenderer.Item-property should remain a [RequiredParameter] (Since Item and ObjectPath should be working together)

@bakgerman
Copy link
Contributor Author

Altered the code to match the comment above.

@sonarcloud
Copy link

sonarcloud bot commented Nov 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

90.0% 90.0% Coverage
0.0% 0.0% Duplication

@snakefoot snakefoot added this to the 5.2 milestone Nov 27, 2022
@snakefoot
Copy link
Contributor

Thank you again for another fine contribution.

@bakgerman bakgerman deleted the object-path branch November 28, 2022 03:14
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