Skip to content

Commit

Permalink
Merge branch 'dotnet:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
PWagner1 authored Nov 2, 2024
2 parents 1e8617f + ca0be73 commit 67361a7
Show file tree
Hide file tree
Showing 89 changed files with 1,548 additions and 1,175 deletions.
2 changes: 1 addition & 1 deletion Winforms.sln
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DesignSurfaceExt", "src\Sys
EndProject
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.VisualBasic.Forms.Tests", "src\Microsoft.VisualBasic.Forms\tests\UnitTests\Microsoft.VisualBasic.Forms.Tests.vbproj", "{FC75CB54-D8D0-4B41-9A4D-9F862F34A02D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Forms.Common.TestUtilities", "src\Common\tests\TestUtilities\System.Windows.Forms.Common.TestUtilities.csproj", "{05FD23CE-60AE-44A8-8DD6-1688F04BE385}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Windows.Core.TestUtilities", "src\Common\tests\TestUtilities\System.Private.Windows.Core.TestUtilities.csproj", "{05FD23CE-60AE-44A8-8DD6-1688F04BE385}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Forms.Analyzers", "src\System.Windows.Forms.Analyzers\src\System.Windows.Forms.Analyzers.csproj", "{3596BDE6-B211-4BE7-810D-DC7A4315E296}"
EndProject
Expand Down
204 changes: 102 additions & 102 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@
</PropertyGroup>
<!-- Below have corresponding entries in Versions.Details.XML because they are updated via Maestro -->
<PropertyGroup>
<VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>10.0.0-alpha.1.24526.1</VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>
<SystemDiagnosticsEventLogPackageVersion>10.0.0-alpha.1.24526.1</SystemDiagnosticsEventLogPackageVersion>
<SystemDirectoryServicesPackageVersion>10.0.0-alpha.1.24526.1</SystemDirectoryServicesPackageVersion>
<SystemFormatsNrbfPackageVersion>10.0.0-alpha.1.24526.1</SystemFormatsNrbfPackageVersion>
<SystemReflectionMetadataLoadContextPackageVersion>10.0.0-alpha.1.24526.1</SystemReflectionMetadataLoadContextPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>10.0.0-alpha.1.24526.1</SystemSecurityCryptographyXmlPackageVersion>
<SystemIOHashingPackageVersion>10.0.0-alpha.1.24526.1</SystemIOHashingPackageVersion>
<SystemIOPackagingPackageVersion>10.0.0-alpha.1.24526.1</SystemIOPackagingPackageVersion>
<VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>10.0.0-alpha.1.24551.5</VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion>
<SystemDiagnosticsEventLogPackageVersion>10.0.0-alpha.1.24551.5</SystemDiagnosticsEventLogPackageVersion>
<SystemDirectoryServicesPackageVersion>10.0.0-alpha.1.24551.5</SystemDirectoryServicesPackageVersion>
<SystemFormatsNrbfPackageVersion>10.0.0-alpha.1.24551.5</SystemFormatsNrbfPackageVersion>
<SystemReflectionMetadataLoadContextPackageVersion>10.0.0-alpha.1.24551.5</SystemReflectionMetadataLoadContextPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>10.0.0-alpha.1.24551.5</SystemSecurityCryptographyXmlPackageVersion>
<SystemIOHashingPackageVersion>10.0.0-alpha.1.24551.5</SystemIOHashingPackageVersion>
<SystemIOPackagingPackageVersion>10.0.0-alpha.1.24551.5</SystemIOPackagingPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>5.0.0-preview.7.20320.5</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<MicrosoftNETCoreILDAsmPackageVersion>10.0.0-alpha.1.24526.1</MicrosoftNETCoreILDAsmPackageVersion>
<SystemDiagnosticsPerformanceCounterPackageVersion>10.0.0-alpha.1.24526.1</SystemDiagnosticsPerformanceCounterPackageVersion>
<MicrosoftNETCoreILDAsmPackageVersion>10.0.0-alpha.1.24551.5</MicrosoftNETCoreILDAsmPackageVersion>
<SystemDiagnosticsPerformanceCounterPackageVersion>10.0.0-alpha.1.24551.5</SystemDiagnosticsPerformanceCounterPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.1.0-preview.1.24511.1</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemRuntimeSerializationFormattersPackageVersion>10.0.0-alpha.1.24526.1</SystemRuntimeSerializationFormattersPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>10.0.0-alpha.1.24526.1</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>10.0.0-alpha.1.24526.1</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemTextEncodingsWebPackageVersion>10.0.0-alpha.1.24526.1</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>10.0.0-alpha.1.24526.1</SystemTextJsonPackageVersion>
<SystemThreadingAccessControlPackageVersion>10.0.0-alpha.1.24526.1</SystemThreadingAccessControlPackageVersion>
<MicrosoftWin32RegistryAccessControlPackageVersion>10.0.0-alpha.1.24526.1</MicrosoftWin32RegistryAccessControlPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>10.0.0-alpha.1.24526.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>10.0.0-alpha.1.24526.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>10.0.0-alpha.1.24526.1</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>10.0.0-alpha.1.24526.1</MicrosoftWin32SystemEventsPackageVersion>
<SystemCodeDomPackageVersion>10.0.0-alpha.1.24526.1</SystemCodeDomPackageVersion>
<SystemConfigurationConfigurationManagerPackageVersion>10.0.0-alpha.1.24526.1</SystemConfigurationConfigurationManagerPackageVersion>
<SystemResourcesExtensionsPackageVersion>10.0.0-alpha.1.24526.1</SystemResourcesExtensionsPackageVersion>
<SystemSecurityPermissionsPackageVersion>10.0.0-alpha.1.24526.1</SystemSecurityPermissionsPackageVersion>
<SystemWindowsExtensionsPackageVersion>10.0.0-alpha.1.24526.1</SystemWindowsExtensionsPackageVersion>
<MicrosoftNETCoreILAsmPackageVersion>10.0.0-alpha.1.24526.1</MicrosoftNETCoreILAsmPackageVersion>
<runtimewinx64MicrosoftNETCoreILAsmPackageVersion>10.0.0-alpha.1.24526.1</runtimewinx64MicrosoftNETCoreILAsmPackageVersion>
<runtimewinx86MicrosoftNETCoreILAsmPackageVersion>10.0.0-alpha.1.24526.1</runtimewinx86MicrosoftNETCoreILAsmPackageVersion>
<SystemRuntimeSerializationFormattersPackageVersion>10.0.0-alpha.1.24551.5</SystemRuntimeSerializationFormattersPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>10.0.0-alpha.1.24551.5</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>10.0.0-alpha.1.24551.5</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemTextEncodingsWebPackageVersion>10.0.0-alpha.1.24551.5</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>10.0.0-alpha.1.24551.5</SystemTextJsonPackageVersion>
<SystemThreadingAccessControlPackageVersion>10.0.0-alpha.1.24551.5</SystemThreadingAccessControlPackageVersion>
<MicrosoftWin32RegistryAccessControlPackageVersion>10.0.0-alpha.1.24551.5</MicrosoftWin32RegistryAccessControlPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>10.0.0-alpha.1.24551.5</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>10.0.0-alpha.1.24551.5</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>10.0.0-alpha.1.24551.5</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>10.0.0-alpha.1.24551.5</MicrosoftWin32SystemEventsPackageVersion>
<SystemCodeDomPackageVersion>10.0.0-alpha.1.24551.5</SystemCodeDomPackageVersion>
<SystemConfigurationConfigurationManagerPackageVersion>10.0.0-alpha.1.24551.5</SystemConfigurationConfigurationManagerPackageVersion>
<SystemResourcesExtensionsPackageVersion>10.0.0-alpha.1.24551.5</SystemResourcesExtensionsPackageVersion>
<SystemSecurityPermissionsPackageVersion>10.0.0-alpha.1.24551.5</SystemSecurityPermissionsPackageVersion>
<SystemWindowsExtensionsPackageVersion>10.0.0-alpha.1.24551.5</SystemWindowsExtensionsPackageVersion>
<MicrosoftNETCoreILAsmPackageVersion>10.0.0-alpha.1.24551.5</MicrosoftNETCoreILAsmPackageVersion>
<runtimewinx64MicrosoftNETCoreILAsmPackageVersion>10.0.0-alpha.1.24551.5</runtimewinx64MicrosoftNETCoreILAsmPackageVersion>
<runtimewinx86MicrosoftNETCoreILAsmPackageVersion>10.0.0-alpha.1.24551.5</runtimewinx86MicrosoftNETCoreILAsmPackageVersion>
<!--
Microsoft.NET.Sdk.IL.targets requires definition of MicrosoftNETCoreILAsmVersion
-->
Expand All @@ -56,9 +56,9 @@
</PropertyGroup>
<!-- Arcade -->
<PropertyGroup>
<MicrosoftDotNetGenFacadesPackageVersion>10.0.0-beta.24525.3</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>10.0.0-beta.24525.3</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.24525.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetGenFacadesPackageVersion>10.0.0-beta.24551.1</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>10.0.0-beta.24551.1</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.24551.1</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
</PropertyGroup>
<!-- Below have no corresponding entries in Versions.Details.XML because they are not updated via Maestro -->
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"version": "9.0.100-rc.2.24474.12"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24525.3",
"Microsoft.DotNet.CMake.Sdk": "10.0.0-beta.24525.3",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24525.3",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24551.1",
"Microsoft.DotNet.CMake.Sdk": "10.0.0-beta.24551.1",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24551.1",
"FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
"Microsoft.NET.Sdk.IL": "10.0.0-alpha.1.24526.1"
"Microsoft.NET.Sdk.IL": "10.0.0-alpha.1.24551.5"
},
"native-tools": {
"cmake": "latest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<!-- Reference and Source System.Windows.Forms -->
<ProjectReference Include="..\..\src\System.Windows.Forms\src\System.Windows.Forms.csproj" />

<!-- Reference and Source System.Windows.Forms.Primitives -->
<!-- Reference and Source System.Private.Windows.Core -->
<ProjectReference Include="..\..\src\System.Private.Windows.Core\src\System.Private.Windows.Core.csproj" />

<!-- Reference and Source System.Windows.Forms.Primitives -->
Expand Down
46 changes: 0 additions & 46 deletions src/Common/tests/TestUtilities/AppContextSwitchNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@ namespace System;

public static class AppContextSwitchNames
{
/// <summary>
/// The switch that controls whether AnchorLayoutV2 feature is enabled.
/// </summary>
public const string AnchorLayoutV2
= "System.Windows.Forms.AnchorLayoutV2";

/// <summary>
/// The switch that controls whether the parent font
/// (as set by <see cref="M:System.Windows.Forms.Application.SetDefaultFont(System.Drawing.Font)" />
/// or by the parent control or form's font) is applied to menus.
/// </summary>
public const string ApplyParentFontToMenus
= "System.Windows.Forms.ApplyParentFontToMenus";

/// <summary>
/// The switch that controls whether or not the DataGridView starts its UI row count at zero.
/// </summary>
public const string DataGridViewUIAStartRowCountAtZero
= "System.Windows.Forms.DataGridViewUIAStartRowCountAtZero";

/// <summary>
/// The switch that controls whether or not the <see cref="BinaryFormatter"/> is enabled.
/// </summary>
Expand All @@ -38,30 +18,4 @@ public const string EnableUnsafeBinaryFormatterSerialization
/// </summary>
public const string LocalAppContext_DisableCaching
= "TestSwitch.LocalAppContext.DisableCaching";

/// <summary>
/// The switch that controls whether UIA notifications are raised.
/// </summary>
public const string NoClientNotifications
= "Switch.System.Windows.Forms.AccessibleObject.NoClientNotifications";

/// <summary>
/// The switch that controls whether to scale the top level form min/max size for dpi.
/// </summary>
public const string ScaleTopLevelFormMinMaxSizeForDpi
= "System.Windows.Forms.ScaleTopLevelFormMinMaxSizeForDpi";

/// <summary>
/// The switch that controls whether certificates are checked against the certificate authority revocation list.
/// If true, revoked certificates will not be accepted by WebRequests and WebClients as valid.
/// Otherwise, revoked certificates will be accepted as valid.
/// </summary>
public const string ServicePointManagerCheckCrl
= "System.Windows.Forms.ServicePointManagerCheckCrl";

/// <summary>
/// The switch that controls whether the TreeNodeCollection will insert nodes in the sorted order.
/// </summary>
public const string TreeNodeCollectionAddRangeRespectsSortOrder
= "System.Windows.Forms.ApplyParentFontToMenus";
}
26 changes: 18 additions & 8 deletions src/Common/tests/TestUtilities/BinarySerialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ namespace System;

public static class BinarySerialization
{
/// <summary>
/// Ensures the list of types marked as serializable under <paramref name="assemblyUnderTest"/> matches <paramref name="serializableTypes"/>.
/// If not, <see cref="NotSupportedException"/> is thrown.
/// </summary>
public static void EnsureSerializableAttribute(Assembly assemblyUnderTest, HashSet<string> serializableTypes)
{
foreach (Type type in assemblyUnderTest.GetTypes())
Expand Down Expand Up @@ -50,22 +54,24 @@ public static void EnsureSerializableAttribute(Assembly assemblyUnderTest, HashS
}
}

/// <summary>
/// Binary deserializes a base 64 string to <typeparamref name="T"/>. <paramref name="blob"/> is binary
/// deserialized with <see cref="BinaryFormatter"/> with <paramref name="assemblyStyle"/> taken into account.
/// </summary>
#pragma warning disable SYSLIB0050 // Type or member is obsolete
public static T EnsureDeserialize<T>(string blob)
public static T EnsureDeserialize<T>(string blob, FormatterAssemblyStyle assemblyStyle = FormatterAssemblyStyle.Simple)
{
object @object = FromBase64String(blob);
object @object = FromBase64String(blob, assemblyStyle);
Assert.NotNull(@object);
return Assert.IsType<T>(@object);

static object FromBase64String(string base64String,
FormatterAssemblyStyle assemblyStyle = FormatterAssemblyStyle.Simple)
static object FromBase64String(string base64String, FormatterAssemblyStyle assemblyStyle)
{
byte[] raw = Convert.FromBase64String(base64String);
return FromByteArray(raw, assemblyStyle);
}

static object FromByteArray(byte[] raw,
FormatterAssemblyStyle assemblyStyle = FormatterAssemblyStyle.Simple)
static object FromByteArray(byte[] raw, FormatterAssemblyStyle assemblyStyle)
{
#pragma warning disable SYSLIB0011 // Type or member is obsolete
// cs/binary-formatter-without-binder
Expand All @@ -82,14 +88,18 @@ static object FromByteArray(byte[] raw,
}
}

/// <summary>
/// Returns a base 64 string of the binary serialized <paramref name="object"/>.
/// <paramref name="object"/> is binary serialized using <see cref="BinaryFormatter"/>
/// with <paramref name="assemblyStyle"/> taken into account.
/// </summary>
public static string ToBase64String(object @object,
FormatterAssemblyStyle assemblyStyle = FormatterAssemblyStyle.Simple)
{
byte[] raw = ToByteArray(@object, assemblyStyle);
return Convert.ToBase64String(raw);

static byte[] ToByteArray(object obj,
FormatterAssemblyStyle assemblyStyle = FormatterAssemblyStyle.Simple)
static byte[] ToByteArray(object obj, FormatterAssemblyStyle assemblyStyle)
{
#pragma warning disable SYSLIB0011 // Type or member is obsolete
// cs/binary-formatter-without-binder
Expand Down
2 changes: 1 addition & 1 deletion src/Common/tests/TestUtilities/CommonTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.ComponentModel.Design.Serialization;
using System.Drawing;

namespace System.Windows.Forms.TestUtilities;
namespace System.Private.Windows.Core.TestUtilities;

public static class CommonTestHelper
{
Expand Down
3 changes: 3 additions & 0 deletions src/Common/tests/TestUtilities/FileCleanupTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace System;

/// <summary>
/// Creates a test directory path and cleans it up when test class finishes execution.
/// </summary>
public abstract class FileCleanupTestBase : IDisposable
{
private string? _testDirectory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Windows.Forms.Common.TestUtilities</AssemblyName>
<AssemblyName>System.Private.Windows.Core.TestUtilities</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>System</RootNamespace>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<IsShipping>false</IsShipping>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Common/tests/TestUtilities/TempFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
namespace System.IO;

/// <summary>
/// Represents a temporary file. Creating an instance creates a file at the specified path,
/// and disposing the instance deletes the file.
/// Represents a temporary file. Creating an instance creates a file at the specified path,
/// and disposing the instance deletes the file.
/// </summary>
/// <remarks>
/// <para>
Expand Down
6 changes: 5 additions & 1 deletion src/Common/tests/TestUtilities/TestIncludeType.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Windows.Forms.TestUtilities;
namespace System.Private.Windows.Core.TestUtilities;

/// <summary>
/// Specifies what type of test data to include in the <see cref="TheoryData"/>. This is
/// used in <see cref="CommonMemberDataAttribute"/>
/// </summary>
[Flags]
public enum TestIncludeType
{
Expand Down
3 changes: 3 additions & 0 deletions src/Common/tests/TestUtilities/ThreadCultureChange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

namespace System;

/// <summary>
/// Facilitates temporarily changing the <see cref="CultureInfo.CurrentCulture"/> and <see cref="CultureInfo.CurrentUICulture"/>.
/// </summary>
public sealed class ThreadCultureChange : IDisposable
{
private readonly CultureInfo _origCulture = CultureInfo.CurrentCulture;
Expand Down
Loading

0 comments on commit 67361a7

Please sign in to comment.