Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var video = new Video()
            {
                Title = "Video 1"
            };
            var videoEncoder   = new VideoEncoder();        // publisher
            var mailService    = new MailService();         // subscriber
            var messageService = new MessasgeService();     // subscriber

            videoEncoder.VideoEncoded += mailService.OnVideoEncoded;
            videoEncoder.VideoEncoded += messageService.OnVideoEncoded;

            videoEncoder.Encode(video);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Video v = new Video()
            {
                Title = "Video 1"
            };
            VideoEncoder   videoEncoder   = new VideoEncoder();   // Publisher
            MailService    mailService    = new MailService();    // Subscriber
            MessageService messageService = new MessageService(); // Subscriber

            videoEncoder.VideoEncoded += mailService.OnVideoEncoded;

            videoEncoder.VideoEncoded += messageService.OnVideoEncoded;

            videoEncoder.Encode(v);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This is the entry point of the project, Main() method.
        /// </summary>
        static void Main(string[] args)
        {
            log4net.Config.BasicConfigurator.Configure();
            var video = new Video()
            {
                Title = "Video 1"
            };
            var videoEncoder   = new VideoEncoder();         //Publisher
            var mailService    = new MailService();          //Subscriber
            var messageService = new MessageService();       //Subscriber

            videoEncoder.VideoEncoded += mailService.OnVideoEncoded;
            videoEncoder.VideoEncoded += messageService.OnVideoEncoded;

            videoEncoder.Encode(video);
            Console.WriteLine("Enter any key to exit.");
            Console.ReadKey();
        }