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

Exclude some properties from the With method parameter list #7

Open
bboyle1234 opened this issue Sep 11, 2019 · 0 comments
Open

Exclude some properties from the With method parameter list #7

bboyle1234 opened this issue Sep 11, 2019 · 0 comments

Comments

@bboyle1234
Copy link

bboyle1234 commented Sep 11, 2019

In the case of the class, I'd like the generated With method to create a new object updating Price but not capable of updating 'Id'.
Can we decorate the 'Id' property to prevent it being included in the With method parameter list?

[ImmutableClass]
class StockStatus { 
  [SomeExcludeAttribute]
  public string Id { get; } // Wish to exclude this from the With method
  public decimal Price { get; }
}
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

No branches or pull requests

1 participant