问题描述
面对Unity 2.0内置类(枚举等)的问题。
1)我有一个unitofwork类,其构造函数有一个参数 - IsoLationLevel,我想将它设置为IsolationLevel .ReadCommitted在使用基于Unity配置文件的注册构造对象时。我该怎么办?
2)我有一个记录器类,其构造函数有一个参数 - LogWriter(Enterprise Library Logging)我想在创建Logger类的实例时使用LogWriterFactory.Crete()传递一个LogWriter实例。我该怎么做?
谢谢和问候,
Sandip
Hi,
Facing an issue with Unity 2.0 for inbuilt classes(enums etc).
1) I have a unitofwork class whose constructor has a parameter - IsoLationLevel and I want to set it to IsolationLevel.ReadCommitted while constructing the object using unity config file based registration.How do I do that?
2) I have a logger class whose constructor has a parameter - LogWriter(of Enterprise Library Logging) and I want to pass an instance of LogWriter using LogWriterFactory.Crete() while creating the instance of Logger class.How do I do that?
Thanks and Regards,
Sandip
这篇关于团结问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!