Skip to content

Commit

Permalink
Enable nullability in ArrayEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetrou committed Dec 23, 2024
1 parent dba5d6e commit 4acb91a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#nullable enable
~override System.ComponentModel.Design.ArrayEditor.CreateCollectionItemType() -> System.Type
~override System.ComponentModel.Design.ArrayEditor.GetItems(object editValue) -> object[]
~override System.ComponentModel.Design.ArrayEditor.SetItems(object editValue, object[] value) -> object
override System.ComponentModel.Design.ArrayEditor.CreateCollectionItemType() -> System.Type!
override System.ComponentModel.Design.ArrayEditor.GetItems(object? editValue) -> object![]!
override System.ComponentModel.Design.ArrayEditor.SetItems(object? editValue, object![]? value) -> object?
~override System.Windows.Forms.Design.ComponentDocumentDesigner.Initialize(System.ComponentModel.IComponent component) -> void
~override System.Windows.Forms.Design.ComponentDocumentDesigner.PreFilterProperties(System.Collections.IDictionary properties) -> void
~override System.Windows.Forms.Design.ComponentTray.GetService(System.Type serviceType) -> object
Expand Down Expand Up @@ -33,7 +33,7 @@
~override System.Windows.Forms.Design.ParentControlDesigner.SnapLines.get -> System.Collections.IList
~override System.Windows.Forms.Design.WindowsFormsDesignerOptionService.PopulateOptionCollection(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection options) -> void
~static System.Windows.Forms.Design.ParentControlDesigner.InvokeCreateTool(System.Windows.Forms.Design.ParentControlDesigner toInvoke, System.Drawing.Design.ToolboxItem tool) -> void
~System.ComponentModel.Design.ArrayEditor.ArrayEditor(System.Type type) -> void
System.ComponentModel.Design.ArrayEditor.ArrayEditor(System.Type! type) -> void
~System.ComponentModel.Design.DesignerActionMethodItem.DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName) -> void
~System.ComponentModel.Design.DesignerActionMethodItem.DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, bool includeAsDesignerVerb) -> void
~System.ComponentModel.Design.DesignerActionMethodItem.DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, string category) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable disable

namespace System.ComponentModel.Design;

/// <summary>
Expand All @@ -22,12 +20,12 @@ public ArrayEditor(Type type) : base(type)
/// Gets or sets the data type this collection contains.
/// </summary>
protected override Type CreateCollectionItemType()
=> CollectionType?.GetElementType();
=> CollectionType?.GetElementType()!;

/// <summary>
/// Gets the items in the array.
/// </summary>
protected override object[] GetItems(object editValue)
protected override object[] GetItems(object? editValue)
{
if (editValue is Array valueArray)
{
Expand All @@ -42,7 +40,7 @@ protected override object[] GetItems(object editValue)
/// <summary>
/// Sets the items in the array.
/// </summary>
protected override object SetItems(object editValue, object[] value)
protected override object? SetItems(object? editValue, object[]? value)
{
if (editValue is not null and not Array)
{
Expand Down

0 comments on commit 4acb91a

Please sign in to comment.