UnityBootstrapper のメソッド ConfigureContainer() は、あなたが求めていることを行うためにオーバーライドされるはずです:
MSDN - コンテナの構成:
複合アプリケーション ライブラリとその上に構築されたアプリケーションの両方が、必要な依存関係を注入するためのコンテナーに依存します。UnityBootstrapper の次のコードに示すように、コンテナーの構成フェーズ中に、いくつかのコア サービスが登録されます。
UnityBootstrapper の MSDN
MSDN の例:
protected virtual void ConfigureContainer()
{
…
if (useDefaultConfiguration)
{
RegisterTypeIfMissing(typeof(IServiceLocator), typeof(UnityServiceLocatorAdapter), true);
RegisterTypeIfMissing(typeof(IModuleInitializer), typeof(ModuleInitializer), true);
RegisterTypeIfMissing(typeof(IModuleManager), typeof(ModuleManager), true);
RegisterTypeIfMissing(typeof(RegionAdapterMappings), typeof(RegionAdapterMappings), true);
RegisterTypeIfMissing(typeof(IRegionManager), typeof(RegionManager), true);
RegisterTypeIfMissing(typeof(IEventAggregator), typeof(EventAggregator), true);
RegisterTypeIfMissing(typeof(IRegionViewRegistry), typeof(RegionViewRegistry), true);
RegisterTypeIfMissing(typeof(IRegionBehaviorFactory), typeof(RegionBehaviorFactory), true);
}
}
Containerすでに行っているように、直接使用して、ここなどでインスタンスを登録することもできます。
CreateShell() メソッドはこれを行う場所ではありません。ここでシェルを作成する以外に何もする必要はありません。
つまり、ConfigureCatalog() をオーバーライドしてコードを貼り付けるだけです。