Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
Unity DI 中的 AutoMapper 注册
我对 Unity 或 StructureMap 不太熟悉 如何将以下 StructureMap 注册示例转换为 Unity 注册语法 public class ConfigurationRegistry Registry public Co
c
unitycontainer
AutoMapper
registration
DEI原则下Ctor参数应该注入什么?
我试图了解哪些对象应该注入到对象中 哪些对象应该在内部创建 如果我有一些List
c
dependencyinjection
unitycontainer
ioccontainer
ASP.NET MVC ContactsManager 教程中是否有解决依赖注入循环问题的好/正确方法?
如果您不知道我在说什么 请查看教程并尝试自己添加依赖注入 或者尝试我对问题的解释 Note 此问题不属于 ASP NET 原始教程的范围 本教程仅表明所使用的模式是依赖注入友好的 问题基本上是控制器 ModelStateWrapper 和
ASPNETMVC
dependencyinjection
inversionofcontrol
unitycontainer
使用 Unity 进行通用依赖注入
我们将现有的日志记录库包装在 C 应用程序中我们自己的日志记录服务中 以便使用针对某些日志记录情况的预定义方法来包围它 public class LoggingBlockLoggingService ILoggingService priv
c
dependencyinjection
unitycontainer
如何在主容器中注册类型,但在子容器中解析?
我有一个统一容器并使用RegisterType使用以下方法注册以下存储库和实现者ContainerControlledLifetimeManager public interface IPersonRepository Person Get
c
dependencyinjection
unitycontainer
如何配置 Unity 为 IEnumerable 注入数组
我有一个课程需要IEnumerable我想用 Unity 解析它的构造函数参数并注入一个对象数组 这些简单的类说明了问题 public interface IThing int Value get public class SimpleTh
dependencyinjection
inversionofcontrol
unitycontainer
constructorinjection
使用模板 10 进行依赖注入
我正在尝试将一些代码从我使用 Prism Unity 开发的旧 Windows 8 1 应用程序迁移到使用 Template 10 和 Unity 的新 UWP 应用程序 我在模板10的文档中看到here你能行override the Re
c
dependencyinjection
unitycontainer
template10
在 ASP.NET 中使用 Unity.WebForms
我正在尝试在 webforms 项目中实现 DI 因此我在 UI 层中安装了 Unity WebForms dll 一旦我这样做 就会使用 UnityWebFormsStart 类文件为我创建一个 App Start 文件夹 该文件内有一个
dependencyinjection
webforms
unitycontainer
典型的 IoC 容器用法 - 向下传递数据
我最近开始使用IoC第一次使用容器 但我没有接受过使用它的最佳实践的教育 更具体地说我正在使用Unity在一个 C NET 项目中 我开始使用它 因为它附带Prism 我使用容器来解析 顶级 对象 并且它们根据容器获得注入的正确对象 但是
c
NET
unitycontainer
ioccontainer
Unity - 通过 XML 的工厂
我使用 Unity 框架作为 IoC 容器 我的配置看起来像这样
c
NET
dependencyinjection
inversionofcontrol
unitycontainer
Unity为非泛型接口注册泛型类型
我的场景 对我来说 看起来非常简单 但我找不到解决方案 我有这样的场景 public class Class
c
NET
generics
unitycontainer
国际奥委会容器。注入容器
我想要的 解析对象 A 在对象 A 内部 我想使用相同的容器来解析对象 C public static void Work IUnityContainer con new UnityContainer con RegisterType
c
inversionofcontrol
unitycontainer
ioccontainer
如何使用 Unity 的 xml 配置创建和填充 Dictionary
?
如何使用 Unity 的 xml 配置创建和填充字典 我需要创建一个字典并使用统一的依赖项引用填充对象 我怎样才能做到这一点 这有效
c
NET
unitycontainer
企业库 Unity 与其他 IoC 容器 [关闭]
Closed 这个问题是基于意见的 目前不接受答案 使用 Enterprise Library Unity 与其他 IoC 容器 Windsor Spring Net Autofac 相比有何优缺点 我正在为用户组准备演示文稿 因此 我刚刚
c
NET
inversionofcontrol
unitycontainer
enterpriselibrary
访问视图模型类中的统一容器
我有一个看起来像工具栏的外壳 它定义了我的主要区域 包裹面板 我需要做的是能够将小部件添加到外壳中 并且当单击小部件时 会打开一个新窗口 视图 以下是我到目前为止所拥有的 我创建了一个模块类 它将视图添加到主区域 public class
WPF
MVVM
unitycontainer
prism
无法使用 Unity 将 DBContext 注入我的 Web API 2 控制器
我已经研究了好几天了 但我无法让 Unity 注入任何东西RegisterType lt gt 进入我的Controller 我在 Visual Studio 2015 中使用 Web Api 2 和 Unity 4 每当我尝试注入时IUn
Unity批量注册按惯例
我正在尝试在 Unity IoC 中执行与以下 Autofac 代码等效的操作 builder RegisterAssemblyTypes typeof DataRepository lt gt Assembly Where t gt t
c
inversionofcontrol
unitycontainer
ioccontainer
Unity DI 使用 PerRequestLifetimeManager 注入 DbContext
我有以下使用 Unity 初始化实例的代码 IUnityContainer container new UnityContainer container RegisterType
c
NET
EntityFramework
unitycontainer
使用 Unity(而不是温莎城堡)可以实现这一点吗?
This 博客文章展示了一种使用 Castle Windsor 和 NSubstitute 实现自动模拟的方法 我不知道也不使用 Castle Windsor 但我确实使用 Unity 和 NSubstitute 有没有办法使用 Unity
inversionofcontrol
unitycontainer
如何将 Unity 与内部类一起使用?
我有一个 Web API 应用程序 并使用 Unity 进行依赖项注入 该应用程序使用包含接口 IDoStuff 和实现该接口的类的库 internal interface IDoStuff void DoSomething interna
c
aspnet
dependencyinjection
inversionofcontrol
unitycontainer
«
1
2
3
4
5
6
7
»