// "Adapter" class Adapter : Adaptee, ITarget { // Implements ITarget interface publicvoid Request() { // Possibly do some data manipulation // and then call SpecificRequest this.SpecificRequest(); } }
/**//// /// Client test /// publicclass Client { publicstaticvoid Main(string[] args) { // Create adapter and place a request ITarget t =new Adapter(); t.Request(); } }