diff --git a/.editorconfig b/.editorconfig
index 8f642da..b432966 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -15,28 +15,6 @@ indent_size = 2
[*.cs]
dotnet_analyzer_diagnostic.severity = warning
-dotnet_diagnostic.CA1200.severity = none
-dotnet_diagnostic.CA1707.severity = none
-dotnet_diagnostic.CA1716.severity = none
-dotnet_diagnostic.IDE0005.severity = none
-dotnet_diagnostic.IDE0008.severity = none
-dotnet_diagnostic.IDE0010.severity = none
-dotnet_diagnostic.IDE0055.severity = none
-dotnet_diagnostic.IDE0160.severity = none
-dotnet_diagnostic.IDE0270.severity = none
-dotnet_diagnostic.RCS1141.severity = none
-dotnet_diagnostic.RCS1142.severity = none
-dotnet_diagnostic.RCS1181.severity = none
-dotnet_diagnostic.RCS1186.severity = none
-dotnet_diagnostic.S101.severity = none
-dotnet_diagnostic.S1121.severity = none
-dotnet_diagnostic.S1199.severity = none
-dotnet_diagnostic.S125.severity = none
-dotnet_diagnostic.S2094.severity = none
-dotnet_diagnostic.S3925.severity = none
-dotnet_diagnostic.S4663.severity = none
-dotnet_diagnostic.SYSLIB1045.severity = none
-
# ReSharper properties
resharper_align_linq_query = true
@@ -73,7 +51,6 @@ resharper_wrap_before_eq = true
resharper_wrap_chained_method_calls = chop_if_long
resharper_wrap_switch_expression = chop_if_long
-
# Microsoft .NET properties
csharp_indent_braces = false
csharp_new_line_before_open_brace = local_functions, methods, types
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index acde096..d756a2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,7 +55,7 @@ nunit-*.xml
dlldata.c
# Benchmark Results
-BenchmarkDotNet.Artifacts/
+BenchmarkNSExtNet.Artifacts/
# .NET Core
project.lock.json
@@ -130,12 +130,12 @@ $tf/
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
-*.DotSettings.user
+*.NSExtSettings.user
# TeamCity is a build add-in
_TeamCity*
-# DotCover is a Code Coverage Tool
+# NSExtCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
@@ -400,6 +400,7 @@ FodyWeavers.xsd
# User Define
dist/
-refs/
*.[Dd]esigner.cs
*.db
+cache
+/assets/res/Ln.resx
diff --git a/.tgitconfig b/.tgitconfig
deleted file mode 100644
index cea19aa..0000000
--- a/.tgitconfig
+++ /dev/null
@@ -1,4 +0,0 @@
-[hook "startcommit"]
- cmdline = dot.clean.cmd
- wait = true
- show = true
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index 6a86153..593c51c 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,26 +1,36 @@
+
-
$(MSBuildThisFileDirectory)
+
+
+
+ true
nsnail
- $(SolutionDir)/dist/$(MSBuildProjectName)/obj
- $(SolutionDir)/dist/$(MSBuildProjectName)/bin
+ $(SolutionDir)/dist/backend/$(MSBuildProjectName)/obj
+ $(SolutionDir)/dist/backend/$(MSBuildProjectName)/bin
© 2006-2023 nsnail
- A .NET extension function library
+ The NSExt is a .NET extension function library
false
true
enable
+ preview
beta
+ v
+ CA1707;IDE0005;IDE0008;IDE0010;IDE0028;IDE0055;IDE0160;IDE0300;IDE0305;RCS1141;RCS1142;RCS1181;S101;S1121;S1135;S125;S2094;S3604;S4663;SYSLIB1045;SA1010;RCS1123;SA1407;IDE0048;S1075;S3928
NSExt
git
https://github.com/nsnail/NSExt.git
- net7.0;net8.0
+ net6.0;net7.0;net8.0
$(AssemblyName)
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 7777560..25c689d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2022 nsnail
+Copyright (c) 2023 nsnail
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/NSExt.sln b/NSExt.sln
index 5897daf..bd5a9d0 100644
--- a/NSExt.sln
+++ b/NSExt.sln
@@ -3,38 +3,66 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C84EB5A0-37AD-4B17-A51E-E36888C4441E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "backend", "backend", "{4DAF9366-855F-46BB-AE4C-660C92FA0697}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0CAC-4828-A807-34A693F73859}"
ProjectSection(SolutionItems) = preProject
+ .commitlintrc.js = .commitlintrc.js
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
- .tgitconfig = .tgitconfig
- build.cake = build.cake
- code.cleanup.full.ps1 = code.cleanup.full.ps1
- code.quality.props = code.quality.props
+ CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
- dot.clean.cmd = dot.clean.cmd
dotnet-tools.json = dotnet-tools.json
- git.pr.ps1 = git.pr.ps1
- git.rc.ps1 = git.rc.ps1
global.json = global.json
- image.optimize.csx = image.optimize.csx
- key.snk = key.snk
LICENSE = LICENSE
- logo.png = logo.png
NSExt.sln.DotSettings = NSExt.sln.DotSettings
- nuget.config = nuget.config
- packable.props = packable.props
+ NuGet.Config = NuGet.Config
+ package.json = package.json
README.md = README.md
README.zh-CN.md = README.zh-CN.md
- stylecop.analyzers.ruleset = stylecop.analyzers.ruleset
- stylecop.json = stylecop.json
- sync.metafiles.csx = sync.metafiles.csx
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSExt.Tests", "src\NSExt.Tests\NSExt.Tests.csproj", "{557FBEF6-E6D5-4531-86DF-D772A10E2261}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BB0B25C9-0901-4923-913F-00F9A6B352A5}"
+ ProjectSection(SolutionItems) = preProject
+ clean.ln.csx = scripts/clean.ln.csx
+ code.clean.csx = scripts/code.clean.csx
+ code.clean.ps1 = scripts/code.clean.ps1
+ gen.cs.tt = scripts/gen.cs.tt
+ gen.ln.cmd = scripts/gen.ln.cmd
+ gen.resx.tt = scripts/gen.resx.tt
+ git.pr.ps1 = scripts/git.pr.ps1
+ git.rc.ps1 = scripts/git.rc.ps1
+ image.optimize.csx = scripts/image.optimize.csx
+ install.as.tpl.ps1 = scripts/install.as.tpl.ps1
+ rename.csx = scripts/rename.csx
+ resharper.full.ps1 = scripts/resharper.full.ps1
+ switcher.nsext.json = scripts/switcher.nsext.json
+ switcher.ps1 = scripts/switcher.ps1
+ sync.sln.files.csx = scripts/sync.sln.files.csx
+ EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSExt", "src\NSExt\NSExt.csproj", "{BA0982BE-6E57-4AAF-9778-F9B2EB46F505}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1129FE25-466B-4F4F-85FC-3752664245E1}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3C6F049E-3EE8-4D66-9AFF-E8A369032487}"
+ ProjectSection(SolutionItems) = preProject
+ ci.yml = .github/workflows/ci.yml
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA-9493-4892-80C4-5E174C504829}"
+ ProjectSection(SolutionItems) = preProject
+ code.quality.props = build/code.quality.props
+ copy.pkg.xml.comment.files.targets = build/copy.pkg.xml.comment.files.targets
+ minver.targets = build/minver.targets
+ prebuild.targets = build/prebuild.targets
+ stylecop.analyzers.ruleset = build/stylecop.analyzers.ruleset
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSExt", "src\backend\NSExt\NSExt.csproj", "{1E62C322-EE42-4699-A6F1-791C53EFA62D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSExt.Tests", "src\backend\NSExt.Tests\NSExt.Tests.csproj", "{00604162-C444-478B-B773-3AB23C856CA7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -45,13 +73,19 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {557FBEF6-E6D5-4531-86DF-D772A10E2261}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {557FBEF6-E6D5-4531-86DF-D772A10E2261}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {557FBEF6-E6D5-4531-86DF-D772A10E2261}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {557FBEF6-E6D5-4531-86DF-D772A10E2261}.Release|Any CPU.Build.0 = Release|Any CPU
- {BA0982BE-6E57-4AAF-9778-F9B2EB46F505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BA0982BE-6E57-4AAF-9778-F9B2EB46F505}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BA0982BE-6E57-4AAF-9778-F9B2EB46F505}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BA0982BE-6E57-4AAF-9778-F9B2EB46F505}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1E62C322-EE42-4699-A6F1-791C53EFA62D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {4DAF9366-855F-46BB-AE4C-660C92FA0697} = {C84EB5A0-37AD-4B17-A51E-E36888C4441E}
+ {3C6F049E-3EE8-4D66-9AFF-E8A369032487} = {1129FE25-466B-4F4F-85FC-3752664245E1}
+ {1E62C322-EE42-4699-A6F1-791C53EFA62D} = {4DAF9366-855F-46BB-AE4C-660C92FA0697}
+ {00604162-C444-478B-B773-3AB23C856CA7} = {4DAF9366-855F-46BB-AE4C-660C92FA0697}
EndGlobalSection
EndGlobal
\ No newline at end of file
diff --git a/NSExt.sln.DotSettings b/NSExt.sln.DotSettings
index 30a9cb5..ea9fc25 100644
--- a/NSExt.sln.DotSettings
+++ b/NSExt.sln.DotSettings
@@ -1,34 +1,57 @@
-
+
Inherit
- True
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- NEVER
- NEVER
+ True
+ True
+ DO_NOT_SHOW
+ HINT
+ DO_NOT_SHOW
+ DO_NOT_SHOW
+ NEVER
+ NEVER
NEVER
- NEVER
+ NEVER
ID
IOS
IP
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb" />
+ UI
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb" />
- True
- True
- True
- True
+ True
+ True
+ True
+ True
True
1
- 1
+ 1
OFF
- HINT
+ HINT
Required
- Required
- Required
+ Required
+ Required
Required
<Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" />
<Policy Inspect="True" Prefix="_" Suffix="" Style="AA_BB" />
- <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" />
+ <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" />
<Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
@@ -80,7 +103,6 @@
True
True
True
- True
True
True
True
diff --git a/README.md b/README.md
index 0e53b79..610911e 100644
--- a/README.md
+++ b/README.md
@@ -1,65 +1,96 @@
-# ns-ext
+# dot
[中](README.zh-CN.md) | **En**
-The **ns-ext** is a .NET extension function library, containing the following types of extension modules:
-| Features | File name |
-|------------------------------------------|------------------------------------|
-| Byte type extension | ByteExtensions.cs |
-| Character Type Extensions | CharExtensions.cs |
-| Date Type Extensions | DateTimeExtensions.cs |
-| Database command type extension | DbCommandExtensions.cs |
-| Decimal Number Type extension | DecimalExtensions.cs |
-| Enumable type extension | EnumerableExtensions.cs |
-| Enumeration type extension | EnumExtensions.cs |
-| General type extension | GenericExtensions.cs |
-| Integer type extension | IntExtensions.cs |
-| Json Serialization option type extension | JsonSerializerOptionsExtensions.cs |
-| Log type extension | LoggerExtensions.cs |
-| Long integer extension | LongExtensions.cs |
-| Object type extension | ObjectExtensions.cs |
-| Stream type extension | StreamExtensions.cs |
-| String type extension | StringExtensions.cs |
-| Prototype type extension | TypeExtensions.cs |
-| Resource locator type extension | UriExtensions.cs |
+Cross-platform, all-around utility set with a beautiful character interface-the Swiss Army knife
-## Quick start
+### Brief introduction
-### Install
+The dot is the one based on the one. NET 7, a cross-platform command-line tool, integrates more than 10 utilities that
+program developers often use in their daily work, and is constantly increasing.
+
+```
+USAGE:
+ dot [OPTIONS]
+
+OPTIONS:
+ -h, --help Prints help information
+ -v, --version Prints version information
+
+COMMANDS:
+ git Git batch operation tool
+ color Screen coordinate color selection tool
+ tran Translation tools
+ guid GUID tool
+ ip IP tools
+ json Json tool
+ pwd Random password generator
+ rbom Remove the uf8 bom of the file
+ trim Remove line breaks and spaces at the end of the file
+ text Text encoding tool
+ time Time synchronization tool
+ tolf Convert newline characters to LF
+ get Multithreaded download tool
-```shell
-dotnet add package NSExt --prerelease
```
-### Example
+### Some functional examples
-```c#
-using NSExt.Extensions;
+- ##### Git batch management
-internal static class Program
-{
- private class Person
- {
- public string Name { get; set; }
- public int Age { get; set; }
- }
- public static void Main(string[] args)
- {
- var person =
- """
-{
- "Name": "Jason",
- "Age": "30"
-}
-""".Object();
+When you have a clone and a lot of git repositories, use this command to pull their latest code all at once:
- Console.WriteLine(person.Json());
- }
-}
+```
+dot git -a "pull" d:\repos
```
-### Output
+
-```json
-{"name":"Jason","age":30}
-```
\ No newline at end of file
+Similarly, you can execute any git commands on a bunch of git repositories in bulk:
+
+```
+dot git -a "config --get http.proxy" d:\repos
+```
+
+
+
+- ##### High-precision time-clock synchronization
+
+Supports parallel requests from multiple NTP clock servers, while removing the network communication duration to set the
+precise synchronization of the native clocks with the NTP standard time:
+
+```
+dot time -k
+```
+
+
+
+- ##### Text codec
+
+Copy you need to view various codec text in the clipboard, and then enter the following command to view
+
+```
+dot text
+```
+
+
+
+- ##### Multi-threading download tool
+
+Support setting the block size, number of threads to replace the single thread wget tool:
+
+```
+dot get https://github.com/nsnail/dot/releases/download/v1.1.1/dot-v1.1.1-win-x64.7z
+```
+
+
+
+- ##### Remove the blank at the end of the file
+
+Remove excess spaces and line breaks in the tail of all files in the specified directory:
+
+```
+dot trim d:\repos
+```
+
+
\ No newline at end of file
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 127d239..0cd4786 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,65 +1,94 @@
-# ns-ext
+# dot
+
[En](README.md) | **中**
-**ns-ext** 是一个.NET扩展函数库,包含以下类型扩展模块:
+跨平台的、具有美观字符界面的全能实用工具集 - 程序员的瑞士军刀
-| 功能 | 文件名 |
-| -------- | ---------------------------------- |
-| 字节类型扩展 | ByteExtensions.cs |
-| 字符类型扩展 | CharExtensions.cs |
-| 日期类型扩展 | DateTimeExtensions.cs |
-| 数据库命令类型扩展 | DbCommandExtensions.cs |
-| 十进制数类型扩展 | DecimalExtensions.cs |
-| 可枚举类型扩展 | EnumerableExtensions.cs |
-| 枚举类型扩展 | EnumExtensions.cs |
-| 泛型类型扩展 | GenericExtensions.cs |
-| 整数型扩展 | IntExtensions.cs |
-| Json序列化选项类型扩展 | JsonSerializerOptionsExtensions.cs |
-| 日志类型扩展 | LoggerExtensions.cs |
-| 长整型扩展 | LongExtensions.cs |
-| 对象类型扩展 | ObjectExtensions.cs |
-| 流类型扩展 | StreamExtensions.cs |
-| 字符串类型扩展 | StringExtensions.cs |
-| 原型类型扩展 | TypeExtensions.cs |
-| 资源定位符类型扩展 | UriExtensions.cs |
+### 简介
-## 快速开始
+dot 是一款基于.NET7,跨平台的命令行工具,集成10多种程序开发人员在日常工作常常用到的实用功能,并且还在不断增加。
-### 安装
+```
+USAGE:
+ dot [OPTIONS]
+
+OPTIONS:
+ -h, --help Prints help information
+ -v, --version Prints version information
+
+COMMANDS:
+ git Git批量操作工具
+ color 屏幕坐标颜色选取工具
+ tran 翻译工具
+ guid GUID工具
+ ip IP工具
+ json Json工具
+ pwd 随机密码生成器
+ rbom 移除文件的uf8 bom
+ trim 移除文件尾部换行和空格
+ text 文本编码工具
+ time 时间同步工具
+ tolf 转换换行符为LF
+ get 多线程下载工具
-```shell
-dotnet add package NSExt --prerelease
```
-### 示例
+### 部分功能示例
-```c#
-using NSExt.Extensions;
+- ##### Git批量管理
-internal static class Program
-{
- private class Person
- {
- public string Name { get; set; }
- public int Age { get; set; }
- }
- public static void Main(string[] args)
- {
- var person =
- """
-{
- "Name": "Jason",
- "Age": "30"
-}
-""".Object();
+当你clone了大量的git仓库, 使用这条命令可以一次性拉取它们的最新代码:
- Console.WriteLine(person.Json());
- }
-}
+```
+dot git -a "pull" d:\repos
```
-### 输出
+
-```json
-{"name":"Jason","age":30}
-```
\ No newline at end of file
+类似地,你可以批量对一堆git仓库执行任何git命令:
+
+```
+dot git -a "config --get http.proxy" d:\repos
+```
+
+
+
+- ##### 高精度时钟同步
+
+支持多个NTP时钟服务器并行请求,同时除去网络通信时长以设置本机时钟与NTP标准时间精确同步:
+
+```
+dot time -k
+```
+
+
+
+- ##### 文本编解码
+
+复制你需要查看各种编解码的文本在剪贴板中,然后输入如下命令,即可查看
+
+```
+dot text
+```
+
+
+
+- ##### 多线程下载工具
+
+支持设置分块大小,线程数量,用以替代单线程的wget工具:
+
+```
+dot get https://github.com/nsnail/dot/releases/download/v1.1.1/dot-v1.1.1-win-x64.7z
+```
+
+
+
+- ##### 移除文件末尾空白
+
+移除指定目录下所有文件尾部多余的空格和换行符:
+
+```
+dot trim d:\repos
+```
+
+
\ No newline at end of file
diff --git a/build.cake b/build.cake
deleted file mode 100644
index 2fb6a2b..0000000
--- a/build.cake
+++ /dev/null
@@ -1,117 +0,0 @@
-var target = Argument("target", "Default");
-var configuration = Argument("configuration", "Release");
-var framework = Argument("framework", "net7.0");
-
-////////////////////////////////////////////////////////////////
-// Tasks
-
-Task("Clean")
- .Does(context =>
-{
- context.CleanDirectory("./dist");
-});
-
-Task("Build")
- .IsDependentOn("Clean")
- .Does(context =>
-{
- DotNetPublish("./src/NSExt/NSExt.csproj", new DotNetPublishSettings {
- Configuration = configuration,
- Framework = framework,
- });
-});
-
-
-// Task("Test")
-// .IsDependentOn("Build")
-// .Does(context =>
-// {
-// DotNetTest("./test/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetTestSettings {
-// Configuration = configuration,
-// NoRestore = true,
-// NoBuild = true,
-// });
-//
-// DotNetTest("./test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj", new DotNetTestSettings {
-// Configuration = configuration,
-// NoRestore = true,
-// NoBuild = true,
-// });
-//
-// DotNetTest("./test/Spectre.Console.Analyzer.Tests/Spectre.Console.Analyzer.Tests.csproj", new DotNetTestSettings {
-// Configuration = configuration,
-// NoRestore = true,
-// NoBuild = true,
-// });
-// });
-
-
-// Task("Publish-GitHub")
-// .WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
-// //.IsDependentOn("Package")
-// .Does(context =>
-// {
-// var apiKey = Argument("github-key", null);
-// if(string.IsNullOrWhiteSpace(apiKey)) {
-// throw new CakeException("No GitHub API key was provided.");
-// }
-//
-// // Publish to GitHub Packages
-// var exitCode = 0;
-// foreach(var file in context.GetFiles("./.artifacts/*.nupkg"))
-// {
-// context.Information("Publishing {0}...", file.GetFilename().FullPath);
-// exitCode += StartProcess("dotnet",
-// new ProcessSettings {
-// Arguments = new ProcessArgumentBuilder()
-// .Append("gpr")
-// .Append("push")
-// .AppendQuoted(file.FullPath)
-// .AppendSwitchSecret("-k", " ", apiKey)
-// }
-// );
-// }
-//
-// if(exitCode != 0)
-// {
-// throw new CakeException("Could not push GitHub packages.");
-// }
-// });
-
-Task("Publish-NuGet")
- //.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
- .IsDependentOn("Build")
- .Does(context =>
-{
- var apiKey = Argument("nuget-key", null);
- if(string.IsNullOrWhiteSpace(apiKey)) {
- throw new CakeException("No NuGet API key was provided.");
- }
-
- // Publish to GitHub Packages
- foreach(var file in context.GetFiles("./dist/NSExt/bin/Release/*.*"))
- {
- context.Information("Publishing {0}...", file.GetFilename().FullPath);
- DotNetNuGetPush(file.FullPath, new DotNetNuGetPushSettings
- {
- Source = "https://api.nuget.org/v3/index.json",
- ApiKey = apiKey,
- SkipDuplicate = true
- });
- }
-});
-
-////////////////////////////////////////////////////////////////
-// Targets
-
-Task("Publish")
-// .IsDependentOn("Publish-GitHub")
- .IsDependentOn("Publish-NuGet");
-
-Task("Default")
- .IsDependentOn("Build");
-
-////////////////////////////////////////////////////////////////
-// Execution
-
-RunTarget(target)
\ No newline at end of file
diff --git a/code.cleanup.full.ps1 b/code.cleanup.full.ps1
deleted file mode 100644
index 5b5c370..0000000
--- a/code.cleanup.full.ps1
+++ /dev/null
@@ -1 +0,0 @@
-dotnet jb cleanupcode --no-build ./NSExt.sln
\ No newline at end of file
diff --git a/code.quality.props b/code.quality.props
deleted file mode 100644
index 7e4518a..0000000
--- a/code.quality.props
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- $(SolutionDir)/stylecop.analyzers.ruleset
-
-
- true
- true
- true
- true
- true
- true
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dot.clean.cmd b/dot.clean.cmd
deleted file mode 100644
index 3eec6ef..0000000
--- a/dot.clean.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-dot rbom -w -e refs -e .git -e node_modules
-dot trim -w -e refs -e .git -e node_modules
-dot tolf -w -e refs -e .git -e node_modules
\ No newline at end of file
diff --git a/dotnet-tools.json b/dotnet-tools.json
index d2c1b28..d36cef7 100644
--- a/dotnet-tools.json
+++ b/dotnet-tools.json
@@ -2,23 +2,29 @@
"version": 1,
"isRoot": true,
"tools": {
- "cake.tool": {
- "version": "3.1.0",
+ "dotnet-t4": {
+ "version": "2.3.1",
"commands": [
- "dotnet-cake"
+ "t4"
]
},
"dotnet-script": {
- "version": "1.4.0",
+ "version": "1.5.0",
"commands": [
"dotnet-script"
]
},
"jetbrains.resharper.globaltools": {
- "version": "2023.2.0",
+ "version": "2023.3.0",
"commands": [
"jb"
]
+ },
+ "dnt": {
+ "version": "1.8.3",
+ "commands": [
+ "dnt"
+ ]
}
}
}
\ No newline at end of file
diff --git a/git.pr.ps1 b/git.pr.ps1
deleted file mode 100644
index 2b68a89..0000000
--- a/git.pr.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-$types = @{
- '1' = @('FEA', '新增特性')
- '2' = @('REF', '项目重构')
- '3' = @('FIX', '缺陷修复')
- '4' = @('PER', '性能优化')
- '5' = @('RVT', '还原变更')
- '6' = @('FMT', '格式整理')
- '7' = @('DOC', '文档变更')
- '8' = @('TST', '单元测试')
- '9' = @('BLD', '工程构建')
-}
-git add ./
-$prefix = ''
-while ($null -eq $types[$prefix])
-{
- $prefix = Read-Host "请选择提交类型`n" $( & { param($i) $i | ForEach-Object { "$_ : $( $types[$_][0] )($( $types[$_][1] ))`n" } } $types.Keys | Sort-Object )
-}
-git commit -m "[$($types[$prefix][0])] $(($(Read-Host '是否跳过自动构建?(Y/n)') -eq 'n') ? '': '[SKIP CI] ')$(Read-Host '请输入提交消息')"
-$branch = $(git branch --show-current)
-& './dot.clean.cmd'
-git add ./
-git commit --amend --no-edit
-git pull
-git push --set-upstream origin $branch
-Start-Process -FilePath "https://github.com/nsnail/NSExt/compare/main...$branch"
-Pause
\ No newline at end of file
diff --git a/git.rc.ps1 b/git.rc.ps1
deleted file mode 100644
index b72db93..0000000
--- a/git.rc.ps1
+++ /dev/null
@@ -1,6 +0,0 @@
-$branch = $(git branch --show-current)
-git checkout main
-git pull
-git branch -D $branch
-git branch $branch
-git checkout $branch
\ No newline at end of file
diff --git a/global.json b/global.json
index 8947643..ad64c8c 100644
--- a/global.json
+++ b/global.json
@@ -1,10 +1,10 @@
{
"sdk": {
- "version": "7.0.0",
+ "version": "8.0.0",
"rollForward": "latestMajor",
"allowPrerelease": true
},
"tools": {
- "dotnet": "7.0.0"
+ "dotnet": "8.0.0"
}
}
\ No newline at end of file
diff --git a/image.optimize.csx b/image.optimize.csx
deleted file mode 100644
index e43a4d4..0000000
--- a/image.optimize.csx
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- for %%i in (*.png) do pngquant %%i --force --output %%i --skip-if-larger
- for %%i in (*.jpg) do jpegtran -copy none -optimize -perfect %%i %%i
- *
- */
-
-
-var files = Directory
- .EnumerateFiles(
- "./",
- "*.png",
- new EnumerationOptions
- {
- RecurseSubdirectories = true,
- AttributesToSkip = FileAttributes.ReparsePoint,
- IgnoreInaccessible = true
- }
- )
- .ToArray();
-
-Parallel.ForEach(
- files,
- file =>
- {
- var startInfo = new ProcessStartInfo
- {
- FileName = "pngquant",
- Arguments = $"\"{file}\" --force --output \"{file}\" --skip-if-larger"
- };
- using var p = Process.Start(startInfo);
- p.WaitForExit();
- Console.WriteLine($"{file}: {p.ExitCode}");
- }
-);
-
-files = new[] { "*.jpg", "*.jpeg" }
- .SelectMany(
- x =>
- Directory.EnumerateFiles(
- "./",
- x,
- new EnumerationOptions
- {
- RecurseSubdirectories = true,
- AttributesToSkip = FileAttributes.ReparsePoint,
- IgnoreInaccessible = true
- }
- )
- )
- .ToArray();
-
-Parallel.ForEach(
- files,
- file =>
- {
- var startInfo = new ProcessStartInfo
- {
- FileName = "jpegtran",
- Arguments = $"-copy none -optimize -perfect \"{file}\" \"{file}\""
- };
- using var p = Process.Start(startInfo);
- p.WaitForExit();
- Console.WriteLine($"{file}: {p.ExitCode}");
- }
-);
\ No newline at end of file
diff --git a/key.snk b/key.snk
deleted file mode 100644
index aac3fbe..0000000
Binary files a/key.snk and /dev/null differ
diff --git a/logo.png b/logo.png
deleted file mode 100644
index 77638c1..0000000
Binary files a/logo.png and /dev/null differ
diff --git a/nuget.config b/nuget.config
index eb8bbca..0066ce1 100644
--- a/nuget.config
+++ b/nuget.config
@@ -2,7 +2,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/packable.props b/packable.props
deleted file mode 100644
index ef69428..0000000
--- a/packable.props
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- ../../key.snk
- false
- true
- true
- true
- true
- true
- logo.png
- MIT
- https://github.com/nsnail/NSExt.git
- extensions
- true
- true
- snupkg
-
-
\ No newline at end of file
diff --git a/publish.ps1 b/publish.ps1
deleted file mode 100644
index a890466..0000000
--- a/publish.ps1
+++ /dev/null
@@ -1,6 +0,0 @@
-Remove-Item ./dist -Recurse -Force -Confirm:$false
-dotnet build -c Release
-$apikey = Read-Host -Prompt "nuget apikey"
-foreach ($file in Get-ChildItem -Path ./dist/NSExt/bin/Release | Where-Object { $_.Name -match "nupkg" }) {
- dotnet nuget push $file --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
-}
\ No newline at end of file
diff --git a/src/NSExt.Tests/NSExt.Tests.csproj b/src/NSExt.Tests/NSExt.Tests.csproj
deleted file mode 100644
index f770abf..0000000
--- a/src/NSExt.Tests/NSExt.Tests.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/NSExt.Tests/TestCase.cs b/src/NSExt.Tests/TestCase.cs
deleted file mode 100644
index 3164751..0000000
--- a/src/NSExt.Tests/TestCase.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-namespace NSExt.Tests;
-
-///
-/// 测试用例
-///
-public class TestCase
-{
- // private readonly ITestOutputHelper _testOutputHelper;
- //
- // public TestCase(ITestOutputHelper testOutputHelper)
- // {
- // _testOutputHelper = testOutputHelper;
- // }
- //
- // public enum MyEnum1
- // {
- // [ResourceDescription(nameof(Description))]
- // Online = 1
- //
- // , Offline = 2
- // }
- //
- // public static string Description { get; set; } = "123";
- //
- // ///
- // /// Case1
- // ///
- // [Fact]
- // public void Case1()
- // {
- // var test = MyEnum1.Online.ResDesc();
- //
- // _testOutputHelper.WriteLine(test);
- // Assert.True(test is not null);
- // }
-}
\ No newline at end of file
diff --git a/src/NSExt/Attributes/LocalizationAttribute.cs b/src/NSExt/Attributes/LocalizationAttribute.cs
deleted file mode 100644
index 4c157a8..0000000
--- a/src/NSExt/Attributes/LocalizationAttribute.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-namespace NSExt.Attributes;
-
-///
-/// 指定本地化资源类型
-///
-[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Field)]
-public sealed class LocalizationAttribute : Attribute
-{
- ///
- /// Initializes a new instance of the class.
- ///
- #pragma warning disable IDE0290
- public LocalizationAttribute(Type resourceClass)
- #pragma warning restore IDE0290
- {
- ResourceClass = resourceClass;
- }
-
- ///
- /// Gets or sets 资源类型
- ///
- ///
- /// 资源类型
- ///
- public Type ResourceClass { get; set; }
-}
\ No newline at end of file
diff --git a/src/NSExt/Attributes/ResourceDescriptionAttribute.cs b/src/NSExt/Attributes/ResourceDescriptionAttribute.cs
deleted file mode 100644
index c2e4386..0000000
--- a/src/NSExt/Attributes/ResourceDescriptionAttribute.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-namespace NSExt.Attributes;
-
-///
-/// 本地化资源描述特性
-///
-[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Field)]
-public sealed class ResourceDescriptionAttribute : Attribute
-{
- ///
- /// Initializes a new instance of the class.
- ///
- #pragma warning disable IDE0290
- public ResourceDescriptionAttribute(string resourceName)
- #pragma warning restore IDE0290
- {
- ResourceName = resourceName;
- }
-
- ///
- /// 资源名称
- ///
- public string ResourceName { get; set; }
-
- ///
- /// 资源对象
- ///
- public T ResourceObject { get; set; }
-}
\ No newline at end of file
diff --git a/src/NSExt/Constant/Regexes.cs b/src/NSExt/Constant/Regexes.cs
deleted file mode 100644
index 873927a..0000000
--- a/src/NSExt/Constant/Regexes.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-namespace NSExt.Constant;
-#pragma warning disable SYSLIB1045
-
-///
-/// 使用 RegexGenerator 新特性会生成重复key值的xmlComment导致出错
-///
-internal static class Regexes
-{
- public static readonly Regex RegexBacksLantUnicode
- = new(@"\\u([a-fA-F0-9]{4})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
- public static readonly Regex RegexHtmlTag = new("<[^>]*>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
- public static readonly Regex RegexMobile
- = new(@"^(\d{3})\d{4}(\d{4})$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
- public static readonly Regex RegexPercentUnicode
- = new(@"\\u([a-fA-F0-9]{4})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
- public static readonly Regex RegexUpLetter = new("([A-Z])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/ByteExtensions.cs b/src/NSExt/Extensions/ByteExtensions.cs
deleted file mode 100644
index 5c810e0..0000000
--- a/src/NSExt/Extensions/ByteExtensions.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-namespace NSExt.Extensions;
-
-///
-/// ByteExtensions
-///
-public static class ByteExtensions
-{
- ///
- /// base64编码
- ///
- /// me
- /// 编码后的base64字符串
- public static string Base64(this byte[] me)
- {
- return Convert.ToBase64String(me);
- }
-
- ///
- /// 将字节数组解码成字符串
- ///
- /// me
- /// 字符串使用的编码方式
- /// 解码后的原始字符串
- public static string HexDe(this byte[] me, Encoding e)
- {
- return e.GetString(me);
- }
-
- ///
- /// 将字节数组解码成字符串
- ///
- /// me
- /// 解码后的原始字符串
- public static string HexDe(this byte[] me)
- {
- return me.HexDe(Encoding.UTF8);
- }
-
- ///
- /// 将字节数组转换成16进制字符串
- ///
- /// me
- /// 是否大写
- /// 字节间分隔符
- /// 分隔符跳跃字节数
- public static string Str(this IEnumerable me, bool upperCase = true, string splitShar = ""
- , int splitInterval = 1)
- {
- var sb = new StringBuilder();
- var i = 0;
- foreach (var c in me.Select(x => x.ToString(upperCase ? "X2" : "x2", CultureInfo.InvariantCulture))) {
- if (i++ % splitInterval == 0) {
- _ = sb.Append(splitShar);
- }
-
- _ = sb.Append(c);
- }
-
- return sb.ToString();
- }
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/CharExtensions.cs b/src/NSExt/Extensions/CharExtensions.cs
deleted file mode 100644
index 3d5438a..0000000
--- a/src/NSExt/Extensions/CharExtensions.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace NSExt.Extensions;
-
-///
-/// CharExtensions
-///
-public static class CharExtensions
-{
- ///
- /// 是否数字或大小写字母
- ///
- public static bool IsAsciiLetterOrDigit(this char me)
- {
- return (((uint)me - 'A') & ~0x20) < 26 || (uint)me - '0' < 10;
- }
-
- ///
- /// 是否base64字符
- ///
- public static bool IsBase64Character(this char me)
- {
- return IsAsciiLetterOrDigit(me) || me is '+' or '/' or '=';
- }
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/DateTimeExtensions.cs b/src/NSExt/Extensions/DateTimeExtensions.cs
deleted file mode 100644
index 1d486e8..0000000
--- a/src/NSExt/Extensions/DateTimeExtensions.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-// ReSharper disable InconsistentNaming
-// ReSharper disable UnusedMember.Global
-
-#pragma warning disable SA1300, IDE1006
-namespace NSExt.Extensions;
-
-///
-/// DateTimeExtensions
-///
-public static class DateTimeExtensions
-{
- ///
- /// 指定时间的世界协调时的unix时间戳形式
- ///
- /// me
- /// unix时间戳
- public static long TimeUnixUtc(this DateTime me)
- {
- return (me.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
- }
-
- ///
- /// 指定时间的世界协调时的unix时间戳形式(毫秒)
- ///
- public static long TimeUnixUtcMs(this DateTime me)
- {
- return (me.ToUniversalTime().Ticks - 621355968000000000) / 10000;
- }
-
- ///
- /// ToString 的 Invariant 版本
- ///
- public static string ToInvString(this DateTime me)
- {
- return me.ToString(CultureInfo.InvariantCulture);
- }
-
- ///
- /// 将一个过去时间对象与当前时间相减转换成“xx以前”的字符串, 如2秒以前, 3天以前
- ///
- /// me
- /// 字符串
- public static string UtcTimeAgo(this DateTime me)
- {
- var ts = DateTime.UtcNow - me;
- return ts.Days switch {
- > 0 => ts.Days + "天前"
- , _ => ts.Hours switch {
- > 0 => ts.Hours + "小时前"
- , _ => ts.Minutes switch { > 0 => ts.Minutes + "分钟前", _ => ts.Seconds + "秒前" }
- }
- };
- }
-
- ///
- /// yyyy_MM
- ///
- public static string yyyy_MM(this DateTime me)
- {
- return me.ToString("yyyy-MM", CultureInfo.InvariantCulture);
- }
-
- ///
- /// yyyy_MM_dd
- ///
- public static string yyyy_MM_dd(this DateTime me)
- {
- return me.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
- }
-
- ///
- /// yyyy_MM_dd_HH_mm
- ///
- public static string yyyy_MM_dd_HH_mm(this DateTime me)
- {
- return me.ToString("yyyy-MM-dd HH:mm", CultureInfo.InvariantCulture);
- }
-
- ///
- /// yyyy_MM_dd_HH_mm_ss
- ///
- public static string yyyy_MM_dd_HH_mm_ss(this DateTime me)
- {
- return me.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
- }
-
- ///
- /// yyyy_MM_dd_HH_mm_ss_fff
- ///
- public static string yyyy_MM_dd_HH_mm_ss_fff(this DateTime me)
- {
- return me.ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture);
- }
-
- ///
- /// yyyyMM
- ///
- public static string yyyyMM(this DateTime me)
- {
- return me.ToString("yyyyMM", CultureInfo.InvariantCulture);
- }
-
- ///
- /// yyyyMMdd
- ///
- public static string yyyyMMdd(this DateTime me)
- {
- return me.ToString("yyyyMMdd", CultureInfo.InvariantCulture);
- }
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/DbCommandExtensions.cs b/src/NSExt/Extensions/DbCommandExtensions.cs
deleted file mode 100644
index 62b4521..0000000
--- a/src/NSExt/Extensions/DbCommandExtensions.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-namespace NSExt.Extensions;
-
-///
-/// DbCommandExtensions
-///
-public static class DbCommandExtensions
-{
- ///
- /// 格式化参数拼接成完整的SQL语句
- ///
- public static string ParameterFormat(this DbCommand me)
- {
- var sql = me.CommandText;
-
- // 应逆向替换,否则由于 多个表的过滤器问题导致替换不完整 如 @TenantId1 @TenantId10
- for (var i = me.Parameters.Count - 1; i >= 0; i--) {
- #pragma warning disable IDE0072
- sql = me.Parameters[i].DbType switch {
- #pragma warning restore IDE0072
- DbType.String or DbType.DateTime or DbType.Date or DbType.Time or DbType.DateTime2
- or DbType.DateTimeOffset or DbType.Guid or DbType.VarNumeric or DbType.AnsiStringFixedLength
- or DbType.AnsiString or DbType.StringFixedLength => sql.Replace( //
- me.Parameters[i].ParameterName, "'" + me.Parameters[i].Value + "'")
- , DbType.Boolean => sql.Replace( //
- me.Parameters[i].ParameterName
- , me.Parameters[i].Value != DBNull.Value &&
- Convert.ToBoolean(me.Parameters[i].Value, CultureInfo.InvariantCulture)
- ? "1"
- : "0")
- , _ => sql.Replace(me.Parameters[i].ParameterName, me.Parameters[i].Value?.ToString())
- };
- }
-
- return sql;
- }
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/DecimalExtensions.cs b/src/NSExt/Extensions/DecimalExtensions.cs
deleted file mode 100644
index 7f6f46e..0000000
--- a/src/NSExt/Extensions/DecimalExtensions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-namespace NSExt.Extensions;
-
-///
-/// DecimalExtensions
-///
-public static class DecimalExtensions
-{
- ///
- /// 四舍五入后的近似值
- ///
- /// me
- /// 小数点位数
- /// 处理后的值
- public static decimal Round(this decimal me, int place)
- {
- return Math.Round(me, place);
- }
-
- ///
- /// ToString 的 Invariant 版本
- ///
- public static string ToInvString(this decimal me)
- {
- return me.ToString(CultureInfo.InvariantCulture);
- }
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/EnumExtensions.cs b/src/NSExt/Extensions/EnumExtensions.cs
deleted file mode 100644
index b40f675..0000000
--- a/src/NSExt/Extensions/EnumExtensions.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using System.Reflection;
-using NSExt.Attributes;
-
-namespace NSExt.Extensions;
-
-///
-/// EnumExtensions
-///
-public static class EnumExtensions
-{
- ///
- /// 获取显示特性
- ///
- public static DisplayAttribute GetDisplay(this Enum me)
- {
- return me.GetAttributeOfType();
- }
-
- ///
- /// 获取枚举的本地化资源描述
- ///
- public static string ResDesc(this Enum e)
- {
- var typeOfEnum = e.GetType();
- var typeOfField = typeOfEnum.GetField(Enum.GetName(typeOfEnum, e)!);
- var resDescAttr = typeOfField!.GetCustomAttribute>(true);
- return resDescAttr is null
- ? Enum.GetName(typeOfEnum, e)
- : typeof(T).GetProperty(resDescAttr.ResourceName)?.GetValue(default) as string;
- }
-
- ///
- /// 通过类泛型类型获取特性
- ///
- private static T GetAttributeOfType(this Enum me)
- where T : Attribute
- {
- return me.GetType().GetMember(me.ToString())[0].GetCustomAttributes(false).FirstOrDefault();
- }
-}
\ No newline at end of file
diff --git a/src/NSExt/Extensions/EnumerableExtensions.cs b/src/NSExt/Extensions/EnumerableExtensions.cs
deleted file mode 100644
index 08eef9f..0000000
--- a/src/NSExt/Extensions/EnumerableExtensions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-namespace NSExt.Extensions;
-
-///
-/// EnumerableExtensions
-///
-public static class EnumerableExtensions
-{
- ///
- /// 将列表转成分隔符分隔的字符串
- ///
- public static string Join(this IEnumerable