GeneralCommon 1.1.0
dotnet add package GeneralCommon --version 1.1.0
NuGet\Install-Package GeneralCommon -Version 1.1.0
<PackageReference Include="GeneralCommon" Version="1.1.0" />
paket add GeneralCommon --version 1.1.0
#r "nuget: GeneralCommon, 1.1.0"
// Install GeneralCommon as a Cake Addin #addin nuget:?package=GeneralCommon&version=1.1.0 // Install GeneralCommon as a Cake Tool #tool nuget:?package=GeneralCommon&version=1.1.0
1、包含SignalR客户端
2、包含一些扩展方法
3、包含Http,使用如下
public BaseApiService(IHttpClientFactory httpClientFactory, IApiConfig apiConfig)
{
_clientFactory = httpClientFactory;
_apiConfig = apiConfig;
}
public HttpClient CreateHttpClient()
{
var client = _clientFactory.CreateClient();
if (!string.IsNullOrEmpty(_apiConfig.Token))
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + _apiConfig.Token);
client.BaseAddress = new Uri(_apiConfig.RemoteApiUrl);
return client;
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Mapster (>= 7.3.0)
- Microsoft.AspNetCore.SignalR.Client (>= 6.0.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.0)
- Microsoft.Extensions.Configuration.Json (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.Extensions.Http (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.2)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Net.Http.Json (>= 6.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on GeneralCommon:
Package | Downloads |
---|---|
LibrarysShared
SignalR客户端,SqlSugar,TinyMapper等封装 1.0.4:添加Grpc服务 1. ExcelService 2. GrpcChannelService 3. httpClientService 4. ModbusShareServcie |
|
GeneralService
1、添加windows服务 ShareService.AddWinService() 注意:必须集成TimerService或者实现IWindowService接口,必须实现ILogService 使用方式: IServiceProvider.RunWinService(new GeneralCommon.Models.WinService.ServiceInfo { Name = client?.Name, DisplayName = client?.Name, Description = client?.Description })); 2、添加Log4net ShareService.ConfigureLog4net(); LogService中获取Log: log = log4net.LogManager.GetLogger("loginfo"); logError = log4net.LogManager.GetLogger("logerror"); |
GitHub repositories
This package is not used by any popular GitHub repositories.