Viyi.Util
2.0.0-preview-1
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
This is a prerelease version of Viyi.Util.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Viyi.Util --version 2.0.0-preview-1
NuGet\Install-Package Viyi.Util -Version 2.0.0-preview-1
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="Viyi.Util" Version="2.0.0-preview-1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Viyi.Util --version 2.0.0-preview-1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Viyi.Util, 2.0.0-preview-1"
#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.
// Install Viyi.Util as a Cake Addin
#addin nuget:?package=Viyi.Util&version=2.0.0-preview-1&prerelease
// Install Viyi.Util as a Cake Tool
#tool nuget:?package=Viyi.Util&version=2.0.0-preview-1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Viyi.Util - .NET 的常用工具扩展
Viyi.Util v2 对该工具库进行了完全重写,不完全兼容 v1。
v2 参考其它现代高级语言、类库和日常使用的情况,提供一些常见的工具函数和工具类,以 C# 的“扩展函数”作为主要实现形式,也包含一些 Helper 静态类和其他工具类。
其他相关类库
Viyi.Util 包含内容较多,依赖项也较多,部分功能已经分离出去,按功能分解成一些小工具库
- Viyi.Strings 专注于扩展字符串相关的功能和工具函数
- Viyi.Bytes (comming soon) 专注于扩展二进制相关的功能和工具函数
获取
Viyi.Util 通过 NuGet 发布。
在 Visual Studio 包管理器控制台 中运行下面的命令获取:
PM> Install-Package Viyi.Util
或者在 管理 NuGet 程序包对话框 中安装。
主要特性 (Features)
扩展
object
,- 参考 Kotlin,提供了
.Also()
和.Let()
扩展,同时支付它们的异步版本; - 提供
ToXxxx()
和ConvertTo()
方法,是System.Convert
类中相关功能的去异常封装; - 提供
As()
方法弥补as
关键字不能应用于结构体 (struct) 类型的问题;
- 参考 Kotlin,提供了
扩展 Linq (
Enumerable
),- 提供
ForEach()
扩展; - 提供
AsToArray()
和AsToList()
先尝试 as 操作,最大避免重新生成数组或列表对象; - 为 .NET6 以下框架提供
MaxBy()
和MinBy()
- 提供
其它工具
会根据 Issue 进行分析、确认并完成实现。
目标框架
-
支持:
- .NET
6.0/5.0
- .NET Core
3.1/3.0
- .NET
-
支持:
- .NET
6.0/5.0
- .NET Core
3.1/3.0/2.2/2.1/2.0
- .NET Framework
4.8/4.7.x/4.7/4.6.2
- .NET
文档
提供了 Xml Documentation (Viyi.Util.xml
) 随 NuGet 包发布。
没有制作专门供阅读的 API 文档,但是可以直接阅读源代码中的文档。
WIKI 中对部分功能进行了说明。
License
注:
Viyi.Util
v1.x
使用 MIT,从v2.0
开始变更为 MulanPSL2
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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. |
.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.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
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 |
---|---|---|
2.1.2-beta | 137 | 4/17/2023 |
2.1.1 | 273 | 3/28/2023 |
2.1.0 | 311 | 12/22/2022 |
2.0.1 | 411 | 9/30/2022 |
2.0.1-beta | 147 | 9/11/2022 |
2.0.0-preview-1 | 164 | 7/10/2022 |
1.1.2 | 1,880 | 8/25/2017 |
1.1.1 | 1,020 | 6/20/2017 |
1.1.0.1 | 998 | 6/9/2017 |
1.1.0 | 986 | 3/17/2017 |
1.0.4 | 1,376 | 9/15/2015 |
1.0.3 | 1,078 | 8/16/2015 |
1.0.2.3 | 1,075 | 7/9/2015 |
1.0.2 | 1,373 | 6/8/2015 |
1.0.0.1 | 1,448 | 11/29/2014 |