Skip to content

Commit 9e9bc84

Browse files
committed
synchronize preprocessor directives on NET8_0_OR_GREATER
1 parent 8c8367a commit 9e9bc84

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

dotnet/src/webdriver/DefaultFileDetector.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
#nullable enable
2020

21-
using System.Diagnostics.CodeAnalysis;
22-
2321
namespace OpenQA.Selenium
2422
{
2523
/// <summary>
@@ -35,8 +33,8 @@ public class DefaultFileDetector : IFileDetector
3533
/// <param name="keySequence">The sequence to test for file existence.</param>
3634
/// <returns>This method always returns <see langword="false"/> in this implementation.</returns>
3735
public bool IsFile(
38-
#if NET
39-
[NotNullWhen(true)]
36+
#if NET8_0_OR_GREATER
37+
[System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
4038
#endif
4139
string? keySequence)
4240
{

dotnet/src/webdriver/Firefox/FirefoxDriver.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using System;
2222
using System.Collections.Generic;
2323
using System.Collections.ObjectModel;
24-
using System.Diagnostics.CodeAnalysis;
2524
using System.Globalization;
2625
using System.IO;
2726
using System.IO.Compression;
@@ -249,8 +248,8 @@ public override IFileDetector FileDetector
249248
/// <summary>
250249
/// Gets a value indicating whether a DevTools session is active.
251250
/// </summary>
252-
#if NET
253-
[MemberNotNullWhen(true, nameof(devToolsSession))]
251+
#if NET8_0_OR_GREATER
252+
[System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(devToolsSession))]
254253
#endif
255254
public bool HasActiveDevToolsSession
256255
{

dotnet/src/webdriver/IFileDetector.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19-
using System.Diagnostics.CodeAnalysis;
20-
2119
#nullable enable
2220

2321
namespace OpenQA.Selenium
@@ -35,8 +33,8 @@ public interface IFileDetector
3533
/// <param name="keySequence">The sequence to test for file existence.</param>
3634
/// <returns><see langword="true"/> if the key sequence represents a file; otherwise, <see langword="false"/>.</returns>
3735
bool IsFile(
38-
#if NET
39-
[NotNullWhen(true)]
36+
#if NET8_0_OR_GREATER
37+
[System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
4038
#endif
4139
string? keySequence);
4240
}

dotnet/src/webdriver/Remote/LocalFileDetector.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19-
using System.Diagnostics.CodeAnalysis;
2019
using System.IO;
2120

2221
#nullable enable
@@ -36,8 +35,8 @@ public class LocalFileDetector : IFileDetector
3635
/// <param name="keySequence">The sequence to test for file existence.</param>
3736
/// <returns><see langword="true"/> if the key sequence represents a file; otherwise, <see langword="false"/>.</returns>
3837
public bool IsFile(
39-
#if NET
40-
[NotNullWhen(true)]
38+
#if NET8_0_OR_GREATER
39+
[System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
4140
#endif
4241
string? keySequence)
4342
{

0 commit comments

Comments
 (0)