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
Copy file name to clipboardExpand all lines: dotnet/src/webdriver/CommandInfo.cs
+7-5Lines changed: 7 additions & 5 deletions
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
+5-2Lines changed: 5 additions & 2 deletions
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,7 @@ 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>
Copy file name to clipboardExpand all lines: dotnet/src/webdriver/WebDriver.cs
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -463,13 +463,16 @@ public INavigation Navigate()
463
463
returnnewNavigator(this);
464
464
}
465
465
466
+
#nullable enable
467
+
466
468
/// <summary>
467
469
/// Executes a command with this driver.
468
470
/// </summary>
469
471
/// <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>
470
472
/// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing the names and values of the parameters of the command.</param>
471
473
/// <returns>A <see cref="Response"/> containing information about the success or failure of the command and any data returned by the command.</returns>
@@ -509,17 +512,23 @@ public bool RegisterCustomDriverCommand(string commandName, CommandInfo commandI
509
512
/// <param name="commandInfo">The <see cref="CommandInfo"/> object describing the command.</param>
510
513
/// <param name="isInternalCommand"><see langword="true"/> if the registered command is internal to the driver; otherwise <see langword="false"/>.</param>
511
514
/// <returns><see langword="true"/> if the command was registered; otherwise, <see langword="false"/>.</returns>
0 commit comments