- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTestBridge.cs
More file actions
Latest commit
27 lines (24 loc) · 952 Bytes
/
Copy pathTestBridge.cs
File metadata and controls
27 lines (24 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
namespaceStructuralPatterns.Bridge;
publicstaticclassTestBridge
{
publicstaticvoidRun()
{
// Abstraction-Implementation combination 1 => Smart TV + Physical Remote
varsmartTv=newSmartTv();
varphysicalRemote=newPhysicalRemote(smartTv);
physicalRemote.PowerOn();
physicalRemote.VolumeUp();
physicalRemote.PowerOff();
// Abstraction-Implementation combination 2 => Smart TV + Smart App Remote
varsmartAppRemote=newSmartAppRemote(smartTv);
smartAppRemote.PowerOn();
smartAppRemote.VolumeUp();
smartAppRemote.PowerOff();
// Abstraction-Implementation combination 3 => Normal TV + Physical Remote
varnormalTv=newNormalTv();
varphysicalRemote2=newPhysicalRemote(normalTv);
physicalRemote2.PowerOn();
physicalRemote2.VolumeUp();
physicalRemote2.PowerOff();
}
}