XT.Common 1.2.3

dotnet add package XT.Common --version 1.2.3
                    
NuGet\Install-Package XT.Common -Version 1.2.3
                    
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="XT.Common" Version="1.2.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XT.Common" Version="1.2.3" />
                    
Directory.Packages.props
<PackageReference Include="XT.Common" />
                    
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 XT.Common --version 1.2.3
                    
#r "nuget: XT.Common, 1.2.3"
                    
#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 XT.Common@1.2.3
                    
#: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=XT.Common&version=1.2.3
                    
Install as a Cake Addin
#tool nuget:?package=XT.Common&version=1.2.3
                    
Install as a Cake Tool

XT.Common

1、介绍

通用程序集,只能添加通用的方法,不要引入第三方pack。

 // nuget删除包
 dotnet nuget delete XT.Common 1.0.7 -k oy2ox -s https://api.nuget.org/v3/index.json

 // nuget推送包
dotnet nuget push XT.Common.1.0.7.nupkg -k oy2oxt -s https://api.nuget.org/v3/index.json

2、功能

2.1、AppSettings配置

  • new()初始化,GetObjData<T>()获取对象配置

2.2、特性

  • Page,页面特性,Blazor自动生成页面菜单,用法 用法:Page("/ecs/floor1", "一楼", "mdi-home-floor-1", true)
  • Order,排序特性,用于属性排序

2.3、雪花id生成器

  • 初始化 new IdHelperBootstrapper().SetWorkderId(1).Boot();
  • IdHelper.getId()

2.4、Utils工具

  • ComputerUtil 获取计算机内存cpu等信息。
  • DateTimeUtil 获取星期几等

2.5、Serivce辅助

  • ApiConfigService 使用要求: AddOriginHttpClient注册http服务
  • TimerService 封装定时器

2.6、枚举

  • Sql 分类

2.7、Extension扩展方法

  • Action 封装try catch,Get|Post HttpData,AddServiceInjects注入服务。
  • Byte byte[] 转 ushort[],SetBit设置某个偏移位置的BIT值
  • Enumerable 集合操作
  • Enum 枚举操作
  • Sql sql模板替换
  • Type 反射
  • Xml xml操作
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 (10)

Showing the top 5 NuGet packages that depend on XT.Common:

Package Downloads
TZ.ViewDataServices

Package Description

XT.Sql

1、使用前需要添加配置,配置对象为 XTDbConfig (支持多库切换) 2、使用时要初始化 , Services.AddSingleton(new AppSettings(builder.Environment.IsDevelopment())); Services.AddXTDbSetup(); 3、使用方式 - 注入XTDbContext,通过SimpleClient来进行操作 - 继承ISugarHandler public interface IPatCellRepository: ISugarHandler<PatCell>, IDependencyRepository { } - 继承SugarHandler public class PatCellRepository : SugarHandler<PatCell>, IPatCellRepository { public PatCellRepository(IUnitOfWork unitOfWork) : base(unitOfWork) { } } 4、数据库连接串 Oracle: DATA SOURCE=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=21)))(CONNECT_DATA=(SERVICE_NAME=XX)));USER ID=XX;Password=XX PostgreSql: Host=192.168.0.1 Port=20; Database=XX; Username=XX; Password=XX; Sqlite DataSource=./test.db

IotContract

Package Description

XT.ViewDataServices

Package Description

EVE.ECS_Model

Model for System

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.3 136 8/11/2025
1.2.2 107 7/30/2025
1.2.1 155 7/16/2025
1.2.0 147 7/15/2025
1.1.9 153 7/15/2025
1.1.8 153 7/3/2025
1.1.7 270 5/14/2025
1.1.6 514 4/15/2024
1.1.5 167 3/8/2024
1.1.4 445 12/19/2023
1.1.3 168 12/19/2023
1.1.2 361 12/19/2023
1.1.1 213 11/28/2023
1.1.0 346 11/21/2023