你的位置: 码友网首页 / 资讯源列表 / Design patterns in C# - The Adapter Pattern

关于[Design patterns in C# - The Adapter Pattern]的摘要:

Hello again, in this post I'm continuing my series on design patterns in C#, this time focusing on the adaptor pattern! The adapter pattern is useful when you want to use a class that does not fit the design of your existing solution. This is often the case when using legacy or external code. The adapter pattern allows you to define a wrapper which executes the desired behaviour, but exposes it through a method which your solution expects. As always, I think this will become clearer when we delve into our (dinosaur-based) example.

原文地址: https://endjin.com/blog/2020/10/design-patterns-in-csharp-the-adapter-pattern

收录时间: 2020-10-23 浏览量: 1583 分类: 设计模式

| 0 收藏 | 0