From 25a01a6247cdde83ebcbb49edfffbe73c118b928 Mon Sep 17 00:00:00 2001 From: VerKse Date: Sat, 16 Mar 2019 14:04:33 +0300 Subject: [PATCH] Update ProductEventArgs.cs --- ProductEventArgs.cs | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/ProductEventArgs.cs b/ProductEventArgs.cs index a79a6d6..6a2b44a 100644 --- a/ProductEventArgs.cs +++ b/ProductEventArgs.cs @@ -1,4 +1,4 @@ -namespace Events +namespace Events { /// /// Класс, который служит для передачи аргументов @@ -8,11 +8,32 @@ /* * TODO #1 Закончить определение класса ProductEventArgs */ - class ProductEventArgs + public class EventArgs { + public static readonly EventArgs Empty = new EventArgs(); + public EventArgs() { } + } + + + class ProductEventArgs : EventArgs + { + + public string oldName { get; } + public decimal oldPrice { get; } /* * TODO #2 Добавить определение необходимых компонент * класса ProductEventArgs */ + + public ProductEventArgs(string oldName) + { + this.oldName = oldName; + } + + public ProductEventArgs(decimal oldPrice) + { + this.oldName = oldPrice; + + } } }