Skip to content

Instantly share code, notes, and snippets.

@pedropombeiro
Last active October 11, 2015 10:38
Show Gist options
  • Save pedropombeiro/3846303 to your computer and use it in GitHub Desktop.
Save pedropombeiro/3846303 to your computer and use it in GitHub Desktop.
Unity.AutoFactory usage
this.unityContainer
.RegisterAutoFactoryFor<ICustomer, Customer>()
.WithoutParameters();
this.unityContainer
.RegisterAutoFactoryFor<ICustomerViewModel, CustomerViewModel>()
.WithParam<ICustomer>();
@pedropombeiro
Copy link
Author

The factory is available throught the IUnityFactory<ICustomer, ICustomerViewModel> generic type.

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