Roc 0.7.1
dotnet add package Roc --version 0.7.1
NuGet\Install-Package Roc -Version 0.7.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="Roc" Version="0.7.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Roc" Version="0.7.1" />
<PackageReference Include="Roc" />
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 Roc --version 0.7.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Roc, 0.7.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 Roc@0.7.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=Roc&version=0.7.1
#tool nuget:?package=Roc&version=0.7.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
[TOC]
Roc框架
关于项目
用于快速搭建.net 项目
功能支持
.net web api 的迅速搭建,常用工具类集合
更新内容
一
添加S7通讯协议中字符串的加码和解码
快速入门
一 .net web api
> sqlsugar 注入添加新的注入方式,采用工厂注入
// Program.cs
// 注入sqlsugar 服务
builder.Services.AddRocMultiSqlsugar(configuration)
// services
/// <summary>
/// 仓储字段
/// </summary>
private readonly ISqlSugarClient dbClient;
public XxxxService(IDbContextFactory dbContextFactory)
{
dbClient = dbContextFactory.GetDbContext("single");
}
// application.json
"SqlSugarDB": [
{
"ConnId": "single",
"ConnString": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"DbType": "SqlServer"
},
{
"ConnId": "authDb",
"ConnString": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"DbType": "SqlServer"
}
]
二 .黑窗口控制台应用
> 控制台应用 wpf中加载配置文件
// 初始化配置文件模块
RocSupportConfig.Init(PathUtil.GetAbsolutePath("appsettings.json"));
// 从配置文件取值
string dbCon = RocSupportConfig.GetConfigByKey("str")
// 从配置文件取值字符串数组
List<string> list = RocSupportConfig.GetConfigArrByKey("arr")
// 从配置文件取值对象数组
List<Config> wmsArr = RocSupportConfig.GetConfigEntityArrByKey<Config>("configArr");
| 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
- AutoMapper (>= 13.0.1)
- Newtonsoft.Json (>= 13.0.3)
- NLog.Web.AspNetCore (>= 5.4.0)
- NPOI (>= 2.7.0)
- Quartz (>= 3.8.1)
- Serilog (>= 4.2.0)
- Serilog.Extensions.Hosting (>= 9.0.0)
- Serilog.Extensions.Logging (>= 9.0.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 6.0.0)
- SqlSugarCore (>= 5.1.4.148)
- Swashbuckle.AspNetCore (>= 6.5.0)
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 |
|---|---|---|
| 0.7.1 | 264 | 4/3/2025 |
| 0.7.0 | 209 | 3/28/2025 |
| 0.6.8 | 232 | 3/19/2025 |
| 0.6.7 | 194 | 2/6/2025 |
| 0.6.5 | 197 | 8/30/2024 |
| 0.6.4 | 220 | 7/2/2024 |
| 0.6.2 | 195 | 6/3/2024 |
| 0.6.1 | 189 | 5/30/2024 |
| 0.6.0 | 209 | 5/29/2024 |
| 0.5.9 | 214 | 5/23/2024 |
| 0.5.8 | 218 | 5/23/2024 |
| 0.5.7 | 215 | 5/17/2024 |
| 0.5.6 | 203 | 5/15/2024 |
| 0.5.5 | 188 | 5/15/2024 |
| 0.5.3 | 221 | 5/13/2024 |
| 0.5.2 | 180 | 5/10/2024 |
| 0.5.1 | 200 | 5/8/2024 |
Loading failed