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] Add nullability annotations to print types #14773

Merged
merged 10 commits into from
Nov 25, 2024
6 changes: 3 additions & 3 deletions dotnet/src/webdriver/ISupportsPrint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public interface ISupportsPrint
/// <summary>
/// Gets a <see cref="PrintDocument"/> object representing a PDF-formatted print representation of the page.
/// </summary>
/// <param name="printOptions">A <see cref="PrintOptions"/> object describing the options of the printed document.</param>
/// <param name="options">A <see cref="PrintOptions"/> object describing the options of the printed document.</param>
/// <returns>The <see cref="PrintDocument"/> object containing the PDF-formatted print representation of the page.</returns>
/// <exception cref="ArgumentNullException">If <paramref name="printOptions"/> is <see langword="null"/>.</exception>
PrintDocument Print(PrintOptions printOptions);
/// <exception cref="ArgumentNullException">If <paramref name="options"/> is <see langword="null"/>.</exception>
PrintDocument Print(PrintOptions options);
}
}
1 change: 1 addition & 0 deletions dotnet/src/webdriver/WebDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ public PrintDocument Print(PrintOptions printOptions)
{
if (printOptions is null)
{
// TODO the interface names this parameter 'options', but we will be throwing for 'printOptions'. Confusion for users?
throw new ArgumentNullException(nameof(printOptions));
}

Expand Down