Skip to content

Instantly share code, notes, and snippets.

@rohits79
Created June 13, 2016 06:46
Show Gist options
  • Save rohits79/29f464fba87ceac2d178c04b234ed5b3 to your computer and use it in GitHub Desktop.
Save rohits79/29f464fba87ceac2d178c04b234ed5b3 to your computer and use it in GitHub Desktop.
public IRegion Initialize(T regionTarget, string regionName)
{
if (regionName == null)
throw new ArgumentNullException(nameof(regionName));
IRegion region = this.CreateRegion();
region.Name = regionName;
SetObservableRegionOnHostingControl(region, regionTarget);
this.Adapt(region, regionTarget);
this.AttachBehaviors(region, regionTarget);
this.AttachDefaultBehaviors(region, regionTarget);
return region;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment