Welcome to the ASP.NET Core feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET Core, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
When using the Syncfusion.Pdf.Net.Core package in a project that targets .NET6, with #nullable enabled, I noticed that even where null abjects are accepted, intelligence will generate warnings related to possible null assignments to non-nullable references: (in example code below, warnings for 'pen' and 'fillBrush' are generated - though null is accepted by the called method on PdfGraphics and be treated as no pen resp. no fill)
Is it possible to update the API to support nullable reference types when enabled in the build configuration?
internal virtual void DrawRectangle(PdfPen? pen, PdfBrush? fillBrush, float x, float y, float width, float height)
{
this._graphics!.DrawRectangle(pen, fillBrush, x, y, width, height);
}
Warning CS8604 Possible null reference argument for parameter 'pen' in 'void PdfGraphics.DrawRectangle(PdfPen pen, PdfBrush brush, float x, float y, float width, float height)'. Layout.ControlsPdf (net60)
Warning CS8604 Possible null reference argument for parameter 'fillBrush' in 'void PdfGraphics.DrawRectangle(PdfPen pen, PdfBrush brush, float x, float y, float width, float height)'. Layout.ControlsPdf (net60)