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

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

Collaboration diagram for Facade_Exercise:
Collaboration graph

Public Member Functions

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

Private Member Functions

void _Facade_ShowIdCodes (int chainIndex, uint[] idcodes)
 Helper method to present a formatted list of idcodes for a particular device chain. The output is on a single line.
 

Detailed Description

Example of using the Facade Pattern in C#.

The Facade pattern is used when a simplified version of an interface on a complicated sub-system is needed in situations where the whole complicated sub-system does not need to be exposed.

In this example, the complicated subsystem is a representation of a device network complete with scan chains, device idcodes, and device devices that can be selected and deselected. The Facade exposed by this complex network exposes only the scan chain, getting device idcodes based on an index into those scan chains, resetting the scan chains and selecting a device to appear in the scan chain.

Definition at line 26 of file Facade_Exercise.cs.

Member Function Documentation

◆ _Facade_ShowIdCodes()

void _Facade_ShowIdCodes ( int  chainIndex,
uint[]  idcodes 
)
inlineprivate

Helper method to present a formatted list of idcodes for a particular device chain. The output is on a single line.

Parameters
chainIndexIndex of the device chain being displayed.
idcodesArray of 32-bit idcodes to be printed in hex.

Definition at line 34 of file Facade_Exercise.cs.

Referenced by Facade_Exercise.Run().

◆ Run()


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