Builder ReadOnly( bool makeReadOnly )

robot_2Generated
code_blocksInput

Description

The ReadOnly method in the Sandbox.Bind.Builder struct is used to configure the builder to treat the binding as read-only. This means that the target property or field will not be modified by the binding system, effectively making the binding one-way from the source to the target.

Usage

To use the ReadOnly method, call it on an instance of Sandbox.Bind.Builder and pass a boolean value indicating whether the binding should be read-only. If true, the binding will be set to read-only; if false, the binding will allow modifications to the target.

Example

// Example of using the ReadOnly method
var builder = new Sandbox.Bind.Builder();
builder.ReadOnly(true); // Set the binding to be read-only

// Continue configuring the builder as needed
builder.Set(someObject, "PropertyName").From(anotherObject, "SourceProperty");