Skip to content

Commit 17089fa

Browse files
authored
Merge branch 'main' into Issue_12830_Multi-Target_DemoConsole
2 parents 0f2bd56 + 8c962f6 commit 17089fa

File tree

68 files changed

+308
-666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+308
-666
lines changed

Diff for: eng/Version.Details.xml

+102-102
Large diffs are not rendered by default.

Diff for: eng/Versions.props

+32-32
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,37 @@
1313
</PropertyGroup>
1414
<!-- Below have corresponding entries in Versions.Details.XML because they are updated via Maestro -->
1515
<PropertyGroup>
16-
<VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>10.0.0-preview.4.25209.13</VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>
17-
<SystemDiagnosticsEventLogPackageVersion>10.0.0-preview.4.25209.13</SystemDiagnosticsEventLogPackageVersion>
18-
<SystemDirectoryServicesPackageVersion>10.0.0-preview.4.25209.13</SystemDirectoryServicesPackageVersion>
19-
<SystemFormatsNrbfPackageVersion>10.0.0-preview.4.25209.13</SystemFormatsNrbfPackageVersion>
20-
<SystemReflectionMetadataLoadContextPackageVersion>10.0.0-preview.4.25209.13</SystemReflectionMetadataLoadContextPackageVersion>
21-
<SystemSecurityCryptographyXmlPackageVersion>10.0.0-preview.4.25209.13</SystemSecurityCryptographyXmlPackageVersion>
22-
<SystemIOHashingPackageVersion>10.0.0-preview.4.25209.13</SystemIOHashingPackageVersion>
23-
<SystemIOPackagingPackageVersion>10.0.0-preview.4.25209.13</SystemIOPackagingPackageVersion>
16+
<VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>10.0.0-preview.4.25211.19</VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>
17+
<SystemDiagnosticsEventLogPackageVersion>10.0.0-preview.4.25211.19</SystemDiagnosticsEventLogPackageVersion>
18+
<SystemDirectoryServicesPackageVersion>10.0.0-preview.4.25211.19</SystemDirectoryServicesPackageVersion>
19+
<SystemFormatsNrbfPackageVersion>10.0.0-preview.4.25211.19</SystemFormatsNrbfPackageVersion>
20+
<SystemReflectionMetadataLoadContextPackageVersion>10.0.0-preview.4.25211.19</SystemReflectionMetadataLoadContextPackageVersion>
21+
<SystemSecurityCryptographyXmlPackageVersion>10.0.0-preview.4.25211.19</SystemSecurityCryptographyXmlPackageVersion>
22+
<SystemIOHashingPackageVersion>10.0.0-preview.4.25211.19</SystemIOHashingPackageVersion>
23+
<SystemIOPackagingPackageVersion>10.0.0-preview.4.25211.19</SystemIOPackagingPackageVersion>
2424
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>5.0.0-preview.7.20320.5</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
25-
<MicrosoftNETCoreILDAsmPackageVersion>10.0.0-preview.4.25209.13</MicrosoftNETCoreILDAsmPackageVersion>
26-
<SystemDiagnosticsPerformanceCounterPackageVersion>10.0.0-preview.4.25209.13</SystemDiagnosticsPerformanceCounterPackageVersion>
25+
<MicrosoftNETCoreILDAsmPackageVersion>10.0.0-preview.4.25211.19</MicrosoftNETCoreILDAsmPackageVersion>
26+
<SystemDiagnosticsPerformanceCounterPackageVersion>10.0.0-preview.4.25211.19</SystemDiagnosticsPerformanceCounterPackageVersion>
2727
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.1.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
28-
<SystemRuntimeSerializationFormattersPackageVersion>10.0.0-preview.4.25209.13</SystemRuntimeSerializationFormattersPackageVersion>
29-
<SystemSecurityCryptographyPkcsPackageVersion>10.0.0-preview.4.25209.13</SystemSecurityCryptographyPkcsPackageVersion>
30-
<SystemSecurityCryptographyProtectedDataPackageVersion>10.0.0-preview.4.25209.13</SystemSecurityCryptographyProtectedDataPackageVersion>
31-
<SystemTextEncodingsWebPackageVersion>10.0.0-preview.4.25209.13</SystemTextEncodingsWebPackageVersion>
32-
<SystemTextJsonPackageVersion>10.0.0-preview.4.25209.13</SystemTextJsonPackageVersion>
33-
<SystemThreadingAccessControlPackageVersion>10.0.0-preview.4.25209.13</SystemThreadingAccessControlPackageVersion>
34-
<MicrosoftWin32RegistryAccessControlPackageVersion>10.0.0-preview.4.25209.13</MicrosoftWin32RegistryAccessControlPackageVersion>
35-
<MicrosoftNETCoreAppRefPackageVersion>10.0.0-preview.4.25209.13</MicrosoftNETCoreAppRefPackageVersion>
36-
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>10.0.0-preview.4.25209.13</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
37-
<MicrosoftNETCorePlatformsPackageVersion>10.0.0-preview.4.25209.13</MicrosoftNETCorePlatformsPackageVersion>
38-
<MicrosoftWin32SystemEventsPackageVersion>10.0.0-preview.4.25209.13</MicrosoftWin32SystemEventsPackageVersion>
39-
<SystemCodeDomPackageVersion>10.0.0-preview.4.25209.13</SystemCodeDomPackageVersion>
40-
<SystemConfigurationConfigurationManagerPackageVersion>10.0.0-preview.4.25209.13</SystemConfigurationConfigurationManagerPackageVersion>
41-
<SystemResourcesExtensionsPackageVersion>10.0.0-preview.4.25209.13</SystemResourcesExtensionsPackageVersion>
42-
<SystemSecurityPermissionsPackageVersion>10.0.0-preview.4.25209.13</SystemSecurityPermissionsPackageVersion>
43-
<SystemWindowsExtensionsPackageVersion>10.0.0-preview.4.25209.13</SystemWindowsExtensionsPackageVersion>
44-
<MicrosoftNETCoreILAsmPackageVersion>10.0.0-preview.4.25209.13</MicrosoftNETCoreILAsmPackageVersion>
45-
<runtimewinx64MicrosoftNETCoreILAsmPackageVersion>10.0.0-preview.4.25209.13</runtimewinx64MicrosoftNETCoreILAsmPackageVersion>
46-
<runtimewinx86MicrosoftNETCoreILAsmPackageVersion>10.0.0-preview.4.25209.13</runtimewinx86MicrosoftNETCoreILAsmPackageVersion>
28+
<SystemRuntimeSerializationFormattersPackageVersion>10.0.0-preview.4.25211.19</SystemRuntimeSerializationFormattersPackageVersion>
29+
<SystemSecurityCryptographyPkcsPackageVersion>10.0.0-preview.4.25211.19</SystemSecurityCryptographyPkcsPackageVersion>
30+
<SystemSecurityCryptographyProtectedDataPackageVersion>10.0.0-preview.4.25211.19</SystemSecurityCryptographyProtectedDataPackageVersion>
31+
<SystemTextEncodingsWebPackageVersion>10.0.0-preview.4.25211.19</SystemTextEncodingsWebPackageVersion>
32+
<SystemTextJsonPackageVersion>10.0.0-preview.4.25211.19</SystemTextJsonPackageVersion>
33+
<SystemThreadingAccessControlPackageVersion>10.0.0-preview.4.25211.19</SystemThreadingAccessControlPackageVersion>
34+
<MicrosoftWin32RegistryAccessControlPackageVersion>10.0.0-preview.4.25211.19</MicrosoftWin32RegistryAccessControlPackageVersion>
35+
<MicrosoftNETCoreAppRefPackageVersion>10.0.0-preview.4.25211.19</MicrosoftNETCoreAppRefPackageVersion>
36+
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>10.0.0-preview.4.25211.19</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
37+
<MicrosoftNETCorePlatformsPackageVersion>10.0.0-preview.4.25211.19</MicrosoftNETCorePlatformsPackageVersion>
38+
<MicrosoftWin32SystemEventsPackageVersion>10.0.0-preview.4.25211.19</MicrosoftWin32SystemEventsPackageVersion>
39+
<SystemCodeDomPackageVersion>10.0.0-preview.4.25211.19</SystemCodeDomPackageVersion>
40+
<SystemConfigurationConfigurationManagerPackageVersion>10.0.0-preview.4.25211.19</SystemConfigurationConfigurationManagerPackageVersion>
41+
<SystemResourcesExtensionsPackageVersion>10.0.0-preview.4.25211.19</SystemResourcesExtensionsPackageVersion>
42+
<SystemSecurityPermissionsPackageVersion>10.0.0-preview.4.25211.19</SystemSecurityPermissionsPackageVersion>
43+
<SystemWindowsExtensionsPackageVersion>10.0.0-preview.4.25211.19</SystemWindowsExtensionsPackageVersion>
44+
<MicrosoftNETCoreILAsmPackageVersion>10.0.0-preview.4.25211.19</MicrosoftNETCoreILAsmPackageVersion>
45+
<runtimewinx64MicrosoftNETCoreILAsmPackageVersion>10.0.0-preview.4.25211.19</runtimewinx64MicrosoftNETCoreILAsmPackageVersion>
46+
<runtimewinx86MicrosoftNETCoreILAsmPackageVersion>10.0.0-preview.4.25211.19</runtimewinx86MicrosoftNETCoreILAsmPackageVersion>
4747
<!--
4848
Microsoft.NET.Sdk.IL.targets requires definition of MicrosoftNETCoreILAsmVersion
4949
-->
@@ -56,9 +56,9 @@
5656
</PropertyGroup>
5757
<!-- Arcade -->
5858
<PropertyGroup>
59-
<MicrosoftDotNetGenFacadesPackageVersion>10.0.0-beta.25209.3</MicrosoftDotNetGenFacadesPackageVersion>
60-
<MicrosoftDotNetRemoteExecutorVersion>10.0.0-beta.25209.3</MicrosoftDotNetRemoteExecutorVersion>
61-
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.25209.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
59+
<MicrosoftDotNetGenFacadesPackageVersion>10.0.0-beta.25214.8</MicrosoftDotNetGenFacadesPackageVersion>
60+
<MicrosoftDotNetRemoteExecutorVersion>10.0.0-beta.25214.8</MicrosoftDotNetRemoteExecutorVersion>
61+
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.25214.8</MicrosoftDotNetXUnitExtensionsPackageVersion>
6262
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
6363
</PropertyGroup>
6464
<!-- Below have no corresponding entries in Versions.Details.XML because they are not updated via Maestro -->

Diff for: eng/common/core-templates/steps/install-microbuild.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,18 @@ steps:
9191
script: |
9292
Write-Host "Copying Linux Path"
9393
$MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
94-
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER -replace '/build', ''
95-
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER + '/1.1.1032' + '/build'
94+
$MBSIGN_APPFOLDER = ($MBSIGN_APPFOLDER -replace '/build', '')
95+
96+
$versionRegex = '\d+\.\d+\.\d+'
97+
$package = Get-ChildItem -Path $MBSIGN_APPFOLDER -Directory |
98+
Where-Object { $_.Name -match $versionRegex }
99+
100+
if ($package.Count -ne 1) {
101+
Write-Host "There should be exactly one matching subfolder, but found $($package.Count)."
102+
exit 1
103+
}
104+
105+
$MBSIGN_APPFOLDER = $package[0].FullName + '/build'
96106
$MBSIGN_APPFOLDER | Write-Host
97107
$SignConfigPath = $MBSIGN_APPFOLDER + '/signconfig.xml'
98108
Copy-Item -Path "$(MBSIGN_APPFOLDER)/signconfig.xml" -Destination $SignConfigPath -Force

Diff for: eng/common/sdl/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Guardian.Cli" version="0.109.0"/>
3+
<package id="Microsoft.Guardian.Cli" version="0.199.0"/>
44
</packages>

Diff for: global.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tools": {
3-
"dotnet": "10.0.100-preview.3.25167.3",
3+
"dotnet": "10.0.100-preview.3.25201.16",
44
"runtimes": {
55
"dotnet/x64": [
66
"$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)"
@@ -11,14 +11,14 @@
1111
}
1212
},
1313
"sdk": {
14-
"version": "10.0.100-preview.3.25167.3"
14+
"version": "10.0.100-preview.3.25201.16"
1515
},
1616
"msbuild-sdks": {
17-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25209.3",
18-
"Microsoft.DotNet.CMake.Sdk": "10.0.0-beta.25209.3",
19-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25209.3",
17+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25214.8",
18+
"Microsoft.DotNet.CMake.Sdk": "10.0.0-beta.25214.8",
19+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25214.8",
2020
"FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
21-
"Microsoft.NET.Sdk.IL": "10.0.0-preview.4.25209.13"
21+
"Microsoft.NET.Sdk.IL": "10.0.0-preview.4.25211.19"
2222
},
2323
"native-tools": {
2424
"cmake": "latest"

Diff for: src/System.Private.Windows.Core/src/System.Private.Windows.Core.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
SYSLIB5005: System.Formats.Nrbf is experimental
2020
-->
2121
<NoWarn>$(NoWarn);CS3016;SYSLIB5005</NoWarn>
22-
<!-- Reenable when SDK and dotnet Preview 4 versions flow into this repo and we are in sync with VMR. -->
23-
<!-- tracking https://github.com/dotnet/winforms/issues/13261 -->
24-
<NoWarn Condition="'$(DotNetBuild)' == 'true'">$(NoWarn);IDE0031</NoWarn>
2522
<Deterministic>true</Deterministic>
2623
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
2724
<UsePublicApiAnalyzers>false</UsePublicApiAnalyzers>

Diff for: src/System.Private.Windows.Core/src/System/Private/Windows/Ole/FormatEnumerator.cs

+2-8
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ public int Next(int celt, ComTypes.FORMATETC[] rgelt, int[]? pceltFetched)
5656
{
5757
if (_current >= _formats.Count || celt <= 0)
5858
{
59-
if (pceltFetched is not null)
60-
{
61-
pceltFetched[0] = 0;
62-
}
59+
pceltFetched?[0] = 0;
6360

6461
return (int)HRESULT.S_FALSE;
6562
}
@@ -74,10 +71,7 @@ public int Next(int celt, ComTypes.FORMATETC[] rgelt, int[]? pceltFetched)
7471
lindex = -1
7572
};
7673

77-
if (pceltFetched is not null)
78-
{
79-
pceltFetched[0] = 1;
80-
}
74+
pceltFetched?[0] = 1;
8175

8276
_current++;
8377
return (int)HRESULT.S_OK;

Diff for: src/System.Windows.Forms.Design/src/System.Windows.Forms.Design.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
<NoWarn>$(NoWarn);IL2026;IL2046;IL2057;IL2067;IL2070;IL2072;IL2075;IL2094;IL2111</NoWarn>
1616
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
1717
<UsePublicApiAnalyzers>true</UsePublicApiAnalyzers>
18-
<!-- Reenable when IDE0031 analyzer in this repo supports null-conditional assignment as it does in the VMR. -->
19-
<!-- tracking https://github.com/dotnet/winforms/issues/13261 -->
20-
<NoWarn Condition="'$(DotNetBuild)' == 'true'">$(NoWarn);IDE0031</NoWarn>
2118
</PropertyGroup>
2219

2320
<ItemGroup>

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ protected override void WndProc(ref Message m)
182182
// If it's a toolstrip dropdown let it know that we have a specific close reason.
183183
dropDown.Close();
184184
}
185-
else if (toplevel is not null)
185+
else
186186
{
187-
toplevel.Visible = false;
187+
toplevel?.Visible = false;
188188
}
189189
}
190190

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerActionPanel.EditorPropertyLine.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ private unsafe void ActivateDropDown()
129129

130130
private void CloseDropDown()
131131
{
132-
if (_dropDownHolder is not null)
133-
{
134-
_dropDownHolder.Visible = false;
135-
}
132+
_dropDownHolder?.Visible = false;
136133
}
137134

138135
protected override int GetTextBoxLeftPadding(int textBoxHeight)

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerActionUI.DesignerActionToolStripDropDown.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,7 @@ private void PanelResized(object? sender, EventArgs e)
170170
{
171171
SuspendLayout();
172172
Size = ctrl.Size;
173-
if (_panel is not null)
174-
{
175-
_panel.Size = ctrl.Size;
176-
}
173+
_panel?.Size = ctrl.Size;
177174

178175
_designerActionUI.UpdateDAPLocation(component: null, _relatedGlyph as DesignerActionGlyph);
179176
ResumeLayout();

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,7 @@ public override void Remove(IComponent? component)
617617
Site? site = component.Site as Site;
618618
RemoveWithoutUnsiting(component);
619619
RemoveFromContainerPostProcess(component);
620-
if (site is not null)
621-
{
622-
site.Disposed = true;
623-
}
620+
site?.Disposed = true;
624621
}
625622
}
626623

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/BasicDesignerLoader.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,7 @@ protected virtual void OnEndLoad(bool successful, ICollection? errors)
635635
if (!successful && !(TryGetService(out IDesignerLoaderHost2? lh2) && lh2.IgnoreErrorsDuringReload))
636636
{
637637
// Can we even show the Continue Ignore errors in DTEL?
638-
if (lh2 is not null)
639-
{
640-
lh2.CanReloadWithErrors = LoaderHost.RootComponent is not null;
641-
}
638+
lh2?.CanReloadWithErrors = LoaderHost.RootComponent is not null;
642639

643640
UnloadDocument();
644641
}

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/CodeDomDesignerLoader.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,7 @@ protected virtual void OnComponentRename(object component, string? oldName, stri
852852
{
853853
if (LoaderHost.RootComponent == component)
854854
{
855-
if (_documentType is not null)
856-
{
857-
_documentType.Name = newName;
858-
}
855+
_documentType?.Name = newName;
859856

860857
return;
861858
}

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/CodeDomSerializerBase.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1614,10 +1614,7 @@ private bool DeserializePropertyAssignStatement(IDesignerSerializationManager ma
16141614
}
16151615
catch
16161616
{
1617-
if (relationships is not null)
1618-
{
1619-
relationships[lhs, p] = oldRelation;
1620-
}
1617+
relationships?[lhs, p] = oldRelation;
16211618

16221619
throw;
16231620
}

Diff for: src/System.Windows.Forms.Design/src/System/ComponentModel/Design/ToolStripContainerActionList.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ private void ChangeProperty(Component component, string propertyName, object val
5858

5959
if (!(bool)value)
6060
{
61-
if (panel is not null)
62-
{
63-
panel.Padding = new Padding(0);
64-
}
61+
panel?.Padding = new Padding(0);
6562

6663
if (panelDesigner?.ToolStripPanelSelectorGlyph is not null)
6764
{

Diff for: src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/BehaviorService.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,7 @@ private bool PropagateHitTest(Point pt)
546546
{
547547
MenuCommand? menuCommand = menuService.FindCommand(commandID);
548548

549-
if (menuCommand is not null)
550-
{
551-
menuCommand.Enabled = false;
552-
}
549+
menuCommand?.Enabled = false;
553550

554551
return menuCommand;
555552
}

Diff for: src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DesignBindingPicker.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,7 @@ private void CloseDropDown()
487487
if (_context?.Instance is BindingSource instance && _designerHost is not null)
488488
{
489489
BindingSourceDesigner? designer = _designerHost.GetDesigner(instance) as BindingSourceDesigner;
490-
if (designer is not null)
491-
{
492-
designer.BindingUpdatedByUser = true;
493-
}
490+
designer?.BindingUpdatedByUser = true;
494491
}
495492

496493
// Tell the editor service to close the dropdown

Diff for: src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DesignerExtenders.NameExtenderProvider.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ public virtual bool CanExtend(object o)
9191
public static void SetName(IComponent comp, string newName)
9292
{
9393
ISite? site = comp.Site;
94-
if (site is not null)
95-
{
96-
site.Name = newName;
97-
}
94+
site?.Name = newName;
9895
}
9996
}
10097
}

Diff for: src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DocumentDesigner.cs

+4-16
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ private SizeF AutoScaleDimensions
7777
set
7878
{
7979
ContainerControl c = Control as ContainerControl;
80-
if (c is not null)
81-
{
82-
c.AutoScaleDimensions = value;
83-
}
80+
c?.AutoScaleDimensions = value;
8481
}
8582
}
8683

@@ -199,10 +196,7 @@ private bool TrayAutoArrange
199196
set
200197
{
201198
_trayAutoArrange = value;
202-
if (_componentTray is not null)
203-
{
204-
_componentTray.AutoArrange = _trayAutoArrange;
205-
}
199+
_componentTray?.AutoArrange = _trayAutoArrange;
206200
}
207201
}
208202

@@ -213,10 +207,7 @@ private bool TrayLargeIcon
213207
set
214208
{
215209
_trayLargeIcon = value;
216-
if (_componentTray is not null)
217-
{
218-
_componentTray.ShowLargeIcons = _trayLargeIcon;
219-
}
210+
_componentTray?.ShowLargeIcons = _trayLargeIcon;
220211
}
221212
}
222213

@@ -227,10 +218,7 @@ private int TrayHeight
227218
set
228219
{
229220
_trayHeight = value;
230-
if (_componentTray is not null)
231-
{
232-
_componentTray.Height = _trayHeight;
233-
}
221+
_componentTray?.Height = _trayHeight;
234222
}
235223
}
236224

Diff for: src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/ParentControlDesigner.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -2482,11 +2482,8 @@ bool IOleDragClient.IsDropOk(IComponent component)
24822482
{
24832483
designer = TypeDescriptor.CreateDesigner(component, typeof(IDesigner));
24842484
ControlDesigner cd = designer as ControlDesigner;
2485-
if (cd is not null)
2486-
{
2487-
// Make sure the component doesn't get set to Visible
2488-
cd.ForceVisible = false;
2489-
}
2485+
// Make sure the component doesn't get set to Visible
2486+
cd?.ForceVisible = false;
24902487

24912488
designer.Initialize(component);
24922489
disposeDesigner = true;

Diff for: src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/StyleEditorForm.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -801,10 +801,7 @@ private void ClearAndSetSelectionAndFocus(int index)
801801
{
802802
_columnsAndRowsListView.BeginUpdate();
803803
_columnsAndRowsListView.Focus();
804-
if (_columnsAndRowsListView.FocusedItem is not null)
805-
{
806-
_columnsAndRowsListView.FocusedItem.Focused = false;
807-
}
804+
_columnsAndRowsListView.FocusedItem?.Focused = false;
808805

809806
_columnsAndRowsListView.SelectedItems.Clear();
810807
_columnsAndRowsListView.Items[index].Selected = true;

0 commit comments

Comments
 (0)