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

If Builder is going to be instance-based, it should be Builder instead of Builder<T> #51

Closed
crmckenzie opened this issue Aug 12, 2016 · 2 comments

Comments

@crmckenzie
Copy link
Collaborator

Further, this instance-based change is going to break a lot of code. I'm planning on restoring Builder as static and marking it obsolete to be deleted in the 5.0 release along with .net core support.

@crmckenzie crmckenzie added this to the 4.0 Release milestone Aug 12, 2016
@PureKrome
Copy link
Contributor

Question: Will it be Builder<T> in v 5?

@crmckenzie
Copy link
Collaborator Author

I don't think so. Instead, the methods on Builder should be generic. I don't want to have to create a separate builder for every type I want to build. In my mind, a builder maps to a BuilderConfiguration, but I should be able to build multiple types from the same configuration.

  var builder = new Builder(new MyBuilderConfiguration());
  var customers = builder.CreateListOfSize<Customer>(5);
  var products = builder.CreateListOfSize<Product>(25);
  // etc

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

No branches or pull requests

2 participants