【发布时间】:2013-11-27 05:43:27
【问题描述】:
假设我有一个接口 IMyComponent,我想直接或通过 WCF 或其他通信渠道调用它,我应该如何设计它?
我的想法:
将其拆分为提供者和消费者部分:
IMyComponentProvider: IMyComponent
IMyComponentConsumer: IMyComponent
并构建一个将这两个接口连接在一起的对象:
MyComponent (MyComponentProvider)
问题:
- 有哪些替代方案,尤其是使用 autofac?
- 哪种设计模式适用于此以及替代方案?
- 哪些命名约定有用或标准?
【问题讨论】:
-
也许这是“责任链”?
标签: c# interface communication autofac channel