17 instantiations of DataClass
System.Windows.Forms.Tests (17)
System\Windows\Forms\ListBindingHelperTests.cs (17)
44yield return new object[] { new DataClass { Property = 1 }, "Property", 1 }; 45yield return new object[] { new DataClass { Property = 1 }, "property", 1 }; 51yield return new object[] { new IEnumerableWrapper(new object[] { new DataClass { Property = 1 } }), "Property", 1 }; 79yield return new object[] { new DataClass(), "NoSuchProperty" }; 188yield return new object[] { new DataClass(), "noSuchMember", typeof(object) }; 189yield return new object[] { new DataClass { Property = 1 }, "Property", typeof(int) }; 190yield return new object[] { new DataClass { Property = 1 }, "property", typeof(int) }; 245yield return new object[] { new DataClass(), new string[] { "Property" } }; 259yield return new object[] { new object[] { new DataClass() }, Array.Empty<string>() }; 263yield return new object[] { new IEnumerableWrapper(new object[] { new DataClass() }), new string[] { "Property" } }; 269yield return new object[] { new ArrayList { new DataClass() }, new string[] { "Property" } }; 317yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 332yield return new object[] { new DataClass(), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 445yield return new object[] { new DataClass(), "NoSuchProperty" }; 458Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray())); 459Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), null, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray())); 460Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), string.Empty, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray()));
24 references to DataClass
System.Windows.Forms.Tests (24)
System\Windows\Forms\ListBindingHelperTests.cs (24)
46yield return new object[] { typeof(DataClass), "NoSuchProperty", typeof(DataClass) }; 47yield return new object[] { typeof(DataClass), "Property", typeof(DataClass) }; 50yield return new object[] { new ListDataClass { ListProperty = [] }, "ListProperty", new List<DataClass>() }; 246yield return new object[] { typeof(DataClass), new string[] { "Property" } }; 249yield return new object[] { new List<DataClass>(), new string[] { "Property" } }; 250yield return new object[] { typeof(IList<DataClass>), new string[] { "Property" } }; 256yield return new object[] { Array.Empty<DataClass>(), new string[] { "Property" } }; 257yield return new object[] { typeof(DataClass[]), new string[] { "Property" } }; 275mockTypedList.Setup(t => t.GetItemProperties(null)).Returns(TypeDescriptor.GetProperties(typeof(DataClass))); 315yield return new object[] { null, TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 317yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 318yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 327var inner = new PropertyDescriptor[] { TypeDescriptor.GetProperties(typeof(MultiListDataClass))[0], TypeDescriptor.GetProperties(typeof(ListDataClass))[0], TypeDescriptor.GetProperties(typeof(DataClass))[0] }; 331yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 333yield return new object[] { typeof(DataClass), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 357mockTypedList.Setup(t => t.GetItemProperties(descriptors)).Returns(TypeDescriptor.GetProperties(typeof(DataClass))); 444yield return new object[] { typeof(DataClass), "NoSuchProperty" }; 492yield return new object[] { typeof(IEnumerable), new PropertyDescriptor[] { TypeDescriptor.GetProperties(typeof(DataClass))[0] }, "Int32" }; 677public List<DataClass> ListProperty { get; set; } 699return TypeDescriptor.GetProperties(typeof(DataClass)); 719return TypeDescriptor.GetProperties(typeof(DataClass));