You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[dotnet] Fully annotate nullability on HttpCommandExecutor (SeleniumHQ#15110)
* [dotnet] Fully annotate nullability on `HttpCommandExecutor`
* Convert `HttpCommandExecutor` to `Lazy<T>`
* Fix missing `HttpClient.Timeout` set, fix whitespace
* Broaden changes to include HTTP execution in general
* add XML doc about exception in `ICustomDriverCommandExecutor.ExecuteCustomDriverCommand`
* Only log parameter commands at the Trace level
* Do not log command parameters in HttpCommandExecutor at all
* fix push
Copy file name to clipboardexpand all lines: dotnet/src/webdriver/CommandInfo.cs
+7-5
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@
19
19
20
20
usingSystem;
21
21
22
+
#nullable enable
23
+
22
24
namespaceOpenQA.Selenium
23
25
{
24
26
/// <summary>
@@ -45,7 +47,7 @@ public override int GetHashCode()
45
47
/// </summary>
46
48
/// <param name="obj">The <see cref="CommandInfo"/> to compare to this instance.</param>
47
49
/// <returns><see langword="true"/> if <paramref name="obj"/> is a <see cref="CommandInfo"/> and its value is the same as this instance; otherwise, <see langword="false"/>. If <paramref name="obj"/> is <see langword="null"/>, the method returns <see langword="false"/>.</returns>
48
-
publicoverrideboolEquals(objectobj)
50
+
publicoverrideboolEquals(object?obj)
49
51
{
50
52
returnthis.Equals(objasCommandInfo);
51
53
}
@@ -55,15 +57,15 @@ public override bool Equals(object obj)
55
57
/// </summary>
56
58
/// <param name="other">The <see cref="CommandInfo"/> to compare to this instance.</param>
57
59
/// <returns><see langword="true"/> if the value of the <paramref name="other"/> parameter is the same as this instance; otherwise, <see langword="false"/>. If <paramref name="other"/> is <see langword="null"/>, the method returns <see langword="false"/>.</returns>
58
-
publicboolEquals(CommandInfoother)
60
+
publicboolEquals(CommandInfo?other)
59
61
{
60
62
if(otherisnull)
61
63
{
62
64
returnfalse;
63
65
}
64
66
65
67
// Optimization for a common success case.
66
-
if(Object.ReferenceEquals(this,other))
68
+
if(object.ReferenceEquals(this,other))
67
69
{
68
70
returntrue;
69
71
}
@@ -86,7 +88,7 @@ public bool Equals(CommandInfo other)
86
88
/// <param name="left">The first <see cref="CommandInfo"/> object to compare.</param>
87
89
/// <param name="right">The second <see cref="CommandInfo"/> object to compare.</param>
88
90
/// <returns><see langword="true"/> if the value of <paramref name="left"/> is the same as the value of <paramref name="right"/>; otherwise, <see langword="false"/>.</returns>
@@ -107,7 +109,7 @@ public bool Equals(CommandInfo other)
107
109
/// <param name="left">The first <see cref="CommandInfo"/> object to compare.</param>
108
110
/// <param name="right">The second <see cref="CommandInfo"/> object to compare.</param>
109
111
/// <returns><see langword="true"/> if the value of <paramref name="left"/> is different from the value of <paramref name="right"/>; otherwise, <see langword="false"/>.</returns>
thrownewInvalidOperationException(string.Format(CultureInfo.InvariantCulture,"Unable to create URI from base {0} and relative path {1}",baseUri==null?string.Empty:baseUri.ToString(),relativeUrlString));
103
+
thrownewInvalidOperationException(string.Format(CultureInfo.InvariantCulture,"Unable to create URI from base {0} and relative path {1}",baseUri?.ToString(),relativeUrlString));
Copy file name to clipboardexpand all lines: dotnet/src/webdriver/ICustomDriverCommandExecutor.cs
+6-2
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,9 @@
18
18
// </copyright>
19
19
20
20
usingSystem.Collections.Generic;
21
+
usingSystem.Diagnostics.CodeAnalysis;
22
+
23
+
#nullable enable
21
24
22
25
namespaceOpenQA.Selenium
23
26
{
@@ -32,7 +35,8 @@ public interface ICustomDriverCommandExecutor
32
35
/// <param name="driverCommandToExecute">The name of the command to execute. The command name must be registered with the command executor, and must not be a command name known to this driver type.</param>
33
36
/// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing the names and values of the parameters of the command.</param>
34
37
/// <returns>An object that contains the value returned by the command, if any.</returns>
0 commit comments