![]() |
VOOZH | about |
dotnet add package NetPro.Core --version 6.0.7
NuGet\Install-Package NetPro.Core -Version 6.0.7
<PackageReference Include="NetPro.Core" Version="6.0.7" />
<PackageVersion Include="NetPro.Core" Version="6.0.7" />Directory.Packages.props
<PackageReference Include="NetPro.Core" />Project file
paket add NetPro.Core --version 6.0.7
#r "nuget: NetPro.Core, 6.0.7"
#:package NetPro.Core@6.0.7
#addin nuget:?package=NetPro.Core&version=6.0.7Install as a Cake Addin
#tool nuget:?package=NetPro.Core&version=6.0.7Install as a Cake Tool
框架的基础支撑,主要包含依赖注入,startup生命周期管理等核心逻辑
基础配置
"NetProOption": {
"UseResponseCompression": false,//是否启用响应压缩
"RequestWarningThreshold": 5, //请求时长的警告临界值
"RoutePrefix":"api" //全局路由前缀
},
EngineContext.Current.Resolve<对象类型>();
除了使用官方原生依赖注入外,支持通过接口和正则模式注入
接口方式注入
1、ITransientDependency
2、ISingletonDependency
3、IScopedDependency
正则批量注入
services.BatchInjection("^XXX.", "Service$"); //批量注入以XXX前缀的程序集,Service结尾的类
Program.cs
Environment.SetEnvironmentVariable("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "NetPro.Startup");
var host = Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((hostingContext, config) =>
{
ApolloClientHelper.ApolloConfig(hostingContext, config, args);
//Serilog.Log.Logger = new Serilog.LoggerConfiguration()
// .ReadFrom.Configuration(config.Build())
// .CreateLogger(); //根据需要安装Serilog,并打开注释;相关serilog nuget包已在程序入口所在cspro工程文件中
})
.ConfigureWebHostDefaults(webBuilder =>
{
//webBuilder.UseSerilog();
webBuilder.ConfigureKestrel(options =>
{
//options.Limits.MaxRequestBodySize = null;// 消除异常 Unexpected end of request content.
});
});
host.Build().Run();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.1 netcoreapp3.1 is compatible. |
Showing the top 3 NuGet packages that depend on NetPro.Core:
| Package | Downloads |
|---|---|
|
NetPro.Web.Core
Package Description |
|
|
NetPro.Analysicn
Package Description |
|
|
NetPro.Taos
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.7 | 4,114 | 5/18/2022 |
| 6.0.6 | 3,702 | 4/28/2022 |
| 6.0.5 | 3,687 | 3/30/2022 |
| 6.0.5-beta.20 | 282 | 4/27/2022 |
| 6.0.5-beta.19 | 283 | 4/25/2022 |
| 6.0.5-beta.18 | 288 | 4/22/2022 |
| 6.0.5-beta.17 | 299 | 4/16/2022 |
| 6.0.5-beta.16 | 1,258 | 4/8/2022 |
| 6.0.5-beta.15 | 286 | 4/8/2022 |
| 6.0.5-beta.14 | 302 | 4/7/2022 |
| 6.0.5-beta.13 | 303 | 4/7/2022 |
| 6.0.5-beta.12 | 293 | 4/6/2022 |
| 6.0.5-beta.11 | 320 | 4/6/2022 |
| 6.0.5-beta.10 | 300 | 3/31/2022 |
| 6.0.5-beta.9 | 359 | 3/26/2022 |
| 6.0.5-beta.8 | 324 | 3/22/2022 |
| 6.0.5-beta.7 | 300 | 3/21/2022 |
| 6.0.5-beta.6 | 311 | 3/14/2022 |
| 6.0.5-beta.5 | 315 | 3/2/2022 |
| 6.0.5-beta.4 | 320 | 2/22/2022 |