17 instantiations of DataClass
System.Windows.Forms.Tests (17)
System\Windows\Forms\ListBindingHelperTests.cs (17)
42yield return new object[] { new DataClass { Property = 1 }, "Property", 1 }; 43yield return new object[] { new DataClass { Property = 1 }, "property", 1 }; 49yield return new object[] { new IEnumerableWrapper(new object[] { new DataClass { Property = 1 } }), "Property", 1 }; 77yield return new object[] { new DataClass(), "NoSuchProperty" }; 186yield return new object[] { new DataClass(), "noSuchMember", typeof(object) }; 187yield return new object[] { new DataClass { Property = 1 }, "Property", typeof(int) }; 188yield return new object[] { new DataClass { Property = 1 }, "property", typeof(int) }; 243yield return new object[] { new DataClass(), new string[] { "Property" } }; 257yield return new object[] { new object[] { new DataClass() }, Array.Empty<string>() }; 261yield return new object[] { new IEnumerableWrapper(new object[] { new DataClass() }), new string[] { "Property" } }; 267yield return new object[] { new ArrayList { new DataClass() }, new string[] { "Property" } }; 315yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 330yield return new object[] { new DataClass(), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 443yield return new object[] { new DataClass(), "NoSuchProperty" }; 456Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray())); 457Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), null, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray())); 458Assert.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)
44yield return new object[] { typeof(DataClass), "NoSuchProperty", typeof(DataClass) }; 45yield return new object[] { typeof(DataClass), "Property", typeof(DataClass) }; 48yield return new object[] { new ListDataClass { ListProperty = [] }, "ListProperty", new List<DataClass>() }; 244yield return new object[] { typeof(DataClass), new string[] { "Property" } }; 247yield return new object[] { new List<DataClass>(), new string[] { "Property" } }; 248yield return new object[] { typeof(IList<DataClass>), new string[] { "Property" } }; 254yield return new object[] { Array.Empty<DataClass>(), new string[] { "Property" } }; 255yield return new object[] { typeof(DataClass[]), new string[] { "Property" } }; 273mockTypedList.Setup(t => t.GetItemProperties(null)).Returns(TypeDescriptor.GetProperties(typeof(DataClass))); 313yield return new object[] { null, TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 315yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 316yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 325var inner = new PropertyDescriptor[] { TypeDescriptor.GetProperties(typeof(MultiListDataClass))[0], TypeDescriptor.GetProperties(typeof(ListDataClass))[0], TypeDescriptor.GetProperties(typeof(DataClass))[0] }; 329yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 331yield return new object[] { typeof(DataClass), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 355mockTypedList.Setup(t => t.GetItemProperties(descriptors)).Returns(TypeDescriptor.GetProperties(typeof(DataClass))); 442yield return new object[] { typeof(DataClass), "NoSuchProperty" }; 490yield return new object[] { typeof(IEnumerable), new PropertyDescriptor[] { TypeDescriptor.GetProperties(typeof(DataClass))[0] }, "Int32" }; 675public List<DataClass> ListProperty { get; set; } 697return TypeDescriptor.GetProperties(typeof(DataClass)); 717return TypeDescriptor.GetProperties(typeof(DataClass));