BAIZE.Framework.Core
2.0.1
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 BAIZE.Framework.Core --version 2.0.1
NuGet\Install-Package BAIZE.Framework.Core -Version 2.0.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="BAIZE.Framework.Core" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BAIZE.Framework.Core" Version="2.0.1" />
<PackageReference Include="BAIZE.Framework.Core" />
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 BAIZE.Framework.Core --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BAIZE.Framework.Core, 2.0.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.
#:package BAIZE.Framework.Core@2.0.1
#: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=BAIZE.Framework.Core&version=2.0.1
#tool nuget:?package=BAIZE.Framework.Core&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BAIZE.Framework.Core
项目介绍
BAIZE.Framework.Core 是一套封装了项目常用组件的类库,适用于中小型企业的NetCore项目。
项目功能
- SqlSugar 集成数据库访问组件
- Serilog 集成日志组件
- Redis 集成缓存组件
- RabbitMQ 集成消息队列组件
- MQTT 集成MQTT组件
后续内容
- 持续开发中
配置appsetting.json
"Database": {
// DbType取值范围:[ "MySql", "SqlServer", "Sqlite", "Oracle", "PostgreSql"]
"ConfigId": 0,
"DataBaseType": "xxxx",
"ConnectionString": "xxxx",
"IsAutoCloseConnection": true
},
"MqttClient": {
"Server": "xxx.xxx.xxx.xxx",
"Port": xxxx,
"ClientId": "xxxx",
"Username": "xxxx",
"Password": "xxxx",
"UseTls": false,
"KeepAliveInterval": 15,
"ReconnectDelay": 5,
"CleanSession": true,
"ConnectionTimeout": 10,
"MaxPendingMessages": 100,
"QosLevel": 1,
"AutoReconnect": true
},
"Redis": {
"Server": "xxx.xxx.xxx.xxx",
"Port": xxxx,
"Password": "xxxx",
"Database": 1
},
"RabbitMQ": {
"HostName": "xxx.xxx.xxx.xxx",
"Port": xxxx,
"VirtualHost": "x",
"UserName": "xxxx",
"Password": "xxxx",
"ClientProvidedName": "Broker",
"RequestedHeartbeat": 60,
"AutomaticRecoveryEnabled": true,
"NetworkRecoveryInterval": "00:00:10",
"ContinuationTimeout": "00:00:20",
"HandshakeContinuationTimeout": "00:00:10",
"DefaultQueue": "default.queue",
"DefaultExchange": "default.exchange",
"DefaultRoutingKey": "default.routing.key",
"DurableQueue": true,
"ExclusiveQueue": false,
"AutoDeleteQueue": false,
"AutoAcknowledge": false,
"PrefetchCount": 10,
"ConnectionPoolSize": 5,
"MaxChannelPerConnection": 50,
"MaxRetryCount": 3,
"RetryDelay": "00:00:05",
"EnableMetrics": true,
"MetricsInterval": "00:05:00"
},
"Seq": {
"minimumLevel": "Information",
"application": "xxxxx",
"apiKey": "xxxx",
"serverUrl": "http://xxx.xxx:xxxx"
}
快速开始
// 添加Serilog
builder.Services.AddSerilogSetup(builder.Configuration);
// SqlSugar服务
builder.Services.AddSqlSugarSetup(builder.Configuration);
//注册RabbitMQ服务
builder.Services.AddRabbitMQSetup(builder.Configuration);
//注册MQTT服务
builder.Services.AddMqttClientSetup(builder.Configuration);
//注册Redis服务
builder.Services.AddRedisClientSetup(builder.Configuration);
- 数据库访问注入 ISqlSugarClient db
- 缓存注入 IRedisService redis
- 消息队列注入 IRabbitMQService rabbitMQ
- MQTT注入 IMqttClientService mqttClient
| 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. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- CSRedisCore (>= 3.8.806)
- MQTTnet (>= 4.3.7.1207)
- MQTTnet.AspNetCore (>= 4.3.7.1207)
- MQTTnet.Extensions.ManagedClient (>= 4.3.7.1207)
- RabbitMQ.Client (>= 6.8.1)
- Serilog.AspNetCore (>= 8.0.3)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Expressions (>= 5.0.0)
- Serilog.Sinks.Async (>= 2.1.0)
- Serilog.Sinks.Seq (>= 8.0.0)
- SqlSugarCore (>= 5.1.4.202)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.