Namespace Eco.Core.PropertyHandling
Classes
DependsOnMemberAttribute
[PropertyChanged.DependsOn] will only perform triggers on properties. This attribute does the same, but can provide triggers on methods as well. It also can watch things besides props: events and anything notifying. See wiki guide here: https://github.com/StrangeLoopGames/Eco/wiki/Watching-System
DependsOnMemberBaseAttribute
Abstract root to share an implementation for our watchers that trigger change notifications.
DependsOnSubMemberAttribute
An override for fody's 'DependsOn' attirbute that allows watching a specific sub prop, and the prop or subprop could either be events. NOTE: If you are watching subproperties on a getter-only property, the sub properties wont start tracking until the first property change notification goes out for that root property. Youll need to manually make sure this happens, or set up its dependencies to detect other members changing and do its initialization there. See wiki guide here: https://github.com/StrangeLoopGames/Eco/wiki/Watching-System ///
MemberChangedBeforeAfterEventArgs
System.ComponentModel.PropertyChangedEventArgs extended with Before and After values. Both Before and After will be null if not available. We rename from the root 'property' to 'member' because this is used for methods as well.
PropertyChangedBeforeAfterEventHandler
PropertyChanges
PropertyChanges is a class for managing property subscriptions both global and per instance.
Global(Un)Subscribe
methods may be used for global subscriptions (for all-instances)
and FirePropertyChanged(INotifyPropertyChangedInvoker, String, Object, Object) should be used to fire both per-instance and global PropertyChanged events.
Usually used in conjunction with Fody PropertyChangedNotificationInterceptor.Intercept
which may be implemented as:
public static class PropertyChangedNotificationInterceptor2
{
public static void Intercept(INotifyPropertyChangedInvoker invoker, string propertyName, object? before, object? after) => PropertyChanges.FirePropertyChanged(invoker, propertyName, before, after);
}
Read more about property changes in README.md.
SubPropWatcherFlag
TooltipAffectedByAttribute
Put on an extension method with NewTooltipAttribute to mark that tooltip part as dirty when CallWhenChangedAttribute.Property changes in any instance of the extension method's type.
WatchSubMemberAttribute
When put on a property, will create subscriptions watching a given sub-property to change, and trigger the corresponding method or event.
Interfaces
INotifyPropertyChangedInvoker
Interface for external invocation of System.ComponentModel.INotifyPropertyChanged.PropertyChanged event.