Design Pattern Examples
Overview of object-oriented design patterns
Adapter_Exercise Class Reference

Example of using the Adapter Pattern in C#. More...

Collaboration diagram for Adapter_Exercise:
Collaboration graph

Public Member Functions

void Run ()
 Executes the example for the Adapter Pattern in C#.
 

Detailed Description

Example of using the Adapter Pattern in C#.

This example adapts functions that:

  1. Accesses memory in 32-bit chunks instead of bytes
  2. Returns error codes but no human-readable error messages

The DataReaderWriter class translates the 32-bit chunk access into arrays of bytes. The DataReaderWriter class also provides human-readable messages for error codes.

Definition at line 22 of file Adapter_Exercise.cs.

Member Function Documentation

◆ Run()

void Run ( )
inline

Executes the example for the Adapter Pattern in C#.

Definition at line 28 of file Adapter_Exercise.cs.

Referenced by Program.Run().


The documentation for this class was generated from the following file: