Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
bb8f7fa
chore: 重构包名并更新版本号至2026.0108.1
li761747705 Jan 8, 2026
2eead63
refactor: 标记重复的包装方法为 Obsolete 以引导使用内置 API
li761747705 Feb 13, 2026
a5d0d9f
refactor: 整合代码库并优化性能
li761747705 Feb 13, 2026
353e1eb
feat(core): 添加AES和DES加密工具类并重构项目结构
li761747705 Feb 13, 2026
388ab24
refactor: 优化代码分类结构
li761747705 Feb 13, 2026
b5a3f54
refactor: 进一步优化文件分类结构
li761747705 Feb 13, 2026
1894b8a
refactor: 合并 IEnumerableCategory 到 CollectionsCategory
li761747705 Feb 13, 2026
09bdb70
refactor: 扩展 DataCategory 并修复命名空间
li761747705 Feb 13, 2026
6509fa8
refactor: 优化文件分类并修复命名空间引用
li761747705 Feb 13, 2026
596ffa4
refactor: 优化文件分类结构(方案A)
li761747705 Feb 13, 2026
cc87456
refactor: 执行方案A - 全面优化文件分类结构
li761747705 Feb 13, 2026
e8715d7
refactor: 最终清理和优化文件分类结构
li761747705 Feb 13, 2026
62a73ca
docs: 更新项目结构文档
li761747705 Feb 13, 2026
5816b5b
refactor: 优化项目结构和修复命名空间不一致
li761747705 Feb 14, 2026
0c31b89
refactor(core): 重构加密工具类和随机数生成器以提升性能和安全性
li761747705 Mar 24, 2026
067fdde
feat(net): 添加DNS解析工具类DnsUtil
li761747705 Mar 24, 2026
8db2336
全部优化
li761747705 Mar 27, 2026
cd51d17
refactor(core): 更新项目配置和代码以支持可空引用类型
li761747705 Mar 27, 2026
3e71005
测试断言优化与底层实现细节修正
li761747705 Mar 31, 2026
ee18e39
feat(v1.1.1): 大规模功能扩展与模块化重构
li761747705 Apr 9, 2026
28ae5bb
fix: 修复XML注释格式错误和异步测试警告
li761747705 Apr 9, 2026
a2508cd
refactor: 合并EasyTool.CoreTests到EasyTool.UnitTests
li761747705 Apr 9, 2026
e0bce6a
docs: 更新CHANGELOG和README文档
li761747705 Apr 9, 2026
1242190
feat: 新增ChineseNumberUtil和RegionUtil工具类
li761747705 Apr 9, 2026
e24edf8
feat: 新增中文特色业务工具类
li761747705 Apr 9, 2026
62076f8
docs: 更新README文档,新增中文特色功能说明
li761747705 Apr 9, 2026
b41a0a2
chore(build): 更新 .gitignore 配置
li761747705 Apr 10, 2026
df4d451
chore(project): 删除项目模板和IDE配置文件
li761747705 Apr 10, 2026
2756180
feat: 新增多功能工具类、解决方案结构优化和中央包管理
li761747705 Apr 10, 2026
9353367
fix: 安全漏洞修复、性能优化与代码质量提升 (v1.3.0)
li761747705 Apr 10, 2026
f3464e4
feat: 文档全面重写、NuGet发布优化、测试覆盖大幅提升 (v1.4.0)
li761747705 Apr 10, 2026
375fef1
fix: 修复 ChannelUtilTests 编译错误
li761747705 Apr 10, 2026
7837af9
#
li761747705 Apr 10, 2026
347ed81
test: 代码清理与扩展模块测试覆盖大幅提升
li761747705 Apr 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
227 changes: 227 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# All files
[*]
charset = utf-8
end_of_line = crlf
trim_trailing_whitespace = true
insert_final_newline = true

# Code files
[*.cs]
indent_size = 4
indent_style = tab

#########################################
# .NET Code Style Settings
#########################################

# Organize usings
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion

# Use language keywords instead of framework type names
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
dotnet_style_readonly_field = true:suggestion

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion

# Null checking preferences
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion

#########################################
# C# Code Style Settings
#########################################

# var preferences
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = false:suggestion

# Expression-bodied members
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_operators = false:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:suggestion

# Pattern matching preferences
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion

# Inlined variable declarations
csharp_style_inlined_variable_declaration = true:suggestion

# Throw expression
csharp_style_throw_expression = true:suggestion

# Conditional delegate call
csharp_style_conditional_delegate_call = true:suggestion

# Index and range operators
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion

# Switch expression
csharp_style_prefer_switch_expression = true:suggestion

# Pattern matching for switch
csharp_style_prefer_pattern_matching_over_switch_expression = true:suggestion

# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true

# Indentation preferences
csharp_indent_case_contents = true
csharp_indent_switch_labels = true

# Space preferences
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_parentheses = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_after_comma = true
csharp_space_before_comma = false
csharp_space_after_dot = false
csharp_space_before_dot = false
csharp_space_after_semicolon_in_for_statement = true
csharp_space_before_semicolon_in_for_statement = false

# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true

# Naming Conventions

# Public members should be PascalCase
dotnet_naming_rule.public_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.public_members_should_be_pascal_case.symbols = public_symbols
dotnet_naming_rule.public_members_should_be_pascal_case.style = pascal_case_style

dotnet_naming_symbols.public_symbols.applicable_kinds = method, property, event, delegate
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public

dotnet_naming_style.pascal_case_style.capitalization = pascal_case

# Private fields should be _camelCase
dotnet_naming_rule.private_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.private_fields_should_be_camel_case.symbols = private_fields
dotnet_naming_rule.private_fields_should_be_camel_case.style = camel_case_style

dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_style.camel_case_style.required_prefix = _
dotnet_naming_style.camel_case_style.capitalization = camel_case

# Constants should be PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = pascal_case_style

dotnet_naming_symbols.constants.applicable_kinds = field
dotnet_naming_symbols.constants.required_modifiers = const

# Static readonly fields should be PascalCase
dotnet_naming_rule.static_readonly_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.static_readonly_should_be_pascal_case.symbols = static_readonly
dotnet_naming_rule.static_readonly_should_be_pascal_case.style = pascal_case_style

dotnet_naming_symbols.static_readonly.applicable_kinds = field
dotnet_naming_symbols.static_readonly.required_modifiers = static, readonly

# Interfaces should be IPascalCase
dotnet_naming_rule.interface_should_be_prefixed_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_prefixed_with_i.symbols = interface_symbols
dotnet_naming_rule.interface_should_be_prefixed_with_i.style = begins_with_i

dotnet_naming_symbols.interface_symbols.applicable_kinds = interface
dotnet_naming_symbols.interface_symbols.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.capitalization = pascal_case

# Local variables and parameters should be camelCase
dotnet_naming_rule.local_variables_should_be_camel_case.severity = suggestion
dotnet_naming_rule.local_variables_should_be_camel_case.symbols = local_variables
dotnet_naming_rule.local_variables_should_be_camel_case.style = local_camel_case_style

dotnet_naming_symbols.local_variables.applicable_kinds = local, parameter

dotnet_naming_style.local_camel_case_style.capitalization = camel_case

# Code style defaults
csharp_using_directive_placement = outside_namespace:suggestion
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

# Expression-level preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_default_expression = true:suggestion
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_null_check_over_type_check = true:suggestion

# JSON files
[*.json]
indent_size = 2
indent_style = space

# XML project files
[*.{csproj,proj,projitems,shproj}]
indent_size = 2
indent_style = space

# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
indent_style = space

# YAML files
[*.{yml,yaml}]
indent_size = 2
indent_style = space

# Markdown files
[*.md]
trim_trailing_whitespace = false

# Web files
[*.{js,ts,tsx,css,scss,html}]
indent_size = 2
indent_style = space
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Fixes # (issue)

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactoring (code improvement without changing functionality)
- [ ] Documentation update
- [ ] Test addition/update

## Checklist

- [ ] My code follows the project's style guidelines (`.editorconfig`)
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added XML documentation for all new public APIs
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have made corresponding changes to the documentation (if applicable)

## Additional Notes

Add any other notes or screenshots about the pull request here.
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
reviewers:
- "li761747705/easytool"
labels:
- "dependencies"
- "nuget"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "github-actions"
30 changes: 21 additions & 9 deletions .github/workflows/nuget_pre.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: nuget_pre

on:
push:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: |
8.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -26,9 +25,22 @@ jobs:
run: dotnet test --no-build --verbosity normal
- name: Package Nuget 📦
run: |
dotnet build -c Release "EasyTool.Core/EasyTool.Core.csproj"
SUFFIX=`date "+%y%m%d%H%M%S"`
dotnet pack "EasyTool.Core/EasyTool.Core.csproj" /p:PackageVersion=${{vars.VERSION}}-pre-${SUFFIX} -c Release -o publish --no-build --no-restore
PROJECTS=(
"EasyTool.Core/EasyTool.Core.csproj"
"EasyTool.Web/EasyTool.Web.csproj"
"EasyTool.Image/EasyTool.Image.csproj"
"EasyTool.Media/EasyTool.Media.csproj"
"EasyTool.AI/EasyTool.AI.csproj"
"EasyTool.System/EasyTool.System.csproj"
"EasyTool.NPOI/EasyTool.NPOI.csproj"
"EasyTool.EmitMapper/EasyTool.EmitMapper.csproj"
"EasyTool.All/EasyTool.All.csproj"
)
for proj in "${PROJECTS[@]}"; do
dotnet build -c Release "$proj"
dotnet pack "$proj" /p:PackageVersion=${{vars.VERSION}}-pre-${SUFFIX} -c Release -o publish --no-build --no-restore
done
- name: Publish to Nuget ✔
run: |
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
29 changes: 20 additions & 9 deletions .github/workflows/nuget_prod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: nuget_prod

on:
Expand All @@ -13,11 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: |
8.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -26,9 +25,21 @@ jobs:
run: dotnet test --no-build --verbosity normal
- name: Package Nuget 📦
run: |
dotnet build -c Release "EasyTool.Core/EasyTool.Core.csproj"
SUFFIX=`date "+%y%m%d%H%M%S"`
dotnet pack "EasyTool.Core/EasyTool.Core.csproj" /p:PackageVersion=${{vars.VERSION}} -c Release -o publish --no-build --no-restore
PROJECTS=(
"EasyTool.Core/EasyTool.Core.csproj"
"EasyTool.Web/EasyTool.Web.csproj"
"EasyTool.Image/EasyTool.Image.csproj"
"EasyTool.Media/EasyTool.Media.csproj"
"EasyTool.AI/EasyTool.AI.csproj"
"EasyTool.System/EasyTool.System.csproj"
"EasyTool.NPOI/EasyTool.NPOI.csproj"
"EasyTool.EmitMapper/EasyTool.EmitMapper.csproj"
"EasyTool.All/EasyTool.All.csproj"
)
for proj in "${PROJECTS[@]}"; do
dotnet build -c Release "$proj"
dotnet pack "$proj" /p:PackageVersion=${{vars.VERSION}} -c Release -o publish --no-build --no-restore
done
- name: Publish to Nuget ✔
run: |
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
Loading