11 个仓库
Essential utilities for common development patterns and performance.
Explore 11 awesome GitHub repositories matching part of an awesome list · Core .NET Libraries. Refine with filters or upvote what's useful.
Polly is a resilience and transient-fault-handling library for .NET applications. It provides a framework for defining and executing stability patterns that manage failures and resource exhaustion during operation execution. The library enables developers to compose complex resilience strategies through a fluent builder pattern, wrapping target operations in functional decorators. These policies intercept execution flow to apply automated recovery mechanisms, such as retries for temporary errors or circuit breakers that isolate unstable components by blocking requests. The framework supports
Resilience and transient-fault-handling library for .NET applications.
Scalar is a platform for building and managing API specifications, focusing on OpenAPI and AsyncAPI standards. It provides tools to generate interactive API references with embedded testing interfaces, create mock servers for pre-implementation testing, and build offline-first API clients that sync with backend frameworks. The platform also supports version upgrades of specifications to maintain compatibility and includes command-line utilities for local development and document management. The project distinguishes itself through automated release workflows that generate changelogs and publi
Modern, interactive UI for visualizing and testing OpenAPI documentation.
MediatR is a .NET library for implementing the mediator pattern, serving as an in-process message broker that decouples senders and receivers by routing messages through a central dispatcher. It enables the transmission of requests and notifications between different components within a single application process. The framework provides a pipeline behavior system that allows for the interception and processing of messages through a sequence of custom behaviors. This architecture is used to implement cross-cutting concerns, such as logging or validation, across multiple handlers. The library
Implementation of the mediator pattern for decoupled request handling.
BenchmarkDotNet is a library and tool suite for measuring the execution time and memory allocation of .NET code. It utilizes statistical sampling and warm-up iterations to determine the stability and precise execution speed of specific methods. The project provides a JIT disassembly viewer to inspect processor disassembly and analyze how the compiler executes code paths. It includes a memory allocation profiler that tracks managed and native memory traffic to identify efficiency bottlenecks. Additionally, a runtime performance comparator allows the same benchmarks to be executed across differ
Advanced library for measuring and analyzing code performance.
AutoMapper is a .NET object-to-object mapper designed to transfer data between different object types. It functions as an automated mapping library that reduces the need for manual property assignments by using naming conventions to match properties between classes. The library focuses on automating data projection and the conversion of internal domain models into data transfer objects. It supports layered architecture decoupling by mapping data between domain entities and view models. The system employs convention-based member matching, flattening-based property projection, and recursive ty
Convention-based library for mapping between object models.
FluentValidation is a strongly-typed data validation library for .NET. It functions as a rule engine and input validation framework used to define and execute complex business rules and constraints for data objects. The library utilizes a fluent interface API, allowing the construction of readable and declarative validation constraints through method chaining. It leverages generics and lambda expressions to enforce data integrity and business logic at compile time. The project covers the enforcement of business rules, strongly-typed data validation, and input sanitization workflows to verify
Library for building strongly-typed, fluent validation rules.
NSwag is an OpenAPI toolchain for .NET that provides a suite of generators for converting OpenAPI specifications and JSON schemas into clients, server stubs, and structured documentation. It enables the creation of type-safe client libraries and data transfer objects, as well as the generation of OpenAPI specifications by analyzing .NET controllers. The project supports contract-first API development by generating server controller stubs from specifications and offers dedicated TypeScript API integration to ensure type safety in frontend applications. It also provides tools for hosting intera
Toolchain for OpenAPI generation and client code creation.
Swashbuckle.AspNetCore 是一个用于 ASP.NET Core 的 API 规范工具和文档生成器。它从源代码和模型中提取元数据,以生成标准化的 OpenAPI 规范和用于探索与测试 Web API 的交互式浏览器界面。 该项目集成了一个中间件组件来提供这些规范,以及一个用于直接从运行中的应用进行交互式 API 测试的 Swagger UI。它还提供了一个命令行导出器,用于从应用程序集中提取规范文件,以供 CI/CD 流水线使用。 该工具涵盖广泛的功能,包括复杂类型的模式管理、通过属性和 XML 注释进行的元数据标注,以及 OAuth 2.0 和 API 密钥的安全配置。它进一步支持 API 合约管理、规范版本控制以及用于过滤或修改操作的可定制生成流水线。
Tooling for generating Swagger documentation for web APIs.
Mapster 是一个 .NET 对象到对象映射器和高性能映射引擎,用于在不同对象模型之间转换数据。它作为类型安全的数据传输工具和 LINQ 查询投影工具,用于在内部逻辑和外部数据结构之间移动数据。 该引擎利用编译后的映射表达式和机器码来减少对象转换过程中的开销。它特别允许将可查询的数据源直接投影到目标类型中,以优化数据库检索。 该工具集涵盖了数据传输对象(DTO)生成、不可变数据转换和查询结果投影。它包括映射不可变集合、保留对象引用以及将运行时参数注入转换过程的功能。
High-performance, lightweight object-to-object mapping library.
F# is a strongly typed, functional programming language and compiler for the .NET ecosystem. It transforms functional source code into Common Intermediate Language for execution on the .NET runtime and provides a foundational core library of primitive types and functions. The language emphasizes immutability and uses a static, constraint-based type inference system to automatically determine variable types without requiring explicit user annotations. It also functions as a Language Server Protocol provider, exposing compiler logic through a service-based API to deliver real-time code analysis
Provides a foundational set of primitive types and functions required to execute programs within the .NET ecosystem.
Mapperly 是一个 C# 源生成器,用于 .NET 中的高性能对象到对象映射。它作为一个编译时映射库,在构建过程中生成必要的转换代码,消除了在领域模型和数据传输对象(DTO)之间转换时对运行时反射的需求。 该工具的特色在于提供类型安全的诊断验证和严格的映射强制执行,在编译时为未映射的属性发出警告。它包含用于处理循环引用和深拷贝的专门能力,以保持对象标识并在复杂转换期间防止无限循环。 该项目涵盖了广泛的转换任务,包括嵌套对象层级的扁平化、各种集合类型和 Span 的转换,以及字符串与原始类型之间的全面枚举映射。它还通过查询投影支持数据库集成,将映射定义转换为表达式树,以优化从可查询源中检索字段。 配置选项允许自定义对象工厂、成员级排除以及用户定义映射逻辑的集成。生成的源代码可导出到可配置目录,以便进行人工检查和版本控制。
Source generator-based mapper for compile-time type-safe transformations.