static void Main(string[] args) { var video = new video() { Title = "v1" }; var videoencode = new VideoEncoder(); // publisher var mailservice = new MailService(); // subscriber videoencode.VideoEncoded += mailservice.OnVideoEncode; videoencode.Encode(video); var list = new List <string>(); Console.ReadKey(); }
public void Encode(video video) { Console.WriteLine("Encoding.."); Thread.Sleep(3000); OnVideoEncoded(); }