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" />
                    
Directory.Packages.props
<PackageReference Include="Roc" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Roc&version=0.7.1
                    
Install as a Cake Tool

[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 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.

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