【问题标题】:Instantiating and configuring loggers in Enterprise Library 5.0 + Silverlight在 Enterprise Library 5.0 + Silverlight 中实例化和配置记录器
【发布时间】:2012-05-11 12:35:33
【问题描述】:

我在 Silverlight 项目中使用 Enterprise Library 5.0,Logging 块。 在我希望能够实例化记录器的项目中,我相信正确的类是 LogWriterImpl。 而且我还希望能够使用 Xml 配置来配置这个 LogWriterImpl,所以最后我想要这样的东西:

public class LoggerFactory
{
    public LoggerWriter Create(string xmlFilePath)
    {
        // Load configuration from xmlFilePath
        ???

        // Read the configuration and create the parameters for the LogWritterImpl
        ???

        // In Silverlight there are several constructors for the LogWritterImpl class
        // which one to use? which arguments to use?
        var logger = new LogWritterImpl( /* which parameters go here? */ );

        return logger;
    }
}

谁能帮我填空?

感谢您的宝贵时间!

【问题讨论】:

    标签: silverlight enterprise-library


    【解决方案1】:

    查看此演练: http://channel9.msdn.com/posts/Enterprise-Library-for-Silverlight-Logging-demo

    演示的源代码是here

    另外,请参阅开发者指南的this chapter

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-29
      • 1970-01-01
      • 1970-01-01
      • 2011-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多