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

Feature: skipping members should also work for inherited interfaces #94

Open
ArnaudB88 opened this issue Nov 3, 2022 · 0 comments · May be fixed by #95
Open

Feature: skipping members should also work for inherited interfaces #94

ArnaudB88 opened this issue Nov 3, 2022 · 0 comments · May be fixed by #95

Comments

@ArnaudB88
Copy link

I want to request a feature which allows you to declare members to skip of an interface. When a class inherits from that interface, the specified members to skip will also affect the class.

Code:

//Skip members by interface
AutoFaker.Configure(builder =>
{
  builder.WithSkip<IEntityBase>(x => x.CreatedBy);
}

//Instead of by class:
AutoFaker.Configure(builder =>
{
  builder
    .WithSkip<EntityFoo>(x => x.CreatedBy)
    .WithSkip<EntityBar>(x => x.CreatedBy)
    .WithSkip<EntityOther>(x => x.CreatedBy);
}

I will submit a PR for this

@ArnaudB88 ArnaudB88 linked a pull request Nov 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant