Ejemplo n.º 1
0
 public Person(string name, YoutubeChanel youtubeChanel)
 {
     youtubeChanel.SendNotification += (object sender, ExtraInfo info) =>
     {
         Console.WriteLine(name + " has opend the " + info.type);
     };
 }
Ejemplo n.º 2
0
        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();
        }