diff --git a/lib/src/Core/IEventHandler.dart b/lib/src/Core/IEventHandler.dart index 35d6434..3c3a18f 100644 --- a/lib/src/Core/IEventHandler.dart +++ b/lib/src/Core/IEventHandler.dart @@ -1,7 +1,10 @@ import 'dart:async'; +import 'PropertyModificationInfo.dart'; + class IEventHandler { - final _propertyModifiedController = StreamController(); + final _propertyModifiedController = + StreamController(); Map> _events = {}; @@ -11,10 +14,11 @@ class IEventHandler { IEventHandler() {} - Stream get properyModified => _propertyModifiedController.stream; + Stream get properyModified => + _propertyModifiedController.stream; - emitProperty(String name) { - _propertyModifiedController.add(name); + emitProperty(PropertyModificationInfo event) { + _propertyModifiedController.add(event); } emitArgs(String event, List arguments) { diff --git a/lib/src/Core/PropertyModificationInfo.dart b/lib/src/Core/PropertyModificationInfo.dart new file mode 100644 index 0000000..01250c1 --- /dev/null +++ b/lib/src/Core/PropertyModificationInfo.dart @@ -0,0 +1,14 @@ +import '../Resource/IResource.dart'; +import '../Resource/Template/PropertyTemplate.dart'; + +class PropertyModificationInfo { + final PropertyTemplate propertyTemplate; + final value; + final int age; + final IResource resource; + + String get name => propertyTemplate.name; + + PropertyModificationInfo( + this.resource, this.propertyTemplate, this.value, this.age); +}