开发者

Calling COM from .NET, is it an example of Adapter pattern?

If I write a code that calls COM component from .NET, is it开发者_StackOverflow社区 an example of Adapter pattern?


The Runtime Callable Wrapper (RCW) functionality in .NET is more an application of the Proxy pattern, because the .NET class mirrors the interface of the underlying COM component.

Quote from Sourcemaking:

Adapter provides a different interface to its subject. Proxy provides the same interface.

Related resources:

  • Runtime Callable Wrapper (RCW)
  • Proxy Design Pattern
  • Adapter Design Pattern


The pinvoke dll generated by Visual studio is already an adapter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜