Aymadoka.Static.Extensions 1.0.4

dotnet add package Aymadoka.Static.Extensions --version 1.0.4
                    
NuGet\Install-Package Aymadoka.Static.Extensions -Version 1.0.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="Aymadoka.Static.Extensions" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aymadoka.Static.Extensions" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Aymadoka.Static.Extensions" />
                    
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 Aymadoka.Static.Extensions --version 1.0.4
                    
#r "nuget: Aymadoka.Static.Extensions, 1.0.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 Aymadoka.Static.Extensions@1.0.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=Aymadoka.Static.Extensions&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Aymadoka.Static.Extensions&version=1.0.4
                    
Install as a Cake Tool

📦 C# 静态扩展库 - Aymadoka.Static.Extensions

简洁、实用、高效的 C# 扩展方法集合,涵盖时间、字符串、数组、哈希计算和序列化等常用功能。

🚀 简介

Aymadoka.Static.Extensions 是一个轻量级但功能强大的 C# 静态扩展库,为开发者提供了一组常用的扩展方法。通过这个库,您可以更轻松地处理日常开发中的常见任务,提升编码效率并减少重复代码。

无论是开发 Web 应用、桌面程序还是后端服务,本库都能无缝集成,助您写出更加优雅、可维护的代码。

🔧 主要功能

🕒 时间处理

  • 格式化日期时间输出
  • 计算两个时间之间的差异(天数、小时、分钟等)
  • 快速加减时间单位(如添加几天、几小时)

📄 字符串操作

  • 安全判断空值与空白字符
  • 常用字符串替换、截取、拼接方法
  • 支持 Base64 编码/解码

🧮 数组与集合

  • 合并多个数组
  • 判断数组是否为空或包含特定元素
  • 转换为列表、排序、查找最大最小值等

🔐 哈希与加密

  • 支持 MD5、SHA256、SHA512 等哈希算法
  • 提供便捷的文件哈希校验方法

💾 序列化支持

  • 快速将对象转换为 JSON / XML 字符串
  • 反序列化 JSON / XML 字符串为对象
  • 可选参数控制格式与缩进

📦 如何安装

使用 NuGet 包管理器安装:

Install-Package Aymadoka.Static.Extensions

或者通过 .NET CLI 安装:

dotnet add package Aymadoka.Static.Extensions

💡 使用示例

using Aymadoka.Static.HashExtension;
using Aymadoka.Static.SerializeExtension;

// 示例:获取字符串的 SHA256 哈希值
string hash = "Hello World".ToSHA256Hash();

// 示例:将对象序列化为 JSON
var user = new { Name = "Alice", Age = 30 };
string json = user.ToJson();

🌐 开源贡献

本项目是开源项目,欢迎任何贡献!

  • ⭐️ 给项目点个 Star 表示支持!
  • 🛠️ 提交 Issues 或 Pull Request 来改进项目。
  • 📣 分享给更多人使用。

GitHub 地址:前往 GitHub

📬 联系我

如有问题或建议,请在 GitHub 上提交 Issue 或联系我:

📧 Email: aymadoka@foxmail.com

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 was computed.  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 was computed.  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 was computed.  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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 137 6/23/2025
1.0.3 137 6/23/2025
1.0.1 140 6/23/2025
1.0.0 134 6/22/2025
0.1.19-alpha 130 6/22/2025
0.1.18-alpha 66 5/31/2025
0.1.14-alpha 59 5/31/2025
0.1.13-alpha 63 5/31/2025
0.1.12-alpha 243 5/12/2025
0.1.11-alpha 235 5/12/2025
0.1.10-alpha 62 5/31/2025
0.1.9-alpha 232 5/12/2025
0.1.8-alpha 239 5/12/2025
0.1.7-alpha 236 5/12/2025
0.1.6-alpha 181 5/11/2025
0.1.5-alpha 126 5/11/2025
0.1.3-alpha 131 5/11/2025
0.1.2-alpha 138 5/11/2025
0.1.1-alpha 135 5/11/2025
0.0.9-alpha 71 5/10/2025
0.0.7-alpha 61 5/10/2025
0.0.6-alpha 64 5/10/2025