static TestProxy6() { TestProxy6.collectionPropertyAdapter = ObservableObject.GetPropertyAdapterFactory <TestProxy6>().Create( nameof(TestProxy6.CollectionProperty), _ => TestProxy6.ReturnOrThrow(_.Source.PropertyCollection, _.ThrowException), (_, item) => new TestProxy6(item, _.Source.Property)); }
public TestProxy6(TestObject value, int property = 0) { this.Source = value; this.DependentProperty = property; this.collectionPropertyAdapter = this.CreatePropertyAdapter( nameof(this.CollectionProperty), () => TestProxy6.ReturnOrThrow(this.Source.PropertyCollection, this.ThrowException), item => new TestProxy6(item, value.Property)); }
static TestProxy6() { TestProxy6.collectionPropertyAdapter = ObservableObject.GetPropertyAdapterFactory <TestProxy6>().Create( nameof(TestProxy6.CollectionProperty), _ => TestProxy6.ReturnOrThrow(_.Source.PropertyCollection, _.ThrowException), (_, item) => new TestProxy6(item, _.Source.Property)); TestProxy6.deferredCollectionPropertyAdapter = ObservableObject.GetPropertyAdapterFactory <TestProxy6>().Create( nameof(TestProxy6.DeferredCollectionProperty), _ => new[] { 1, 2, 3 }.SkipWhile(item => item < _.DependentProperty).TakeWhile(item => item <= _.DependentProperty), (_, item) => item); }