Skip to content

Commit 7f34a1b

Browse files
LeafShi1dotnet-maestro[bot]JeremyKuhnehalgab
authored
Merge main into feature/9.0 branch - 8/4/2023 (#9659)
* [main] Update dependencies from dotnet/runtime (#9648) * Update dependencies from https://github.com/dotnet/runtime build 20230802.13 Microsoft.Internal.Runtime.WindowsDesktop.Transport , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , Microsoft.NETCore.ILDAsm , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry.AccessControl , Microsoft.Win32.SystemEvents , runtime.win-x64.Microsoft.NETCore.ILAsm , runtime.win-x86.Microsoft.NETCore.ILAsm , System.CodeDom , System.ComponentModel.Composition , System.ComponentModel.Composition.Registration , System.Configuration.ConfigurationManager , System.Data.Odbc , System.Data.OleDb , System.Diagnostics.EventLog , System.Diagnostics.PerformanceCounter , System.DirectoryServices , System.DirectoryServices.AccountManagement , System.DirectoryServices.Protocols , System.IO.Packaging , System.IO.Ports , System.Management , System.Reflection.Context , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Runtime.Caching , System.Security.Cryptography.Pkcs , System.Security.Cryptography.ProtectedData , System.Security.Cryptography.Xml , System.Security.Permissions , System.ServiceModel.Syndication , System.ServiceProcess.ServiceController , System.Speech , System.Text.Encoding.CodePages , System.Text.Encodings.Web , System.Text.Json , System.Threading.AccessControl , System.Windows.Extensions , VS.Redist.Common.NetCore.SharedFramework.x64.8.0 From Version 8.0.0-rc.1.23401.22 -> To Version 8.0.0-rc.1.23402.13 * Handle `ref` to `in` change (#9654) A number of Libarary APIs have had their parameters changed from `ref` to `in` (or `readonly ref`). This change modifies code that we control and disables the "passing ref to in" warning for the interop assembly until we can get microsoft/CsWin32#1014 resolved. This change requires a more current Roslyn build and as such I've updated it. Note that VS Intellisense does not support this new feature yet. You can filter out intellisense errors by selecting "Build Only" in the error pane in the meantime (this will not remove red squiggles unfortunately). --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Jeremy Kuhne <[email protected]> * [main] Update dependencies from dotnet/arcade (#9661) [main] Update dependencies from dotnet/arcade * [main] Update dependencies from dotnet/runtime (#9662) [main] Update dependencies from dotnet/runtime * Enable nullability in DockEditor, ContentAlignmentEditor and SelectionPanelBase (#9649) * annotate SelectionPanelBase * annotate DockEditor * annotate ContentAlignmentEditor --------- Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Jeremy Kuhne <[email protected]> Co-authored-by: halgab <[email protected]>
1 parent f5c5754 commit 7f34a1b

File tree

15 files changed

+196
-171
lines changed

15 files changed

+196
-171
lines changed

eng/Version.Details.xml

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,38 @@
88
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
99
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
1010
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
11-
<!-- Use the compiler in the CLI instead of in the sdk, since the sdk one doesn't work with netcoreapp5.0 yet -->
12-
<UsingToolMicrosoftNetCompilers>false</UsingToolMicrosoftNetCompilers>
11+
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
1312
</PropertyGroup>
1413
<!-- Below have corresponding entries in Versions.Details.XML because they are updated via Maestro -->
1514
<PropertyGroup>
16-
<VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion>8.0.0-rc.1.23401.22</VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion>
17-
<SystemDiagnosticsEventLogPackageVersion>8.0.0-rc.1.23401.22</SystemDiagnosticsEventLogPackageVersion>
18-
<SystemDirectoryServicesPackageVersion>8.0.0-rc.1.23401.22</SystemDirectoryServicesPackageVersion>
19-
<SystemReflectionMetadataLoadContextPackageVersion>8.0.0-rc.1.23401.22</SystemReflectionMetadataLoadContextPackageVersion>
20-
<SystemSecurityCryptographyXmlPackageVersion>8.0.0-rc.1.23401.22</SystemSecurityCryptographyXmlPackageVersion>
21-
<SystemIOPackagingPackageVersion>8.0.0-rc.1.23401.22</SystemIOPackagingPackageVersion>
15+
<VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion>8.0.0-rc.1.23404.1</VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion>
16+
<SystemDiagnosticsEventLogPackageVersion>8.0.0-rc.1.23404.1</SystemDiagnosticsEventLogPackageVersion>
17+
<SystemDirectoryServicesPackageVersion>8.0.0-rc.1.23404.1</SystemDirectoryServicesPackageVersion>
18+
<SystemReflectionMetadataLoadContextPackageVersion>8.0.0-rc.1.23404.1</SystemReflectionMetadataLoadContextPackageVersion>
19+
<SystemSecurityCryptographyXmlPackageVersion>8.0.0-rc.1.23404.1</SystemSecurityCryptographyXmlPackageVersion>
20+
<SystemIOPackagingPackageVersion>8.0.0-rc.1.23404.1</SystemIOPackagingPackageVersion>
2221
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>5.0.0-preview.7.20320.5</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
23-
<MicrosoftNETCoreILDAsmPackageVersion>8.0.0-rc.1.23401.22</MicrosoftNETCoreILDAsmPackageVersion>
24-
<SystemDiagnosticsPerformanceCounterPackageVersion>8.0.0-rc.1.23401.22</SystemDiagnosticsPerformanceCounterPackageVersion>
22+
<MicrosoftNETCoreILDAsmPackageVersion>8.0.0-rc.1.23404.1</MicrosoftNETCoreILDAsmPackageVersion>
23+
<SystemDiagnosticsPerformanceCounterPackageVersion>8.0.0-rc.1.23404.1</SystemDiagnosticsPerformanceCounterPackageVersion>
2524
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.0.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
26-
<SystemSecurityCryptographyPkcsPackageVersion>8.0.0-rc.1.23401.22</SystemSecurityCryptographyPkcsPackageVersion>
27-
<SystemSecurityCryptographyProtectedDataPackageVersion>8.0.0-rc.1.23401.22</SystemSecurityCryptographyProtectedDataPackageVersion>
28-
<SystemTextEncodingsWebPackageVersion>8.0.0-rc.1.23401.22</SystemTextEncodingsWebPackageVersion>
29-
<SystemTextJsonPackageVersion>8.0.0-rc.1.23401.22</SystemTextJsonPackageVersion>
30-
<SystemThreadingAccessControlPackageVersion>8.0.0-rc.1.23401.22</SystemThreadingAccessControlPackageVersion>
31-
<MicrosoftWin32RegistryAccessControlPackageVersion>8.0.0-rc.1.23401.22</MicrosoftWin32RegistryAccessControlPackageVersion>
32-
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-rc.1.23401.22</MicrosoftNETCoreAppRefPackageVersion>
33-
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>8.0.0-rc.1.23401.22</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
34-
<MicrosoftNETCorePlatformsPackageVersion>8.0.0-rc.1.23401.22</MicrosoftNETCorePlatformsPackageVersion>
35-
<MicrosoftWin32SystemEventsPackageVersion>8.0.0-rc.1.23401.22</MicrosoftWin32SystemEventsPackageVersion>
36-
<SystemCodeDomPackageVersion>8.0.0-rc.1.23401.22</SystemCodeDomPackageVersion>
37-
<SystemConfigurationConfigurationManagerPackageVersion>8.0.0-rc.1.23401.22</SystemConfigurationConfigurationManagerPackageVersion>
38-
<SystemResourcesExtensionsPackageVersion>8.0.0-rc.1.23401.22</SystemResourcesExtensionsPackageVersion>
39-
<SystemSecurityPermissionsPackageVersion>8.0.0-rc.1.23401.22</SystemSecurityPermissionsPackageVersion>
40-
<SystemWindowsExtensionsPackageVersion>8.0.0-rc.1.23401.22</SystemWindowsExtensionsPackageVersion>
41-
<MicrosoftNETCoreILAsmPackageVersion>8.0.0-rc.1.23401.22</MicrosoftNETCoreILAsmPackageVersion>
42-
<runtimewinx64MicrosoftNETCoreILAsmPackageVersion>8.0.0-rc.1.23401.22</runtimewinx64MicrosoftNETCoreILAsmPackageVersion>
43-
<runtimewinx86MicrosoftNETCoreILAsmPackageVersion>8.0.0-rc.1.23401.22</runtimewinx86MicrosoftNETCoreILAsmPackageVersion>
25+
<SystemSecurityCryptographyPkcsPackageVersion>8.0.0-rc.1.23404.1</SystemSecurityCryptographyPkcsPackageVersion>
26+
<SystemSecurityCryptographyProtectedDataPackageVersion>8.0.0-rc.1.23404.1</SystemSecurityCryptographyProtectedDataPackageVersion>
27+
<SystemTextEncodingsWebPackageVersion>8.0.0-rc.1.23404.1</SystemTextEncodingsWebPackageVersion>
28+
<SystemTextJsonPackageVersion>8.0.0-rc.1.23404.1</SystemTextJsonPackageVersion>
29+
<SystemThreadingAccessControlPackageVersion>8.0.0-rc.1.23404.1</SystemThreadingAccessControlPackageVersion>
30+
<MicrosoftWin32RegistryAccessControlPackageVersion>8.0.0-rc.1.23404.1</MicrosoftWin32RegistryAccessControlPackageVersion>
31+
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-rc.1.23404.1</MicrosoftNETCoreAppRefPackageVersion>
32+
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>8.0.0-rc.1.23404.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
33+
<MicrosoftNETCorePlatformsPackageVersion>8.0.0-rc.1.23404.1</MicrosoftNETCorePlatformsPackageVersion>
34+
<MicrosoftWin32SystemEventsPackageVersion>8.0.0-rc.1.23404.1</MicrosoftWin32SystemEventsPackageVersion>
35+
<SystemCodeDomPackageVersion>8.0.0-rc.1.23404.1</SystemCodeDomPackageVersion>
36+
<SystemConfigurationConfigurationManagerPackageVersion>8.0.0-rc.1.23404.1</SystemConfigurationConfigurationManagerPackageVersion>
37+
<SystemResourcesExtensionsPackageVersion>8.0.0-rc.1.23404.1</SystemResourcesExtensionsPackageVersion>
38+
<SystemSecurityPermissionsPackageVersion>8.0.0-rc.1.23404.1</SystemSecurityPermissionsPackageVersion>
39+
<SystemWindowsExtensionsPackageVersion>8.0.0-rc.1.23404.1</SystemWindowsExtensionsPackageVersion>
40+
<MicrosoftNETCoreILAsmPackageVersion>8.0.0-rc.1.23404.1</MicrosoftNETCoreILAsmPackageVersion>
41+
<runtimewinx64MicrosoftNETCoreILAsmPackageVersion>8.0.0-rc.1.23404.1</runtimewinx64MicrosoftNETCoreILAsmPackageVersion>
42+
<runtimewinx86MicrosoftNETCoreILAsmPackageVersion>8.0.0-rc.1.23404.1</runtimewinx86MicrosoftNETCoreILAsmPackageVersion>
4443
<!--
4544
Microsoft.NET.Sdk.IL.targets requires definition of MicrosoftNETCoreILAsmVersion
4645
-->
@@ -53,9 +52,9 @@
5352
</PropertyGroup>
5453
<!-- Arcade -->
5554
<PropertyGroup>
56-
<MicrosoftDotNetGenFacadesPackageVersion>8.0.0-beta.23402.2</MicrosoftDotNetGenFacadesPackageVersion>
57-
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23402.2</MicrosoftDotNetRemoteExecutorVersion>
58-
<MicrosoftDotNetXUnitExtensionsPackageVersion>8.0.0-beta.23402.2</MicrosoftDotNetXUnitExtensionsPackageVersion>
55+
<MicrosoftDotNetGenFacadesPackageVersion>8.0.0-beta.23403.7</MicrosoftDotNetGenFacadesPackageVersion>
56+
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23403.7</MicrosoftDotNetRemoteExecutorVersion>
57+
<MicrosoftDotNetXUnitExtensionsPackageVersion>8.0.0-beta.23403.7</MicrosoftDotNetXUnitExtensionsPackageVersion>
5958
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
6059
</PropertyGroup>
6160
<!-- Below have no corresponding entries in Versions.Details.XML because they are not updated via Maestro -->
@@ -91,14 +90,15 @@
9190
<CSharpIsNullAnalyzersVersion>0.1.329</CSharpIsNullAnalyzersVersion>
9291
<DotNetAnalyzersDocumentationAnalyzersVersion>1.0.0-beta.59</DotNetAnalyzersDocumentationAnalyzersVersion>
9392
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.5-beta1.23327.3</MicrosoftCodeAnalysisAnalyzersVersion>
94-
<MicrosoftCodeAnalysisCommonPackageVersion>4.4.0</MicrosoftCodeAnalysisCommonPackageVersion>
93+
<MicrosoftCodeAnalysisCommonPackageVersion>4.8.0-1.23378.8</MicrosoftCodeAnalysisCommonPackageVersion>
9594
<MicrosoftCodeAnalysisCSharpPackageVersion>$(MicrosoftCodeAnalysisCommonPackageVersion)</MicrosoftCodeAnalysisCSharpPackageVersion>
9695
<MicrosoftCodeAnalysisVisualBasicPackageVersion>$(MicrosoftCodeAnalysisCommonPackageVersion)</MicrosoftCodeAnalysisVisualBasicPackageVersion>
9796
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>$(MicrosoftCodeAnalysisCommonPackageVersion)</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
9897
<MicrosoftCodeAnalysisVisualBasicWorkspacesVersion>$(MicrosoftCodeAnalysisCommonPackageVersion)</MicrosoftCodeAnalysisVisualBasicWorkspacesVersion>
9998
<MicrosoftCodeAnalysisPackagesVersion>1.1.2-beta1.23322.1</MicrosoftCodeAnalysisPackagesVersion>
10099
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>$(MicrosoftCodeAnalysisAnalyzersVersion)</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
101100
<MicrosoftCodeAnalysisNetAnalyzersVersion>8.0.0-preview.23327.3</MicrosoftCodeAnalysisNetAnalyzersVersion>
101+
<MicrosoftNetCompilersToolsetVersion>4.8.0-1.23403.1</MicrosoftNetCompilersToolsetVersion>
102102
<StyleCopAnalyzersVersion>1.2.0-beta.507</StyleCopAnalyzersVersion>
103103
</PropertyGroup>
104104
<!-- Additional unchanging dependencies -->

eng/common/templates/steps/source-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,12 @@ steps:
118118
artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt)
119119
continueOnError: true
120120
condition: succeededOrFailed()
121+
122+
# Manually inject component detection so that we can ignore the source build upstream cache, which contains
123+
# a nupkg cache of input packages (a local feed).
124+
# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir'
125+
# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets
126+
- task: ComponentGovernanceComponentDetection@0
127+
displayName: Component Detection (Exclude upstream cache)
128+
inputs:
129+
ignoreDirectories: '$(Build.SourcesDirectory)/artifacts/source-build/self/src/artifacts/obj/source-built-upstream-cache'

global.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"version": "8.0.100-preview.6.23330.14"
1515
},
1616
"msbuild-sdks": {
17-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23402.2",
18-
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23402.2",
19-
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23402.2",
17+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23403.7",
18+
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23403.7",
19+
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23403.7",
2020
"FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
21-
"Microsoft.NET.Sdk.IL": "8.0.0-rc.1.23401.22"
21+
"Microsoft.NET.Sdk.IL": "8.0.0-rc.1.23404.1"
2222
},
2323
"native-tools": {
2424
"cmake": "latest"

src/System.Drawing.Common/src/System/Drawing/DrawingCom.ComWrappers.cs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
namespace System.Drawing;
1111

1212
/// <summary>
13-
/// The ComWrappers implementation for System.Drawing.Common's COM interop usages.
14-
///
15-
/// Supports IStream and IPicture COM interfaces.
13+
/// The ComWrappers implementation for System.Drawing.Common's COM interop usages.
1614
/// </summary>
15+
/// <remarks>
16+
/// <para>
17+
/// Supports IStream and IPicture COM interfaces.
18+
/// </para>
19+
/// </remarks>
1720
internal unsafe partial class DrawingCom : ComWrappers
1821
{
1922
private const int S_OK = (int)HRESULT.S_OK;
@@ -52,7 +55,11 @@ protected override object CreateObject(IntPtr externalComObject, CreateObjectFla
5255
Debug.Assert(flags == CreateObjectFlags.UniqueInstance);
5356

5457
Guid pictureIID = IPicture.IID;
58+
#if NET8_0_OR_GREATER
59+
int hr = Marshal.QueryInterface(externalComObject, in pictureIID, out IntPtr comObject);
60+
#else
5561
int hr = Marshal.QueryInterface(externalComObject, ref pictureIID, out IntPtr comObject);
62+
#endif
5663
if (hr == S_OK)
5764
{
5865
return new PictureWrapper(comObject);
@@ -71,11 +78,16 @@ internal static IStreamWrapper GetComWrapper(Ole32.IStream stream)
7178
IntPtr streamWrapperPtr = Instance.GetOrCreateComInterfaceForObject(stream, CreateComInterfaceFlags.None);
7279

7380
Guid streamIID = IID_IStream;
74-
int result = Marshal.QueryInterface(streamWrapperPtr, ref streamIID, out IntPtr streamPtr);
81+
82+
#if NET8_0_OR_GREATER
83+
int hr = Marshal.QueryInterface(streamWrapperPtr, in streamIID, out IntPtr streamPtr);
84+
#else
85+
int hr = Marshal.QueryInterface(streamWrapperPtr, ref streamIID, out IntPtr streamPtr);
86+
#endif
7587

7688
Marshal.Release(streamWrapperPtr);
7789

78-
ThrowExceptionForHR(result);
90+
ThrowExceptionForHR(hr);
7991

8092
return new IStreamWrapper(streamPtr);
8193
}
@@ -308,7 +320,12 @@ public unsafe int SaveAsFile(IntPtr pstm, int fSaveMemCopy, int* pcbSize)
308320
{
309321
// Get the IStream implementation, since the ComWrappers runtime returns a pointer to the IUnknown interface implementation
310322
Guid streamIID = IID_IStream;
323+
324+
#if NET8_0_OR_GREATER
325+
ThrowExceptionForHR(Marshal.QueryInterface(pstm, in streamIID, out IntPtr pstmImpl));
326+
#else
311327
ThrowExceptionForHR(Marshal.QueryInterface(pstm, ref streamIID, out IntPtr pstmImpl));
328+
#endif
312329

313330
try
314331
{

src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ override System.ComponentModel.Design.ObjectSelectorEditor.Selector.OnNodeMouseC
4848
~override System.ComponentModel.Design.Serialization.CodeDomSerializerException.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
4949
~override System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer.Serialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value) -> object
5050
~override System.ComponentModel.Design.UndoEngine.UndoUnit.ToString() -> string
51-
~override System.Drawing.Design.ContentAlignmentEditor.EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value) -> object
52-
~override System.Drawing.Design.ContentAlignmentEditor.GetEditStyle(System.ComponentModel.ITypeDescriptorContext context) -> System.Drawing.Design.UITypeEditorEditStyle
51+
override System.Drawing.Design.ContentAlignmentEditor.EditValue(System.ComponentModel.ITypeDescriptorContext? context, System.IServiceProvider! provider, object? value) -> object?
52+
override System.Drawing.Design.ContentAlignmentEditor.GetEditStyle(System.ComponentModel.ITypeDescriptorContext? context) -> System.Drawing.Design.UITypeEditorEditStyle
5353
override System.Drawing.Design.CursorEditor.EditValue(System.ComponentModel.ITypeDescriptorContext? context, System.IServiceProvider! provider, object? value) -> object?
5454
override System.Drawing.Design.CursorEditor.GetEditStyle(System.ComponentModel.ITypeDescriptorContext? context) -> System.Drawing.Design.UITypeEditorEditStyle
5555
override System.Drawing.Design.FontEditor.EditValue(System.ComponentModel.ITypeDescriptorContext? context, System.IServiceProvider! provider, object? value) -> object?
@@ -83,8 +83,8 @@ override System.Drawing.Design.FontNameEditor.PaintValue(System.Drawing.Design.P
8383
~override System.Windows.Forms.Design.ControlDesigner.InitializeNewComponent(System.Collections.IDictionary defaultValues) -> void
8484
~override System.Windows.Forms.Design.ControlDesigner.ParentComponent.get -> System.ComponentModel.IComponent
8585
~override System.Windows.Forms.Design.ControlDesigner.PreFilterProperties(System.Collections.IDictionary properties) -> void
86-
~override System.Windows.Forms.Design.DockEditor.EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value) -> object
87-
~override System.Windows.Forms.Design.DockEditor.GetEditStyle(System.ComponentModel.ITypeDescriptorContext context) -> System.Drawing.Design.UITypeEditorEditStyle
86+
override System.Windows.Forms.Design.DockEditor.EditValue(System.ComponentModel.ITypeDescriptorContext? context, System.IServiceProvider! provider, object? value) -> object?
87+
override System.Windows.Forms.Design.DockEditor.GetEditStyle(System.ComponentModel.ITypeDescriptorContext? context) -> System.Drawing.Design.UITypeEditorEditStyle
8888
~override System.Windows.Forms.Design.DocumentDesigner.GetGlyphs(System.Windows.Forms.Design.Behavior.GlyphSelectionType selectionType) -> System.Windows.Forms.Design.Behavior.GlyphCollection
8989
~override System.Windows.Forms.Design.DocumentDesigner.Initialize(System.ComponentModel.IComponent component) -> void
9090
~override System.Windows.Forms.Design.DocumentDesigner.PreFilterProperties(System.Collections.IDictionary properties) -> void

src/System.Windows.Forms.Design/src/System/Drawing/Design/ContentAlignmentEditor.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
#nullable disable
5-
64
using System.ComponentModel;
75
using System.Windows.Forms.Design;
86

@@ -13,14 +11,14 @@ namespace System.Drawing.Design;
1311
/// </summary>
1412
public partial class ContentAlignmentEditor : UITypeEditor
1513
{
16-
private ContentUI _contentUI;
14+
private ContentUI? _contentUI;
1715

1816
/// <summary>
1917
/// Edits the given object value using the editor style provided by GetEditStyle.
2018
/// </summary>
21-
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
19+
public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value)
2220
{
23-
if (!provider.TryGetService(out IWindowsFormsEditorService editorService))
21+
if (!provider.TryGetService(out IWindowsFormsEditorService? editorService))
2422
{
2523
return value;
2624
}
@@ -36,6 +34,6 @@ public override object EditValue(ITypeDescriptorContext context, IServiceProvide
3634
}
3735

3836
/// <inheritdoc />
39-
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
37+
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? context)
4038
=> UITypeEditorEditStyle.DropDown;
4139
}

src/System.Windows.Forms.Design/src/System/Drawing/Design/SelectionPanelBase.cs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
#nullable disable
5-
64
using System.Windows.Forms;
75
using System.Windows.Forms.Design;
86

@@ -11,12 +9,12 @@ namespace System.Drawing.Design;
119
internal abstract partial class SelectionPanelBase : Control
1210
{
1311
private bool _allowExit = true;
14-
private RadioButton _checkedControl;
15-
private IWindowsFormsEditorService _editorService;
12+
private RadioButton? _checkedControl;
13+
private IWindowsFormsEditorService? _editorService;
1614

1715
protected RadioButton CheckedControl
1816
{
19-
get => _checkedControl;
17+
get => _checkedControl!;
2018
set
2119
{
2220
_checkedControl = value;
@@ -26,7 +24,7 @@ protected RadioButton CheckedControl
2624

2725
protected abstract ControlCollection SelectionOptions { get; }
2826

29-
public object Value { get; protected set; }
27+
public object? Value { get; protected set; }
3028

3129
public void End()
3230
{
@@ -44,11 +42,11 @@ private void FocusCheckedControl()
4442
_allowExit = true;
4543
}
4644

47-
private void OnClick(object sender, EventArgs e)
45+
private void OnClick(object? sender, EventArgs e)
4846
{
4947
if (_allowExit)
5048
{
51-
CheckedControl = (RadioButton)sender;
49+
CheckedControl = (RadioButton)sender!;
5250
UpdateValue();
5351
Teardown();
5452
}
@@ -60,9 +58,9 @@ protected override void OnGotFocus(EventArgs e)
6058
FocusCheckedControl();
6159
}
6260

63-
private void OnKeyDown(object sender, KeyEventArgs e)
61+
private void OnKeyDown(object? sender, KeyEventArgs e)
6462
{
65-
var radioButton = (RadioButton)sender;
63+
var radioButton = (RadioButton)sender!;
6664
Keys key = e.KeyCode;
6765
RadioButton target;
6866

@@ -119,7 +117,7 @@ protected override bool ProcessDialogKey(Keys keyData)
119117

120118
protected abstract void SetInitialCheckedControl();
121119

122-
public void Start(IWindowsFormsEditorService edSvc, object value)
120+
public void Start(IWindowsFormsEditorService edSvc, object? value)
123121
{
124122
foreach (RadioButton radioButton in SelectionOptions)
125123
{
@@ -144,7 +142,7 @@ protected void ConfigureButtons()
144142

145143
private void Teardown()
146144
{
147-
_editorService.CloseDropDown();
145+
_editorService!.CloseDropDown();
148146
}
149147

150148
protected abstract void UpdateValue();

0 commit comments

Comments
 (0)