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

Allow member scrub/ignore with predicate #1268

Open
leorg99 opened this issue Aug 13, 2024 · 1 comment
Open

Allow member scrub/ignore with predicate #1268

leorg99 opened this issue Aug 13, 2024 · 1 comment

Comments

@leorg99
Copy link

leorg99 commented Aug 13, 2024

Is the feature request related to a problem

Take for example this class. I want to be able to scrub property/member names and string dictionary keys using a predicate where the member name is passed and I can return a bool indicating whether to scrub or ignore. This would allow me to do something like name => name.EndsWith("At");

Describe the solution

Add the following overload to public void ScrubMember(string name) and similar:

public void ScrubMember(Func<string, bool> predicate);

// Pass declaring type and name of member
public void ScrubMember(Func<Type, string, bool> predicate);

These may have to be Expression<T> parameters.

Describe alternatives considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the feature request here.

@SimonCropp
Copy link
Member

happy to consider a pull request for this

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

No branches or pull requests

2 participants