static void Main(string[] args) { var order = new ForexOrder { AccountNumber = "1574078" }; var mailService = new MailService(); var documentService = new DocumentService(); order.OnForexOrderSave += mailService.HandleOrderSaveEvent; order.OnForexOrderSave += documentService.HandleOrderSaveEvent; order.Save(); Console.ReadLine(); }
public void OnSaveEvent(ForexOrder order) { OnForexOrderSave?.Invoke(this, new ForexOrderEventArgs { Order = order }); }