using System; namespace RosettaUI { /// /// Getter, which targets a portion of the parents /// public abstract class ChildGetter : GetterBase { protected readonly IGetter parentGetter; protected ChildGetter(IGetter parentGetter) { this.parentGetter = parentGetter; } protected abstract TValue GetFromChild(TParent get); protected override TValue GetRaw() => GetFromChild(parentGetter.Get()); public override bool IsNull => parentGetter.IsNull; public override bool IsNullable => parentGetter.IsNullable; public override bool IsConst => parentGetter.IsConst; public override Type ValueType => typeof(TValue); } }