小编tar*_*afe的帖子

WCF依赖注入和抽象工厂

我有这个wcf方法

Profile GetProfileInfo(string profileType, string profileName)
Run Code Online (Sandbox Code Playgroud)

和业务规则:

如果profileType是从数据库中读取的"A".

如果profileType是从"xml"文件中读取的"B".

问题是:如何使用依赖注入容器实现它?

wcf dependency-injection factory-pattern

19
推荐指数
2
解决办法
8374
查看次数

列出OutputCache条目

在我的asp.net mvc应用程序中,我在不同的操作方法上使用OutputCache属性.是否可以查看与OutputCache属性相关的缓存中的当前条目?如果我在cicle上System.Web.HttpContext.Current.Cache我没有找到这种类型的条目.在此先感谢F.

asp.net asp.net-mvc caching outputcache asp.net-mvc-2

10
推荐指数
1
解决办法
3407
查看次数

Appfabric WF4-WCF服务,如何在没有httpcontext的情况下检索codeactivity中的当前url?

我已经开发了一个带有代码活动的wf-wcf服务,并且我想要检索服务的当前URL.如果我禁用appfabric的持久性功能,我可以使用检索URL

HttpContext.Current.Request.Url.ToString()
Run Code Online (Sandbox Code Playgroud)

如果启用了持久性功能,则httpcontext为null.

是否有不同的方法来检索承载我的代码活动的WCF的URL?

wcf workflow-foundation-4 appfabric

4
推荐指数
1
解决办法
1742
查看次数