Skip to content

Commit

Permalink
Fix nullable annotations in ITypedList
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetrou committed Dec 29, 2022
1 parent fa7d049 commit e57fe71
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ public partial interface ITypeDescriptorContext : System.IServiceProvider
}
public partial interface ITypedList
{
System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors);
string GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors);
System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors);
string GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors);
}
public abstract partial class License : System.IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace System.ComponentModel
{
public interface ITypedList
{
string GetListName(PropertyDescriptor[] listAccessors);
string GetListName(PropertyDescriptor[]? listAccessors);

PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors);
PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[]? listAccessors);
}
}
8 changes: 4 additions & 4 deletions src/libraries/System.Data.Common/ref/System.Data.Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,8 @@ void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.Proper
void System.ComponentModel.IBindingList.RemoveSort() { }
void System.ComponentModel.IBindingListView.ApplySort(System.ComponentModel.ListSortDescriptionCollection sorts) { }
void System.ComponentModel.IBindingListView.RemoveFilter() { }
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
public System.Data.DataTable ToTable() { throw null; }
public System.Data.DataTable ToTable(bool distinct, params string[] columnNames) { throw null; }
public System.Data.DataTable ToTable(string? tableName) { throw null; }
Expand Down Expand Up @@ -1103,8 +1103,8 @@ void System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.Property
int System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor property, object key) { throw null; }
void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor property) { }
void System.ComponentModel.IBindingList.RemoveSort() { }
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) { throw null; }
System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors) { throw null; }
protected virtual void TableCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) { }
}
[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")]
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/System.Data.Common/src/System/Data/DataView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ internal ListSortDescriptionCollection GetSortDescriptions()

#region ITypedList

string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAccessors)
string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[]? listAccessors)
{
if (_table != null)
{
Expand All @@ -1175,7 +1175,7 @@ string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAcc
return string.Empty;
}

PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[]? listAccessors)
{
if (_table != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void IBindingList.RemoveSort()
}

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

PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[]? listAccessors)
{
DataSet? dataSet = DataSet;
if (dataSet == null)
Expand Down

0 comments on commit e57fe71

Please sign in to comment.