This pull request refactors the `Pipeline/BenchmarkReport.cs` file to modernize and simplify the code, making it more idiomatic and concise. The changes focus on improving code readability, reducing redundancy, and leveraging newer C# features such as target-typed `new`, nullable reference types, and pattern-based null checks.
**Key improvements include:**
### Code Modernization & Simplification
* Replaced explicit type declarations with `var` where appropriate, streamlined null checks, and used target-typed `new` for object initialization, resulting in more concise and readable code throughout the file.
* Replaced multi-line `if` statements with single-line expressions where possible, and simplified method bodies by removing unnecessary braces and lines.
### Nullable Reference Types & Type Safety
* Updated methods and parameters to use nullable reference types (e.g., `string[]?`) and added `[NotNullWhen(true)]` attributes to improve type safety and nullability awareness.
### Access Modifiers & Redundant Code
* Removed the `internal` access modifier from classes and records that did not require it, making them package-private and simplifying the file.
* Removed redundant using directives and unnecessary comments, and suppressed certain ReSharper warnings for clarity.
This pull request refactors the
Pipeline/BenchmarkReport.csfile to modernize and simplify the code, making it more idiomatic and concise. The changes focus on improving code readability, reducing redundancy, and leveraging newer C# features such as target-typednew, nullable reference types, and pattern-based null checks.Key improvements include:
Code Modernization & Simplification
Replaced explicit type declarations with
varwhere appropriate, streamlined null checks, and used target-typednewfor object initialization, resulting in more concise and readable code throughout the file.Replaced multi-line
ifstatements with single-line expressions where possible, and simplified method bodies by removing unnecessary braces and lines.Nullable Reference Types & Type Safety
string[]?) and added[NotNullWhen(true)]attributes to improve type safety and nullability awareness.Access Modifiers & Redundant Code
Removed the
internalaccess modifier from classes and records that did not require it, making them package-private and simplifying the file.Removed redundant using directives and unnecessary comments, and suppressed certain ReSharper warnings for clarity.