Skip to content

Commit 43d32dd

Browse files
authored
[dotnet] Move internal compiler services to Properties (#16653)
1 parent d178006 commit 43d32dd

File tree

8 files changed

+21
-9
lines changed

8 files changed

+21
-9
lines changed

dotnet/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ pkg_zip(
3030
filegroup(
3131
name = "source_files_support_needs_from_core",
3232
srcs = [
33-
"//dotnet/src/webdriver:Internal/StringSyntaxAttribute.cs",
34-
"//dotnet/src/webdriver:Internal/StringSyntaxConstants.cs",
33+
"//dotnet/src/webdriver:Properties/StringSyntaxAttribute.cs",
34+
"//dotnet/src/webdriver:Properties/StringSyntaxConstants.cs",
3535
],
3636
visibility = ["__subpackages__"],
3737
)

dotnet/src/support/Selenium.WebDriver.Support.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242

4343
<ItemGroup>
4444
<!--Workaround for being unable to have two different types of the same name in WebDriver and in Support, despite both being internal-->
45-
<Compile Include="$(CsprojIncludePath)\Internal\StringSyntaxAttribute.cs" />
46-
<Compile Include="$(CsprojIncludePath)\Internal\StringSyntaxConstants.cs" />
45+
<Compile Include="$(CsprojIncludePath)\Properties\StringSyntaxAttribute.cs" />
46+
<Compile Include="$(CsprojIncludePath)\Properties\StringSyntaxConstants.cs" />
4747
</ItemGroup>
4848

4949
</Project>

dotnet/src/webdriver/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ load(
1212

1313
exports_files([
1414
"WebDriver.csproj",
15-
"Internal/StringSyntaxAttribute.cs",
16-
"Internal/StringSyntaxConstants.cs",
15+
"Properties/StringSyntaxAttribute.cs",
16+
"Properties/StringSyntaxConstants.cs",
1717
])
1818

1919
generated_assembly_info(

dotnet/src/webdriver/BiDi/Properties/IsExternalInit.cs renamed to dotnet/src/webdriver/Properties/IsExternalInit.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
// under the License.
1818
// </copyright>
1919

20+
#if !NET8_0_OR_GREATER
21+
22+
#pragma warning disable IDE0130 // Namespace does not match folder structure
2023
namespace System.Runtime.CompilerServices;
24+
#pragma warning restore IDE0130 // Namespace does not match folder structure
2125

2226
internal static class IsExternalInit;
27+
28+
#endif

dotnet/src/webdriver/Internal/NullableAttributes.cs renamed to dotnet/src/webdriver/Properties/NullableAttributes.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
// under the License.
1818
// </copyright>
1919

20-
2120
#if !NET8_0_OR_GREATER
2221

2322
// Following polyfill guidance explained here https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/#targetframeworks
2423
// Original code in https://github.com/dotnet/runtime/blob/419e949d258ecee4c40a460fb09c66d974229623/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
2524

25+
#pragma warning disable IDE0130 // Namespace does not match folder structure
2626
namespace System.Diagnostics.CodeAnalysis;
27+
#pragma warning restore IDE0130 // Namespace does not match folder structure
2728

2829
/// <summary>Specifies that null is allowed as an input even if the corresponding type disallows it.</summary>
2930
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)]

dotnet/src/webdriver/Internal/StringSyntaxAttribute.cs renamed to dotnet/src/webdriver/Properties/StringSyntaxAttribute.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020
#if !NET8_0_OR_GREATER
2121

22+
#pragma warning disable IDE0130 // Namespace does not match folder structure
2223
namespace System.Diagnostics.CodeAnalysis;
24+
#pragma warning restore IDE0130 // Namespace does not match folder structure
2325

2426
/// <summary>Specifies the syntax used in a string.</summary>
2527
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
@@ -86,4 +88,3 @@ public StringSyntaxAttribute(string syntax, params object?[] arguments)
8688
}
8789

8890
#endif
89-

dotnet/src/webdriver/Internal/StringSyntaxConstants.cs renamed to dotnet/src/webdriver/Properties/StringSyntaxConstants.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
// under the License.
1818
// </copyright>
1919

20-
namespace OpenQA.Selenium.Internal;
20+
#pragma warning disable IDE0130 // Namespace does not match folder structure
21+
namespace OpenQA.Selenium;
22+
#pragma warning restore IDE0130 // Namespace does not match folder structure
2123

2224
internal static class StringSyntaxConstants
2325
{

dotnet/src/webdriver/Internal/TrimmingAttributes.cs renamed to dotnet/src/webdriver/Properties/TrimmingAttributes.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121

2222
#if !NET8_0_OR_GREATER
2323

24+
#pragma warning disable IDE0130 // Namespace does not match folder structure
2425
namespace System.Diagnostics.CodeAnalysis;
26+
#pragma warning restore IDE0130 // Namespace does not match folder structure
2527

2628
/// <summary>
2729
/// Indicates that the specified method requires the ability to generate new code at runtime,

0 commit comments

Comments
 (0)