本文介绍了团结问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  面对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

解决方案


这篇关于团结问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 18:53