开发者

Using MEF, inject into an Import class

I have a logger interface that I inject into many 开发者_如何转开发different classes, can I inject that class in say a repository class, which is also an Import class which is injected into other classes?

Hope that makes sense, I'm a little confused by it myself.

Thx


Yes, a class can both import and export parts.

Glenn Block explains it well in his article Managed Extensibility Framework: Building Composable Apps in .NET 4 with the Managed Extensibility Framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜