Materal.Abstractions 1.4.4

This package has a SemVer 2.0.0 package version: 1.4.4+main.6c24ffe.
dotnet add package Materal.Abstractions --version 1.4.4
                    
NuGet\Install-Package Materal.Abstractions -Version 1.4.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Materal.Abstractions" Version="1.4.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Materal.Abstractions" Version="1.4.4" />
                    
Directory.Packages.props
<PackageReference Include="Materal.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Materal.Abstractions --version 1.4.4
                    
#r "nuget: Materal.Abstractions, 1.4.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Materal.Abstractions@1.4.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Materal.Abstractions&version=1.4.4
                    
Install as a Cake Addin
#tool nuget:?package=Materal.Abstractions&version=1.4.4
                    
Install as a Cake Tool

Materal.Abstractions

Materal 基础抽象包,提供优雅的异常处理机制和统一的异常消息格式化能力。

核心功能

  • 统一异常基类 - MateralException 作为框架异常的基础类型
  • 智能消息格式化 - 自动递归处理异常及内部异常,生成结构化错误信息
  • 灵活自定义 - 支持通过继承或委托自定义异常消息格式
  • 高性能 - 反射缓存优化,线程安全设计
  • 多框架支持 - 兼容 .NET Standard 2.0/2.1 和 .NET 8.0/9.0/10.0

快速开始

dotnet add package Materal.Abstractions
using Materal.Abstractions;

// 基础使用
throw new MateralException("操作失败");

// 格式化异常消息
try { ... }
catch (Exception ex)
{
    Console.WriteLine(ex.GetErrorMessage());
}

// 自定义异常
public class BusinessException : MateralException
{
    public string ErrorCode { get; }
    public override string GetDetailMessage(string prefix)
        => $"[{ErrorCode}] {Message}";
}

📖 文档

详细文档请查看 Wiki,包含:

  • 完整 API 参考
  • 高级用法示例
  • 最佳实践指南
  • 测试说明
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Materal.Abstractions:

Package Downloads
Materal.Utils

Materal工具包

Materal.Extensions

Materal基础类扩展包

MateralReleaseCenter.EnvironmentServer.ConfigClient

Package Description

Materal.MergeBlock.RemoteConfig

Materal MergeBlock远程配置模块

Materal.MergeBlock.COA

Materal MergeBlock证书授权模块

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.4 71 3/23/2026
1.4.3 332 3/2/2026
1.4.2 126 2/25/2026
1.4.1 236 2/1/2026
1.3.5 148 1/8/2026
1.3.3 221 11/18/2025
1.3.1 79 9/11/2025
1.3.0 135 7/24/2025
1.2.30 60 7/24/2025
1.2.29 78 7/22/2025
1.2.28 74 7/11/2025
1.1.23 1,526 5/17/2023