当前位置: 动力学知识库 > 问答 > 编程问答 >

windows 8 - Where to register types (IoC) in a Windows8 store application?

问题描述:

Using Unity for my IoC on a Windows 8 application.

I wondering where the best place would be to register my types?

I'm currently considering doing it in the App.xaml.cs and overriding the OnLaunch event.

网友答案:

I think your approach is quite standard.

A little unrelated, but Unity has a bootstrapper for Prism WPF applications. I wonder if there is an equivalent out there for unity windows 8 applications:

http://msdn.microsoft.com/en-us/library/gg430868%28v=pandp.40%29.aspx

Regardless, I would follow this pattern just to remove some code from the App.xaml.cs file.

分享给朋友:
您可能感兴趣的文章:
随机阅读: