Skip to content

Conversation

@Keboo
Copy link
Owner

@Keboo Keboo commented Jan 26, 2026

This pull request introduces significant updates to the codebase, focusing on improving performance, enhancing maintainability, and leveraging modern C# language features.

Summary

  • This PR solves a bug
  • This PR introduces a new feature
  • This PR is a breaking change
  • This PR is an improvement
  • This PR is a refactoring

Details

  • Incremental Generators: Converts XAMLTest.Generator and XAMLTest.UnitTestGenerator to utilize the IIncrementalGenerator interface. This refactoring greatly improves the performance and efficiency of source code generation by enabling incremental processing during builds.
  • Dependency Updates: Bumps versions for several key NuGet packages, including major updates for Microsoft.CodeAnalysis.* and minor updates for System.CommandLine and System.Drawing.Common. This ensures the project benefits from the latest features, bug fixes, and performance enhancements from these libraries.
  • Code Modernization: Adopts contemporary C# language features across the codebase, such as primary constructors, target-typed new() expressions, and collection expressions ([]). The IsExternalInit class is also introduced to support init accessors in generated code, aligning with C# 9+ conventions.
  • Improved Test Assertions: Enhances the clarity and robustness of unit tests by updating assertions to use more specific MSTest methods (e.g., Assert.IsGreaterThan, Assert.HasCount, Assert.Contains, Assert.StartsWith).
  • Project Configuration Refinements: Streamlines .csproj files by removing redundant packaging configurations and adjusting the target frameworks in test projects for better consistency and build efficiency.

Keboo added 5 commits January 26, 2026 00:15
Updates package versions and adds Microsoft.Win32.SystemEvents; modernizes C# syntax with collection expressions, primary constructors, new() expressions, and a KeyValuePair extension; replaces generic Assert.IsTrue calls with specific MSTest assertions; adjusts serializer order comparisons; removes net9.0-windows target framework; refactors ElementGenerator to IIncrementalGenerator and extracts helper types; removes unused code and packaging build targets; comments out generated extension test setups; and adds a duplicate GenerateHelpersAttribute.
Updates XAMLTest.Generator to use IIncrementalGenerator and removes its SyntaxReceiver, converts XAMLTest.UnitTestGenerator to IIncrementalGenerator, adds a nested SyntaxReceiver for tests, and includes IsExternalInit for init property support.
Migrates `UnitTestGenerator` from `ISyntaxContextReceiver` to `IIncrementalGenerator`, removes `SyntaxReceiver`, and re-enables the generator in the test project.
Changes attribute detection in the unit test generator to scan referenced assemblies and activates test generation initialization for ContextMenu, ToolTip, and Window extensions.
Introduces XAMLTEST0002 and XAMLTEST001 diagnostic rules, implements reporting for XAMLTEST0001, XAMLTEST0002, and XAMLTEST001 in generators, and includes AnalyzerReleases.Shipped.md and AnalyzerReleases.Unshipped.md for Roslyn analyzer release tracking.
@Keboo Keboo enabled auto-merge (squash) January 26, 2026 08:46
Drops the Microsoft.Win32.SystemEvents NuGet package as it is no longer a required dependency for the project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants