Skip to content

Instantly share code, notes, and snippets.

@rohits79
Created June 12, 2016 14:02
Show Gist options
  • Select an option

  • Save rohits79/49236e288462c7985005fd8237c68d07 to your computer and use it in GitHub Desktop.

Select an option

Save rohits79/49236e288462c7985005fd8237c68d07 to your computer and use it in GitHub Desktop.
// creating duplicate regions via region.add correctly throws exception
var region = regionManager.Regions["ViewA"];
region.Add(unityContainer.Resolve<ViewA>());
region.Add(unityContainer.Resolve<ViewA>());
// creating duplicate regions via regionManager.AddToRegion does not throw exception
regionManager.AddToRegion("ViewA", unityContainer.Resolve<ViewA>());
regionManager.AddToRegion("ViewA", unityContainer.Resolve<ViewA>());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment