namespace Jint.Tests.TestClasses; public class IndexedProperty { Action Setter { get; } Func Getter { get; } public IndexedProperty(Func getter, Action setter) { Getter = getter; Setter = setter; } public TValue this[TIndex i] { get => Getter(i); set => Setter(i, value); } } public class IndexedPropertyReadOnly { Func Getter { get; } public IndexedPropertyReadOnly(Func getter) { Getter = getter; } public TValue this[TIndex i] { get => Getter(i); } } public class IndexedPropertyWriteOnly { Action Setter { get; } public IndexedPropertyWriteOnly(Action setter) { Setter = setter; } public TValue this[TIndex i] { set => Setter(i, value); } }