Verify icon indicating copy to clipboard operation
Verify copied to clipboard

Allow member scrub/ignore with predicate

Open leorg99 opened this issue 6 months ago • 1 comments

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.

leorg99 avatar Aug 13 '24 19:08 leorg99