Show / Hide Table of Contents

Class RecursiveSubscriptions

Helper object for implementing proper recursive subscriptions for the complex structures. For example, it is used in Election.cs for updating Description which includes information about different civics objects.

Inheritance
System.Object
RecursiveSubscriptions
Namespace: Eco.Core.Utils
Assembly: Eco.Core.dll
Syntax
public class RecursiveSubscriptions : Object

Constructors

RecursiveSubscriptions(ISubscriptions<ThreadSafeSubscriptions>, Action<PropertyInfo, Object>)

Declaration
public RecursiveSubscriptions(ISubscriptions<ThreadSafeSubscriptions> subscriptions, Action<PropertyInfo, object> callback)
Parameters
Type Name Description
ISubscriptions<ThreadSafeSubscriptions> subscriptions
System.Action<System.Reflection.PropertyInfo, System.Object> callback

Methods

SubscribeRecursive(IController)

Subscribe for the controller recursively, so changes in the nested objects are tracked too. Remember subscriptions for this controller for the future Unsubscribe process.

Declaration
public void SubscribeRecursive(IController controller)
Parameters
Type Name Description
IController controller

UnsubscribeRecursive(IController)

Clear all subscriptions for the controller. We won't forget anything cause all subscriptions were properly stored.

Declaration
public void UnsubscribeRecursive(IController controller)
Parameters
Type Name Description
IController controller

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾