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

Fix reflection based destructuring for redefined property #344

Merged
merged 11 commits into from
May 26, 2021

Conversation

krajek
Copy link
Collaborator

@krajek krajek commented May 15, 2021

I may prepare another fix to tackle the problem of gathering properties from a type taking into account possible redefinitions.
However, I consider the change proposed here good practice for library robustness.

Fixes #343

@krajek
Copy link
Collaborator Author

krajek commented May 15, 2021

@RehanSaeed if you think this is good, please release a new version, I lost track of how to do that :-).

Copy link
Owner

@RehanSaeed RehanSaeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a small suggestion.

Source/Serilog.Exceptions/Core/ExceptionPropertiesBag.cs Outdated Show resolved Hide resolved
@krajek
Copy link
Collaborator Author

krajek commented May 21, 2021

@RehanSaeed can we merge this?

@RehanSaeed
Copy link
Owner

Sorry, will take a look on Monday.

@krajek
Copy link
Collaborator Author

krajek commented May 22, 2021

Sorry, will take a look on Monday.

Thanks, in the meantime I will start working on next PR based on this one 👍

private readonly Exception exception;
private readonly IExceptionPropertyFilter? filter;
private readonly Dictionary<string, object?> properties = new();
private readonly Dictionary<string, object?> properties = new ();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got some warings because:

The keyword 'new' should not be followed by a space

@RehanSaeed
Copy link
Owner

@krajek Shall we go with #347 instead and maybe roll all changes into that PR?

@krajek
Copy link
Collaborator Author

krajek commented May 24, 2021

If you do not care I would rather merge this and then consider #347 separately.
I really am a fan of small targeted pull requests :-).

@RehanSaeed RehanSaeed added enhancement Issues describing an enhancement or pull requests adding an enhancement. minor Pull requests requiring a minor version update according to semantic versioning. labels May 26, 2021
@RehanSaeed RehanSaeed merged commit a4aa407 into main May 26, 2021
@RehanSaeed RehanSaeed deleted the feature/refedined-property branch May 26, 2021 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues describing an enhancement or pull requests adding an enhancement. minor Pull requests requiring a minor version update according to semantic versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception with redefined property(new modifier) stops enrichment altogether
3 participants