public Person(string name, YoutubeChanel youtubeChanel) { youtubeChanel.SendNotification += (object sender, ExtraInfo info) => { Console.WriteLine(name + " has opend the " + info.type); }; }
static void Main(string[] args) { //videoEncoder videoEncoder = new videoEncoder();//Publisher //notification notification = new notification();//Subriber //videoEncoder.myevent += notification.notify; //videoEncoder.EncodingVideo(); //Console.ReadKey(); YoutubeChanel newChanel = new YoutubeChanel(); Person issam = new Person("issam", newChanel); Person Chaimae = new Person("Chaimae", newChanel); newChanel.ShareVideo(); newChanel.ShareState(); Console.ReadKey(); }