13 instantiations of ListDataClass
System.Windows.Forms.Tests (13)
System\Windows\Forms\ListBindingHelperTests.cs (13)
49
yield return new object[] { new
ListDataClass
(), "ListProperty", null };
50
yield return new object[] { new
ListDataClass
{ ListProperty = [] }, "ListProperty", new List<DataClass>() };
320
yield return new object[] { new
ListDataClass
(), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
321
yield return new object[] { new
ListDataClass
() { ListProperty = [new()] }, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
325
yield return new object[] { new MultiListDataClass { ParentListProperty = [
new
() { ListProperty = [new()] }] }, TypeDescriptor.GetProperties(typeof(MultiListDataClass)).Cast<PropertyDescriptor>().Take(0).ToArray(), new string[] { "ParentListProperty" } };
328
yield return new object[] { new MultiListDataClass { ParentListProperty = [
new
() { ListProperty = [new()] }] }, inner.Take(2).ToArray(), new string[] { "Property" } };
338
yield return new object[] { new IEnumerableWrapper(new object[] { new
ListDataClass
() }), descriptors, new string[] { "Property" } };
345
yield return new object[] { new ArrayList { new
ListDataClass
() }, descriptors, new string[] { "Property" } };
350
yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [
new
() { ListProperty = [new()] }] } }, inner.Take(0).ToArray(), new string[] { "ParentListProperty" } };
351
yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [
new
() { ListProperty = [new()] }] } }, inner.Take(2).ToArray(), new string[] { "Property" } };
352
yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [
new
() { ListProperty = [new()] }] } }, inner.Take(3).ToArray(), Array.Empty<string>() };
425
yield return new object[] { new
ListDataClass
(), "ListProperty", null, new string[] { "Property" } };
426
yield return new object[] { new
ListDataClass
(), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } };
16 references to ListDataClass
System.Windows.Forms.Tests (16)
System\Windows\Forms\ListBindingHelperTests.cs (16)
320
yield return new object[] { new ListDataClass(), TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
321
yield return new object[] { new ListDataClass() { ListProperty = [new()] }, TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
322
yield return new object[] { typeof(
ListDataClass
), TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
327
var inner = new PropertyDescriptor[] { TypeDescriptor.GetProperties(typeof(MultiListDataClass))[0], TypeDescriptor.GetProperties(typeof(
ListDataClass
))[0], TypeDescriptor.GetProperties(typeof(DataClass))[0] };
331
yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
336
PropertyDescriptor[] descriptors = TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray();
341
yield return new object[] { new IEnumerableWrapper(new
ListDataClass
[] { null }), descriptors, new string[] { "Property" } };
427
yield return new object[] { new MultiListDataClass(), "ParentListProperty", TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
428
yield return new object[] { typeof(
ListDataClass
), "ListProperty", null, new string[] { "Property" } };
429
yield return new object[] { typeof(
ListDataClass
), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } };
430
yield return new object[] { typeof(MultiListDataClass), "ParentListProperty", TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } };
458
Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray()));
459
Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), null, TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray()));
460
Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), string.Empty, TypeDescriptor.GetProperties(typeof(
ListDataClass
)).Cast<PropertyDescriptor>().ToArray()));
682
public List<
ListDataClass
> ParentListProperty { get; set; }