-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathProgram.cs
30 lines (27 loc) · 814 Bytes
/
Program.cs
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
28
29
30
using CoRDesignPattern.Abstract;
using CoRDesignPattern.Concrete;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CoRDesignPattern
{
class Program
{
static void Main(string[] args)
{
PlayerHandler mp5Player = new Handlermp5();
PlayerHandler mp3Player = new Handlermp3();
PlayerHandler mp4player = new Handlermp4();
mp3Player.NextHandler = mp4player;
mp4player.NextHandler = mp5Player;
mp5Player.Player("video.mp5");
mp3Player.Player("video.mp5");
mp3Player.Player("video.mp4");
mp3Player.Player("video.swf");
mp3Player.Player("video.mp3");
Console.Read();
}
}
}