Astra Child

Bindy Value

Estimated reading: 2 minutes 0 views

What is Bindy Value?

Bindy Value is a class used to bind a value to a target object and a variable name. It serves as the value that is synchronized between Bindables that are connected to the same Bind object. Bindy Value can be of any type, including custom types.

How it works

Bindy Value is a reflection-based system that can be bound to either a public field or property of a target object. It uses reflection to determine the type of the value and whether it is readable or writable.

Once Bindy Value is bound to a target object and a variable name, it can get and set values using the GetValue() and SetValue() methods. Bindy Value also has an onValueChanged event that is invoked when its value changes.

Role in the Bindy system

Bindy Value is a key component of the Bindy system, allowing Bindables to synchronize their values with other Bindables connected to the same Bind object. It ensures that the synchronized values are up-to-date, even if they are of different types or have different read/write permissions.

In summary, Bindy Value is a powerful and flexible tool for synchronizing values between objects in the Bindy system. Its reflection-based system allows it to work with any type of value and any object that has public fields or properties.

Share this Doc
CONTENTS
Scroll to Top