diff --git a/dotnet/src/webdriver/Internal/Base64UrlEncoder.cs b/dotnet/src/webdriver/Internal/Base64UrlEncoder.cs index c8b22e7223e8b..6c76ab9ae93db 100644 --- a/dotnet/src/webdriver/Internal/Base64UrlEncoder.cs +++ b/dotnet/src/webdriver/Internal/Base64UrlEncoder.cs @@ -18,6 +18,7 @@ // using System; +using System.ComponentModel; #nullable enable @@ -33,6 +34,7 @@ namespace OpenQA.Selenium.Internal /// /// Encodes and Decodes strings as Base64Url encoding. /// + [EditorBrowsable(EditorBrowsableState.Never)] public static class Base64UrlEncoder { private const char base64PadCharacter = '='; diff --git a/dotnet/src/webdriver/Internal/PortUtilities.cs b/dotnet/src/webdriver/Internal/PortUtilities.cs index 26c45a8b2688f..866087ba08834 100644 --- a/dotnet/src/webdriver/Internal/PortUtilities.cs +++ b/dotnet/src/webdriver/Internal/PortUtilities.cs @@ -17,14 +17,18 @@ // under the License. // +using System.ComponentModel; using System.Net; using System.Net.Sockets; +#nullable enable + namespace OpenQA.Selenium.Internal { /// /// Encapsulates methods for working with ports. /// + [EditorBrowsable(EditorBrowsableState.Never)] public static class PortUtilities { /// @@ -42,7 +46,7 @@ public static int FindFreePort() { IPEndPoint socketEndPoint = new IPEndPoint(IPAddress.Any, 0); portSocket.Bind(socketEndPoint); - socketEndPoint = (IPEndPoint)portSocket.LocalEndPoint; + socketEndPoint = (IPEndPoint)portSocket.LocalEndPoint!; listeningPort = socketEndPoint.Port; } finally diff --git a/dotnet/src/webdriver/Internal/ReturnedCookie.cs b/dotnet/src/webdriver/Internal/ReturnedCookie.cs index bef50faa49662..340210667e3c1 100644 --- a/dotnet/src/webdriver/Internal/ReturnedCookie.cs +++ b/dotnet/src/webdriver/Internal/ReturnedCookie.cs @@ -18,6 +18,7 @@ // using System; +using System.ComponentModel; using System.Globalization; namespace OpenQA.Selenium.Internal @@ -25,6 +26,7 @@ namespace OpenQA.Selenium.Internal /// /// Represents a cookie returned to the driver by the browser. /// + [EditorBrowsable(EditorBrowsableState.Never)] public class ReturnedCookie : Cookie {