CommonLib.12.23.24.001.Init
1.0.2
dotnet add package CommonLib.12.23.24.001.Init --version 1.0.2
NuGet\Install-Package CommonLib.12.23.24.001.Init -Version 1.0.2
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="CommonLib.12.23.24.001.Init" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CommonLib.12.23.24.001.Init --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CommonLib.12.23.24.001.Init, 1.0.2"
#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 CommonLib.12.23.24.001.Init as a Cake Addin #addin nuget:?package=CommonLib.12.23.24.001.Init&version=1.0.2 // Install CommonLib.12.23.24.001.Init as a Cake Tool #tool nuget:?package=CommonLib.12.23.24.001.Init&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CommonLibrary
CommonLibrary 是一個基於 .NET 8.0 的通用程式庫,提供多種實用功能和擴展方法。
專案結構
CommonLibrary/
├── AppException.cs
├── CollectionExtension.cs
├── CommonLibrary.csproj
├── CommonLibrary.sln
├── config/
│ └── logsettings.json
├── Iterator/
│ ├── BatchIterator.cs
│ ├── BatchIteratorFactory.cs
│ └── IBatchIterator.cs
├── JsonExtension.cs
├── JsonExtensions.cs
├── LogExt/
│ ├── FileLogger.cs
│ ├── FileLoggerExtensions.cs
│ └── FileLoggerProvider.cs
├── Models/
├── PostgresGenerator.cs
└── SharedConfigs.cs
依賴項目
此專案使用以下 NuGet 套件:
Microsoft.Extensions.Configuration (8.0.0)
Microsoft.Extensions.Configuration.Binder (8.0.2)
Microsoft.Extensions.Configuration.Json (8.0.0)
Microsoft.Extensions.DependencyInjection (8.0.0)
Microsoft.Extensions.Hosting (8.0.0)
Microsoft.Extensions.Logging.Abstractions (8.0.0)
Microsoft.Extensions.Options (8.0.2)
Newtonsoft.Json (13.0.3)
System.Text.Json (8.0.5)
LokiLoggingProvider (1.0.0)
功能
核心功能模組
AppException.cs
自定義應用程式異常類別,用於處理應用程式中的特定錯誤。
CollectionExtension.cs
提供集合操作的擴展方法,例如批次處理等。
JsonExtension.cs
提供將物件序列化為 JSON 字串的擴展方法。
JsonExtensions.cs
提供使用 System.Text.Json 進行 JSON 序列化和反序列化的擴展方法。
日誌系統
FileLogger.cs
自定義文件日誌記錄器,實現了 ILogger 介面,用於將日誌寫入文件。
FileLoggerExtensions.cs
提供擴展方法以便輕鬆配置和使用 FileLogger。
FileLoggerProvider.cs
提供 FileLogger 的實例,實現了 ILoggerProvider 介面。
批次處理模組
BatchIterator.cs
實現批次迭代器,用於分批處理集合中的元素。
BatchIteratorFactory.cs
提供工廠方法來創建 BatchIterator 的實例。
IBatchIterator.cs
定義批次迭代器的介面,規範批次處理的行為。
資料庫支援
PostgresGenerator.cs
提供生成 PostgreSQL 查詢的功能。
配置管理
SharedConfigs.cs
包含應用程式的共享配置設置。
配置
專案包含一個日誌配置文件:
config/logsettings.json
建置與運行
建置專案
dotnet build
運行單元測試
dotnet test
貢獻
歡迎提交問題和合併請求。請確保在提交之前運行所有測試並遵循代碼風格指南。
授權
此專案使用 MIT 授權。詳情請參閱 LICENSE
文件。
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- LokiLoggingProvider (>= 1.0.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.