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>
0 commit comments