简体   繁体   English

是否有可与.NET客户端配置文件一起使用的模拟框架?

[英]Is there a mocking framework that works with the .NET Client Profile?

I have a somewhat exotic use case for a mocking framework. 对于模拟框架,我有一个有点奇怪的用例。 I would like to generate stub objects to be used by the WinForms designer in my client application. 我想生成由WinForms设计器在客户端应用程序中使用的存根对象。 The point is to enable dependency injection using a static service locator, while retaining drag-and-drop designer functionality. 关键是要使用静态服务定位器启用依赖项注入,同时保留拖放式设计器功能。

Unfortunately, all of the mocking frameworks I've tried require me to switch my application to use the full .NET framework profile. 不幸的是,我尝试过的所有模拟框架都要求我将应用程序切换为使用完整的.NET框架配置文件。

I'm wondering if there's any that work with the Client Profile. 我想知道是否有任何与客户端配置文件一起工作。 Something tells me that there might not be any - is there any inherent limitation to the Client Profile that makes it impossible to generate classes? 某件事告诉我,可能没有任何东西-Client Profile是否存在固有的限制,使得无法生成类?

最终,我认为这将很快变得无关紧要,因为.NET 4.5不再在客户端和完整配置文件之间划分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM