Skip to content

Commit 339a204

Browse files
authored
Fix nullable annotations in ITypedList (#80033)
1 parent 3de9594 commit 339a204

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ public partial interface ITypeDescriptorContext : System.IServiceProvider
702702
}
703703
public partial interface ITypedList
704704
{
705-
System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors);
706-
string GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors);
705+
System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors);
706+
string GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors);
707707
}
708708
public abstract partial class License : System.IDisposable
709709
{

src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ITypedList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ namespace System.ComponentModel
55
{
66
public interface ITypedList
77
{
8-
string GetListName(PropertyDescriptor[] listAccessors);
8+
string GetListName(PropertyDescriptor[]? listAccessors);
99

10-
PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors);
10+
PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[]? listAccessors);
1111
}
1212
}

src/libraries/System.Data.Common/ref/System.Data.Common.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,8 @@ void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.Proper
10491049
void System.ComponentModel.IBindingList.RemoveSort() { }
10501050
void System.ComponentModel.IBindingListView.ApplySort(System.ComponentModel.ListSortDescriptionCollection sorts) { }
10511051
void System.ComponentModel.IBindingListView.RemoveFilter() { }
1052-
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
1053-
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
1052+
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
1053+
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
10541054
public System.Data.DataTable ToTable() { throw null; }
10551055
public System.Data.DataTable ToTable(bool distinct, params string[] columnNames) { throw null; }
10561056
public System.Data.DataTable ToTable(string? tableName) { throw null; }
@@ -1103,8 +1103,8 @@ void System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.Property
11031103
int System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor property, object key) { throw null; }
11041104
void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor property) { }
11051105
void System.ComponentModel.IBindingList.RemoveSort() { }
1106-
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
1107-
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
1106+
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
1107+
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
11081108
protected virtual void TableCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) { }
11091109
}
11101110
[System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.Data.Design.DataViewRowStateEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]

src/libraries/System.Data.Common/src/System/Data/DataView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ internal ListSortDescriptionCollection GetSortDescriptions()
11511151

11521152
#region ITypedList
11531153

1154-
string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAccessors)
1154+
string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[]? listAccessors)
11551155
{
11561156
if (_table != null)
11571157
{
@@ -1175,7 +1175,7 @@ string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAcc
11751175
return string.Empty;
11761176
}
11771177

1178-
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
1178+
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[]? listAccessors)
11791179
{
11801180
if (_table != null)
11811181
{

src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void IBindingList.RemoveSort()
256256
}
257257

258258
// SDUB: GetListName and GetItemProperties almost the same in DataView and DataViewManager
259-
string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAccessors)
259+
string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[]? listAccessors)
260260
{
261261
DataSet? dataSet = DataSet;
262262
if (dataSet == null)
@@ -279,7 +279,7 @@ string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAcc
279279
return string.Empty;
280280
}
281281

282-
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
282+
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[]? listAccessors)
283283
{
284284
DataSet? dataSet = DataSet;
285285
if (dataSet == null)

0 commit comments

Comments
 (0)