1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Collections.Generic; 6 using System.Reflection; 7 8 namespace System.Linq.Expressions.Tests 9 { 10 internal class SampleClassWithProperties 11 { 12 internal readonly PropertyInfo DefaultIndexer = typeof(List<int>).GetProperty("Item"); 13 internal readonly ConstantExpression[] DefaultArguments = { Expression.Constant(0) }; 14 15 internal MemberExpression DefaultPropertyExpression => Expression.Property(Expression.Constant(this), 16 typeof(SampleClassWithProperties).GetProperty(nameof(DefaultProperty))); 17 18 internal IndexExpression DefaultIndexExpression => Expression.MakeIndex( 19 DefaultPropertyExpression, 20 DefaultIndexer, 21 DefaultArguments); 22 23 public List<int> DefaultProperty { get; set; } 24 25 public List<int> AlternativeProperty { get; set; } 26 } 27 } 28