Skip to content

Latest commit

 

History

History

adapter

Adapter pattern

In this example adapter pattern was used for conversion of two different electronic component objects into final one.
Extension method which you can see on second screenshot gives the client huge flexibility with using and creating new adapters.
Current implementation is more professional, but if you look for simpler way, feel free to check bonus folders where
you can see two basic implementations of adapter design - simple way and partial class way.

Client code

Client code

Extension method for objects adapting

Adapter implementation

What are we adapting

Files structure

Example adapter

Adapter example

Folders structure

Files structure