This repository contains Roslyn diagnostic analyzers and code fix providers for the xUnit.net test framework (v2 and v3, including Native AOT). It enforces best practices, detects common anti-patterns (e.g., misuse of Assert methods, serialization issues with theory data, incorrect async handling, and structural problems in test classes), and provides automated code fixes. The codebase is organized around version-aware context classes (XunitContext) that resolve xUnit types and version-specific behavior, allowing a single analyzer to target multiple xUnit versions. It includes a rich test suite using a custom CSharpVerifier base class, building on Microsoft.CodeAnalysis.Testing. The infrastructure is well-abstracted with reusable base classes for analyzers, suppressors, and fix providers, and the project is packaged as a NuGet package automatically referenced by xUnit projects.
This repository is a WPF control library that ports Microsoft's WinUI3 (Fluent) design language to the Windows Presentation Foundation (WPF) framework. It provides a comprehensive set of modern UI controls—such as NavigationView, CommandBar, InfoBar, TabView, SplitView, NumberBox, ColorPicker, TeachingTip, and many more—each with full theming support (light, dark, high-contrast), accessibility automation peers, and virtualized layout engines for high performance. The library is distributed as a NuGet package (ModernWpfUI) and is accompanied by a gallery demo application (ModernWpf.Gallery) that showcases all controls with live code samples. Architecture: The codebase is organized into two main assemblies: ModernWpf (base infrastructure: theme management, helpers, icon sources, animations, window chrome) and ModernWpf.Controls (all ported controls with their XAML templates, property definitions, and automation peers). Controls follow a declarative property system using DependencyProperty registration, and many leverage a recycling element factory (RecyclePool) for efficient item rendering in repeaters and lists. The library integrates with WPF's native theming via ResourceDictionaryEx and FluentControlsResources, merging platform Fluent dictionaries with custom theme resources. Key entry points: For consumers, the library is used by adding the ModernWpf.Controls assembly and referencing the namespace http://schemas.modernwpf.com/2019 in XAML. The gallery application entry point is ModernWpf.Gallery/App.xaml.cs. Test infrastructure includes ModernWpfTestApp and dedicated unit tests under test/ that use a custom WpfTestHost. External dependencies: WPF (System.Windows), .NET runtime, and Win32 native methods for window management (NativeMethods.cs). The build system supports multiple .NET targets (net462, net8.0-windows7.0, net10.0-windows7.0) with conditional compilation. The project maintains strict parity with upstream WinUI3 through source-audit tests that pin specific commit hashes and verify code patterns. This ensures the WPF port remains faithful to the original Fluent design, but also creates maintenance overhead when upstream changes. The library is in preview status (1.x release candidate) with a frozen 0.9.x line; API is not yet frozen.
A simple yet rigorously correct .NET library for validating email addresses according to RFC 5322 and Internationalized Email standards (RFC 653x). The core is a hand-written character-by-character parser that rejects invalid syntax while supporting quoted strings, IP literals, international characters, and length constraints per the spec. It provides a static `Validate`/`TryValidate` method and a DataAnnotations `EmailAttribute` for easy integration into ASP.NET or other validation frameworks. The library is well-tested with hundreds of valid and invalid examples, including edge cases like surrogate pairs and maximum-length addresses. It targets multiple .NET frameworks (net462, net8.0, net10.0, netstandard2.0/2.1) and is distributed as a NuGet package with signed assemblies. The code is clean, well-commented, and free of external dependencies for the core validation, making it a trustworthy component for any .NET application needing email input validation.
Semi.Avalonia is a comprehensive Avalonia UI theme library inspired by Semi Design, delivered as multiple NuGet packages. It provides a complete set of styled controls (buttons, text boxes, data grids, color pickers, etc.) with Light, Dark, and High Contrast themes, plus localization in 16 languages. The architecture follows Avalonia's resource dictionary and control theme patterns: each control has shared, light, dark, and high contrast XAML files that define visual states, triggers, and animations. A central `SemiTheme` class orchestrates theme swapping and locale selection via merged resource dictionaries. The repository also includes a demo application for desktop, Web, Android, and Lixux DRM platforms. The theming system is built on a well-structured token system using `Variables.axaml` and color palette files (e.g., `Light.axaml`, `Dark.axaml`) that define design tokens like spacing, border radii, and semantic colors. Control themes extensively use `DynamicResource` references, enabling runtime theme switching. The color picker extension (`Semi.Avalonia.ColorPicker`) is a notable sub-system with spectrum, palette, and component tabs supporting RGBA and HSVA models. Animations (e.g., `SemiPopupAnimations`) and custom converters (e.g., `PositionToAngleConverter`) add polish. The demo application is an MVVM-based showcase that exercises all controls and provides installation instructions. The CI/CD pipeline builds and publishes NuGet packages and cross-platform demos. Overall, this is a production-quality theming library with good mainainability, though some duplication between variant themes and a large icon file present potential maintenance costs.
This is a .NET client library for Google Maps Platform web services. It provides a strongly-typed, async-first wrapper around 15+ Google Maps APIs, including Geocoding, Directions, Distance Matrix, Places (New), Routes, Address Validation, Elevation, Time Zone, Roads, Solar, Aerial View, Air Quality, Pollen, and Static Maps. The library is published as a NuGet package (over 2M downloads) and targets multiple .NET frameworks (netstandard2.0, net8.0, net10.0). It follows a consistent request/response pattern with generic constraints for compile-time safety, and includes a built-in engine that handles HTTP serialization, API key injection, error handling, and OpenTelemetry diagnostics (tracing and metrics). An optional dependency injection extension package registers `IGoogleMapsClient` with `IHttpClientFactory`. The repository also contains a comprehensive test suite with a VCR (record/replay) system, benchmarks, mutation testing, and sample applications (Blazor, Console, Minimal API, Generic Host) demonstrating usage.
RiotSharp is a C# wrapper for the Riot Games API, providing access to League of Legends data including summoner information, match history, champion stats, leagues, and static game data. The library implements automatic rate limiting to comply with Riot's API constraints and includes caching for static data to minimize API calls. It features a layered architecture with separate projects for the core library, ASP.NET Core integration, and tests. The main entry point is the `RiotApi` class, which aggregates all endpoint interfaces via dependency injection. Key reusable components include a sophisticated rate limiter, a pluggable caching abstraction, a base class for static data endpoints, and custom JSON converters for enum serialization.