Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet] Increment WebDriver towards nullability #15228

Open
wants to merge 15 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dotnet/src/webdriver/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ public Command(string name, string jsonParameters)
/// <param name="sessionId">Session ID the driver is using</param>
/// <param name="name">Name of the command</param>
/// <param name="parameters">Parameters for that command</param>
/// <exception cref="ArgumentNullException">If <paramref name="name"/> is <see langword="null"/>.</exception>
public Command(SessionId? sessionId, string name, Dictionary<string, object>? parameters)
{
this.SessionId = sessionId;
this.Parameters = parameters ?? new Dictionary<string, object>();
this.Name = name;
this.Name = name ?? throw new ArgumentNullException(nameof(name));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that passing in null for the name will throw an exception anyway, This just clarifies the exception for any user who does this.

}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions dotnet/src/webdriver/CommandInfoRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public bool IsCommandNameDefined(string commandName)
/// </summary>
/// <param name="commandName">The <see cref="DriverCommand"/> for which to get the information.</param>
/// <returns>The <see cref="HttpCommandInfo"/> for the specified command, or <see langword="null"/> if not found or value is not <typeparamref name="T"/>.</returns>
/// <exception cref="ArgumentNullException">If <paramref name="commandName"/> is <see langword="null"/>.</exception>
public T? GetCommandInfo<T>(string commandName) where T : CommandInfo
{
T? toReturn = default;
Expand Down
Loading
Loading