65.9K
CodeProject is changing. Read more.
Home

Calcium SDK: Replace IShell Implementation

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.33/5 (3 votes)

Feb 19, 2010

CPOL
viewsIcon

10030

When using the Calcium SDK[^]to replace the shell implementation entirely with your own implementation, use:void Application_Startup(object sender, StartupEventArgs e){ var container = new UnityContainer(); ServiceLocatorSingleton.Instance.InitializeServiceLocator(container); ...

When using the Calcium SDK[^] to replace the shell implementation entirely with your own implementation, use:
void Application_Startup(object sender, StartupEventArgs e)
{
  var container = new UnityContainer();
  ServiceLocatorSingleton.Instance.InitializeServiceLocator(container);
  var shell = new YourCustomShell();
  container.RegisterInstance<IShell>(shell);
}
Or in VB:
Sub Application_Startup(sender As Object, e As StartupEventArgs)
	Dim container As var = New UnityContainer()
	ServiceLocatorSingleton.Instance.InitializeServiceLocator(container)
	Dim shell As var = New RonsShell()
	container.RegisterInstance(Of IShell)(shell)
End Sub