From ab33eed8d37672e3acadb69c217685ad459a1a5b Mon Sep 17 00:00:00 2001
From: Diego <2248356998@qq.com>
Date: Fri, 6 Jun 2025 21:13:58 +0800
Subject: [PATCH] 10.7.22
---
src/.editorconfig | 33 +-
.../IgnoreRolePermissionAttribute.cs | 4 +-
.../Const/CacheConst.cs | 2 +-
.../Const/HubConst.cs | 2 +-
.../Const/ResourceConst.cs | 2 +-
.../Const/RoleConst.cs | 2 +-
.../Const/SqlSugarConst.cs | 2 +-
.../Filter/RequestAuditAttribute.cs | 12 +-
.../Filter/SuppressRequestAuditAttribute.cs | 12 +-
.../Gitee/AdminOAuthHandler.cs | 15 +-
.../Logging/LoggingConst.cs | 2 +-
.../Provider/BlazorAuthenticationHandler.cs | 4 +-
.../Services/Resource/SysResourceService.cs | 2 +-
.../ThingsGateway.Admin.Application.csproj | 2 +-
.../Util/ClearTokenUtil.cs | 2 +-
.../Util/NoticeUtil.cs | 2 +-
.../Util/OpenApiUtil.cs | 2 +-
.../Util/OrgUtil.cs | 2 +-
.../Util/PositionUtil.cs | 2 +-
.../Util/RoleUtil.cs | 2 +-
.../Util/UserUtil.cs | 2 +-
.../Util/VerificatInfoUtil.cs | 2 +-
.../Const/AdminOperConst.cs | 2 +-
.../Pages/User/SysUserAvatarEdit.razor.cs | 2 +-
.../UserCenter/UserInfoEditComponent.razor.cs | 2 +-
.../Util/ResourceUtil.cs | 2 +-
.../ThingsGateway.AdminServer/GlobalUsings.cs | 13 +-
.../Attributes/IgnoreExcelAttribute.cs | 0
.../Attributes/IgnoreSeedDataAttribute.cs | 0
.../Const/ClaimConst.cs | 2 +-
.../Entity/BaseEntity.cs | 0
.../Extensions/ExportExcelExtensions.cs | 0
.../Extensions/FileExtensions.cs | 0
.../Extensions/QueryPageOptionsExtensions.cs | 0
.../Extensions/SqlSugarExtensions.cs | 2 +-
src/Admin/ThingsGateway.DB/GlobalUsings.cs | 11 +
.../AppService/ClaimsPrincipalService.cs | 0
.../AppService/IClaimsPrincipalService.cs | 0
.../SugarAopService/ISugarAopService.cs | 0
.../SugarAopService/SugarAopService.cs | 0
.../Services/SugarService/BaseService.cs | 0
.../SqlSugar/CodeFirstUtils.cs | 0
.../SqlSugar/DbContext.cs | 0
.../SqlSugar/ISqlSugarEntitySeedData.cs | 0
.../SqlSugar/SeedDataUtil.cs | 2 +-
.../SqlSugar/SqlSugarOptions.cs | 0
.../Startup.cs | 0
.../Static/UserManager.cs | 0
.../ThingsGateway.DB/ThingsGateway.DB.csproj | 33 +
.../Util/CommonUtils.cs | 0
src/Admin/ThingsGateway.Furion/App/App.cs | 4 +-
.../App/Extensions/ObjectExtensions.cs | 4 +-
.../Binders/FromConvertBinderProvider.cs | 3 +-
.../Attributes/AppAuthorizeAttribute.cs | 2 +-
.../Attributes/DependsOnAttribute.cs | 4 +-
.../CorsAccessor/Internal/Penetrates.cs | 2 +-
.../Encryptions/AESEncryption.cs | 2 +-
.../Encryptions/DESEncryption.cs | 2 +-
.../Encryptions/KSortEncryption.cs | 2 +-
.../Encryptions/PBKDF2Encryption.cs | 2 +-
.../Encryptions/SHA1Encryption.cs | 2 +-
.../Attributes/DataValidationAttribute.cs | 1 +
...ncyInjectionServiceCollectionExtensions.cs | 2 +-
...ApiControllerApplicationModelConvention.cs | 3 +-
...piControllerServiceCollectionExtensions.cs | 2 +-
.../DynamicApiRuntimeChangeProvider.cs | 12 +-
.../Exceptions/AppFriendlyException.cs | 8 +
.../FriendlyException/Retry.cs | 2 +-
.../Monitors/LoggingMonitorAttribute.cs | 5 +-
.../Internal/StringLoggingPartSetters.cs | 2 +-
...ObjectMapperServiceCollectionExtensions.cs | 2 +-
.../Schedule/Builders/SchedulerBuilder.cs | 2 +-
.../Schedule/Extensions/ScheduleExtensions.cs | 2 +-
.../HostedServices/ScheduleHostedService.cs | 2 +-
.../Schedule/Http/HttpJob.cs | 2 +-
.../Builders/SpecificationDocumentBuilder.cs | 2 +-
.../ThingsGateway.Furion/Templates/TP.cs | 2 +-
.../TimeCrontab/Crontab.Internal.cs | 2 +-
.../UnifyResult/UnifyContext.cs | 4 +-
.../Core/Extensions/TypeExtensions.cs | 5 +-
.../Core/Extensions/V5_ObjectExtensions.cs | 4 +-
.../Builders/HttpRequestBuilder.Methods.cs | 2 +-
.../Shapeless/Clay/Clay.Events.cs | 2 +-
.../Shapeless/Clay/Clay.Exports.cs | 11 +-
.../Attributes/MinValueAttribute.cs | 2 +
.../Buffers/SpanReader.cs | 1 -
.../Caching/MemoryCache.cs | 6 +-
.../Collections/ObjectPool.cs | 2 +-
.../Common/FileUtil.cs | 2 +-
.../Common/MachineInfo.cs | 8 +-
.../ThingsGateway.NewLife.X/Common/PinYin.cs | 2 +-
.../ThingsGateway.NewLife.X/Common/Runtime.cs | 4 +-
.../Configuration/ConfigHelper.cs | 2 +-
.../Configuration/IConfigSection.cs | 2 +-
.../Configuration/IniConfigProvider.cs | 2 +-
.../Event/WeakAction.cs | 2 +-
.../Extension/DateExtensions.cs | 12 +-
.../Extension/EndPointExtensions.cs | 23 +-
.../Extension/ProcessHelper.cs | 8 +-
.../Extension/StringHelper.cs | 10 +-
.../ThingsGateway.NewLife.X/IO/ExcelReader.cs | 6 +-
.../ThingsGateway.NewLife.X/IO/FileSource.cs | 2 +-
.../ThingsGateway.NewLife.X/IO/IOHelper.cs | 6 +-
.../ThingsGateway.NewLife.X/IO/PathHelper.cs | 6 +-
.../ThingsGateway.NewLife.X/Logger/Logger.cs | 2 +-
.../Logger/TextFileLog.cs | 4 +-
.../Net/IDnsResolver.cs | 6 +-
.../ThingsGateway.NewLife.X/Net/NetHelper.cs | 18 +-
.../ThingsGateway.NewLife.X/Net/NetUri.cs | 2 +-
.../Net/TcpConnectionInformation2.cs | 4 +-
.../Reflection/AssemblyX.cs | 10 +-
.../Reflection/AttributeX.cs | 10 +-
.../Reflection/IReflect.cs | 6 +-
.../Reflection/Reflect.cs | 4 +-
.../Reflection/ScriptEngine.cs | 2 +-
.../ThingsGateway.NewLife.X/Security/Asn1.cs | 2 +-
.../Security/Certificate.cs | 4 +-
.../Security/DSAHelper.cs | 2 +-
.../Security/RSAHelper.cs | 2 +-
.../Security/SecurityHelper.cs | 8 +-
.../Serialization/Binary/Binary.cs | 4 +-
.../Serialization/DataMemberResolver.cs | 2 +-
.../Serialization/SerialHelper.cs | 4 +-
.../Serialization/Xml/Xml.cs | 4 +-
.../Stub/ScriptIgnoreAttribute.cs | 1 +
.../Threading/TimerScheduler.cs | 2 +-
.../Threading/TimerX.cs | 6 +-
src/Admin/ThingsGateway.NewLife.X/Web/Link.cs | 4 +-
.../Xml/SerializableDictionary.cs | 3 -
.../ThingsGateway.NewLife.X/Xml/XmlConfig.cs | 2 +-
.../ThingsGateway.NewLife.X/Xml/XmlHelper.cs | 4 +-
.../Common/RandomHelper.cs | 2 +-
.../ThingsGateway.Razor/Const/WebsiteConst.cs | 2 +-
.../Extensions/ObjectExtensions.cs | 7 +-
.../ThingsGateway.Razor/Util/LocalizerUtil.cs | 2 +-
src/Admin/ThingsGateway.SqlSugar/.txt | 3 +
.../QuestDb/CsvHelperEnumToIntConverter.cs | 31 +
.../QuestDb/QuestDbPageSizeBulkCopy.cs | 33 +
.../QuestDb/QuestDbRestAPHelper.cs | 56 +
.../QuestDb/QuestDbRestAPI.cs | 240 +
.../QuestDbSqlSugarClientExtensions.cs | 10 +
.../Abstract/AdoProvider/AdoAccessory.cs | 82 +
.../Sugar/Abstract/AdoProvider/AdoProvider.cs | 1836 ++++++++
.../Sugar/Abstract/AopProvider/AopProvider.cs | 27 +
.../Abstract/CacheProvider/CacheProvider.cs | 37 +
.../CodeFirstProvider/CodeFirstProvider.cs | 758 +++
.../SplitCodeFirstProvider.cs | 66 +
.../TableDifferenceProvider.cs | 176 +
.../DbBindProvider/DbBindAccessory.cs | 446 ++
.../Abstract/DbBindProvider/DbBindProvider.cs | 376 ++
.../IDataReaderEntityBuilder.cs | 511 +++
.../DbBindProvider/IDataRecordExtensions.cs | 399 ++
.../DbFirstProvider/DbFirstProvider.cs | 605 +++
.../DbFirstProvider/DbFirstTemplate.cs | 73 +
.../Sugar/Abstract/DbFirstProvider/DbRazor.cs | 93 +
.../Abstract/DbMaintenanceProvider/Methods.cs | 908 ++++
.../DbMaintenanceProvider/Properties.cs | 67 +
.../DeleteProvider/DeleteMethodInfo.cs | 61 +
.../DeleteProvider/DeleteNavMethodInfo.cs | 49 +
.../Abstract/DeleteProvider/DeleteablePage.cs | 81 +
.../DeleteProvider/DeleteableProvider.cs | 781 ++++
.../DeleteProvider/LogicDeleteProvider.cs | 162 +
.../SplitTableDeleteByObjectProvider.cs | 56 +
.../SplitTableDeleteProvider.cs | 93 +
.../DynamicBuilder/CommonMethodInfo.cs | 90 +
.../DynamicBuilder/DynamicBuilderHelper.cs | 77 +
.../DynamicBuilder/DynamicOneselfType.cs | 28 +
.../DynamicBuilder/DynamicProperyBuilder.cs | 129 +
.../Sugar/Abstract/DynamicBuilder/EmitTool.cs | 62 +
.../Sugar/Abstract/DynamicBuilder/Helper.cs | 115 +
.../Sugar/Abstract/DynamicBuilder/Master.cs | 70 +
.../EntityColumnExtension.cs | 63 +
.../EntityMaintenance/EntityMaintenance.cs | 483 ++
.../ExecuteNavProvider/DeleteNavManyToMany.cs | 81 +
.../ExecuteNavProvider/DeleteNavOneToMany.cs | 106 +
.../ExecuteNavProvider/DeleteNavOneToOne.cs | 33 +
.../ExecuteNavProvider/DeleteNavProvider.cs | 167 +
.../ExecuteNavProvider/DeleteNavTask.cs | 175 +
.../ExecuteNavProvider/InsertNavProvider.cs | 145 +
.../InsertNavProviderHelper.cs | 206 +
.../InsertNavProviderManyToMany.cs | 165 +
.../InsertNavProviderOneToMany.cs | 104 +
.../InsertNavProviderOneToOne.cs | 59 +
.../ExecuteNavProvider/InsertNavTask.cs | 249 +
.../Abstract/ExecuteNavProvider/NavContext.cs | 12 +
.../ExecuteNavProvider/UpdateNavManyToMany.cs | 194 +
.../ExecuteNavProvider/UpdateNavOneToMany.cs | 338 ++
.../ExecuteNavProvider/UpdateNavOneToOne.cs | 68 +
.../ExecuteNavProvider/UpdateNavProvider.cs | 230 +
.../UpdateNavProviderHelper.cs | 198 +
.../ExecuteNavProvider/UpdateNavTask.cs | 226 +
.../ExpressionableProvider/Expressionable.cs | 585 +++
.../Abstract/FastestProvider/FastBuilder.cs | 72 +
.../FastestProvider/FastestProvider.cs | 540 +++
.../Sugar/Abstract/FastestProvider/Private.cs | 350 ++
.../Sugar/Abstract/FastestProvider/Setting.cs | 54 +
.../Abstract/FastestProvider/SplitFastest.cs | 141 +
.../Abstract/FilterProvider/FilterProvider.cs | 146 +
.../Abstract/GridSave/GridSaveProvider.cs | 90 +
.../InsertableProvider/InsertMethodInfo.cs | 125 +
.../InsertableProvider/InsertNavMethodInfo.cs | 49 +
.../InsertableProvider/InsertableHelper.cs | 744 +++
.../InsertableProvider/InsertablePage.cs | 160 +
.../InsertableProvider/InsertableProvider.cs | 793 ++++
.../InsertableProvider/ParameterInsertable.cs | 209 +
.../InsertableProvider/SplitInsertable.cs | 245 +
.../InsertableProvider/SubInserable.cs | 323 ++
.../Entities/AppendNavInfoList.cs | 21 +
.../Entities/QueryableAppendColumn.cs | 10 +
.../Entities/QueryableFormat.cs | 14 +
.../QueryableProvider/Entities/SqlInfo.cs | 17 +
.../Entities/SubQueryToListDefaultT.cs | 8 +
.../Abstract/QueryableProvider/Includes.cs | 501 ++
.../Abstract/QueryableProvider/Includes.txt | 105 +
.../QueryableProvider/IncludesHelper.cs | 293 ++
.../QueryableProvider/MappingFieldsHelper.cs | 216 +
.../QueryableProvider/NavSelectHelper.cs | 352 ++
.../QueryableProvider/NavigatManager.cs | 1093 +++++
.../QueryableProvider/QueryMethodInfo.cs | 428 ++
.../QueryableProvider/QueryableAccessory.cs | 9 +
.../QueryableProvider/QueryableContext.cs | 10 +
.../QueryableProvider/QueryableExecuteSql.cs | 948 ++++
.../QueryableExecuteSqlAsync.cs | 785 ++++
.../QueryableProvider/QueryableHelper.cs | 2544 ++++++++++
.../QueryableProvider/QueryableProperties.cs | 21 +
.../QueryableProvider/QueryableProvider.cs | 1830 ++++++++
.../QueryableProvider02-05.cs | 3229 +++++++++++++
.../QueryableProvider06-10.cs | 4082 +++++++++++++++++
.../QueryableProvider11-12.cs | 1436 ++++++
.../Abstract/Reportable/ReportableProvider.cs | 285 ++
.../SaveableProvider/SaveableProvider.cs | 198 +
.../Abstract/SaveableProvider/Storageable.cs | 628 +++
.../SaveableProvider/StorageableDataTable.cs | 239 +
.../SaveableProvider/StorageableMethodInfo.cs | 157 +
.../SaveableProvider/StorageablePage.cs | 151 +
.../StorageableSplitProvider.cs | 205 +
.../SqlBuilderProvider/DeleteBuilder.cs | 181 +
.../Abstract/SqlBuilderProvider/Entities.cs | 14 +
.../SqlBuilderProvider/InsertBuilder.cs | 396 ++
.../SqlBuilderProvider/QueryBuilder.cs | 1183 +++++
.../SqlBuilderProvider/SqlBuilderAccessory.cs | 15 +
.../SqlBuilderProvider/SqlBuilderProvider.cs | 195 +
.../SqlBuilderProvider_Condition.cs | 457 ++
.../SqlBuilderProvider/SqlQueryBuilder.cs | 80 +
.../SqlBuilderProvider/UpdateBuilder.cs | 614 +++
.../SugarProvider/SqlSugarAccessory.cs | 683 +++
.../SugarProvider/SqlSugarCoreProvider.cs | 84 +
.../SugarProvider/SqlSugarProvider.cs | 1864 ++++++++
.../SugarProvider/SqlSugarScopeProvider.cs | 862 ++++
.../UpdateProvider/ParameterUpdateable.cs | 197 +
.../SplitTableUpdateByObjectProvider.cs | 164 +
.../SplitTableUpdateProvider.cs | 109 +
.../UpdateExpressionMethodInfo.cs | 61 +
.../UpdateProvider/UpdateMethodInfo.cs | 122 +
.../UpdateProvider/UpdateNavMethodInfo.cs | 49 +
.../UpdateProvider/UpdateableFilter.cs | 102 +
.../UpdateProvider/UpdateableHelper.cs | 889 ++++
.../Abstract/UpdateProvider/UpdateablePage.cs | 101 +
.../UpdateProvider/UpdateableProvider.cs | 1015 ++++
.../UpdateProvider/UpdateableProviderT2.cs | 57 +
.../UpdateProvider/UpdateableProviderT3.cs | 55 +
.../UpdateProvider/UpdateableProviderT4.cs | 44 +
.../Sugar/CacheScheme/CacheKeyBuider.cs | 73 +
.../Sugar/CacheScheme/CacheSchemeMain.cs | 61 +
.../Snowflake/DisposableAction.cs | 19 +
.../DistributedSystem/Snowflake/IdWorker.cs | 129 +
.../Snowflake/InvalidSystemClock.cs | 15 +
.../Snowflake/SnowFlakeSingle.cs | 39 +
.../Snowflake/TimeExtensions.cs | 38 +
.../Snowflake/ValueToStringConverter.cs | 20 +
.../Sugar/Entities/AsyncRef.cs | 16 +
.../Sugar/Entities/CacheKey.cs | 16 +
.../Sugar/Entities/ConditionalModel.cs | 38 +
.../Sugar/Entities/ConfigQuery.cs | 62 +
.../Sugar/Entities/ConnMoreSettings.cs | 37 +
.../Sugar/Entities/ConnectionConfig.cs | 155 +
.../Sugar/Entities/DbColumnInfo.cs | 31 +
.../Sugar/Entities/DbFastestProperties.cs | 13 +
.../Sugar/Entities/DbResult.cs | 10 +
.../Sugar/Entities/DbTableInfo.cs | 30 +
.../Sugar/Entities/DefaultCustom.cs | 107 +
.../Sugar/Entities/DefaultServices.cs | 9 +
.../Sugar/Entities/DeleteNavOptions.cs | 63 +
.../Sugar/Entities/DiffLogModel.cs | 26 +
.../Sugar/Entities/DiffType.cs | 9 +
.../Sugar/Entities/DiscriminatorObject .cs | 8 +
.../Sugar/Entities/DynamicSelectModel.cs | 183 +
.../Sugar/Entities/EntityColumnInfo.cs | 49 +
.../Sugar/Entities/EntityInfo.cs | 17 +
.../Sugar/Entities/JoinInfoParameter.cs | 10 +
.../Sugar/Entities/JoinMapper.cs | 8 +
.../Sugar/Entities/JoinQueryInfo.cs | 61 +
.../Sugar/Entities/ManyToManyConfig.cs | 10 +
.../Sugar/Entities/MapperCache.cs | 153 +
.../Sugar/Entities/Mapping/IgnoreComumn.cs | 8 +
.../Sugar/Entities/Mapping/MappingColumn.cs | 9 +
.../Sugar/Entities/Mapping/MappingTable.cs | 9 +
.../Entities/Mapping/SugarMappingAttribute.cs | 463 ++
.../Sugar/Entities/ModelContext.cs | 19 +
.../Sugar/Entities/NavigationInitializer.cs | 54 +
.../Sugar/Entities/PageModel.cs | 12 +
.../Sugar/Entities/PropertyMetadata.cs | 11 +
.../Sugar/Entities/QueueItem.cs | 8 +
.../Sugar/Entities/SchemaInfo.cs | 8 +
.../Sugar/Entities/SingleColumnsEntity.cs | 7 +
.../Sugar/Entities/SlaveConnectionConfig.cs | 12 +
.../Sugar/Entities/SqlFilter.cs | 53 +
.../Sugar/Entities/SqlSguarTransaction.cs | 47 +
.../Sugar/Entities/SqlWith.cs | 15 +
.../Sugar/Entities/StackTraceInfo.cs | 18 +
.../Sugar/Entities/SubInsertTree.cs | 16 +
.../Sugar/Entities/SugarAbMapping.cs | 8 +
.../Sugar/Entities/SugarConnection.cs | 17 +
.../Sugar/Entities/SugarDebugger.cs | 13 +
.../Sugar/Entities/SugarList.cs | 66 +
.../Sugar/Entities/SugarTerant.cs | 8 +
.../Sugar/Enum/ApplyType.cs | 8 +
.../Sugar/Enum/ConditionalType.cs | 23 +
.../Sugar/Enum/DataFilterType.cs | 64 +
.../Sugar/Enum/DbLockType.cs | 8 +
.../Sugar/Enum/DbObjectType.cs | 9 +
.../Sugar/Enum/DbType.cs | 40 +
.../Sugar/Enum/InitKeyType.cs | 10 +
.../Sugar/Enum/JoinType.cs | 11 +
.../Sugar/Enum/LanguageType.cs | 9 +
.../Sugar/Enum/NavigatType.cs | 11 +
.../Sugar/Enum/OrderByType.cs | 8 +
.../Sugar/Enum/ProperyType.cs | 27 +
.../Sugar/Enum/ReportableDateType.cs | 12 +
.../Sugar/Enum/SampleByUnit.cs | 14 +
.../Sugar/Enum/SugarActionType.cs | 11 +
.../Sugar/Enum/SugarDateTimeFormat.cs | 8 +
.../Sugar/Enum/WhereType.cs | 9 +
.../ExpressionsToSql/CaseWhen/CaseWhen.cs | 26 +
.../CaseWhen/CaseWhenResolve.cs | 89 +
.../Common/BinaryExpressionInfo.cs | 9 +
.../Common/CommonTempDataType.cs | 10 +
.../Sugar/ExpressionsToSql/Common/DateType.cs | 15 +
.../ExpressionsToSql/Common/ErrorMessage.cs | 51 +
.../Common/ExpResolveAccessory.cs | 8 +
.../Common/ExpressionConst.cs | 14 +
.../Common/ExpressionContextCase.cs | 7 +
.../Common/ExpressionItems.cs | 29 +
.../Common/ExpressionOutParameter.cs | 8 +
.../Common/ExpressionParameter.cs | 42 +
.../Common/ExpressionResult.cs | 191 +
.../Common/ExpressionResultAcceptType.cs | 8 +
.../ExpressionsToSql/Common/ExpressionTool.cs | 1100 +++++
.../Common/ListAnyParameter.cs | 10 +
.../Common/MapperExpression.cs | 21 +
.../ExpressionsToSql/Common/MapperSql.cs | 15 +
.../Common/MethodCallExpressionModel.cs | 23 +
.../Common/NewExpressionInfo.cs | 11 +
.../Common/ParameterExpressionVisitor.cs | 84 +
.../Common/ParameterReplacer.cs | 21 +
.../Common/ResolveExpressType.cs | 18 +
.../ExpressionsToSql/Common/SugarParameter.cs | 292 ++
.../DbMethods/DefaultDbMethod.cs | 1403 ++++++
.../ExpressionsToSql/DbMethods/IDbMethods.cs | 127 +
.../ExpressionsToSql/DbMethods/SqlFunc.cs | 459 ++
.../DbMethods/SqlFuncExtendsion.cs | 24 +
.../DbMethods/SqlFuncExternal.cs | 8 +
.../ExpressionsToSql/ExpressionContext.cs | 266 ++
.../ResolveItems/BaseResolve.cs | 97 +
.../ResolveItems/BaseResolve_Append.cs | 296 ++
.../ResolveItems/BaseResolve_Helper.cs | 207 +
.../ResolveItems/BaseResolve_Item.cs | 471 ++
.../ResolveItems/BaseResolve_NewExp.cs | 110 +
.../ResolveItems/BaseResolve_Property.cs | 109 +
.../ResolveItems/BaseResolve_Validate.cs | 114 +
.../ResolveItems/BinaryExpressionResolve.cs | 407 ++
.../ResolveItems/BlockExpressionResolve.cs | 10 +
.../ResolveItems/CoalesceResolveItems.cs | 39 +
.../ConditionalExpressionResolve.cs | 93 +
.../ResolveItems/ConstantExpressionResolve.cs | 166 +
.../ResolveItems/LambdaExpressionResolve.cs | 18 +
.../ResolveItems/MapperExpressionResolve.cs | 325 ++
.../MemberConstExpressionResolve.cs | 69 +
.../ResolveItems/MemberExpressionResolve.cs | 869 ++++
.../MemberInitExpressionResolve.cs | 385 ++
.../MemberNewExpressionResolve.cs | 14 +
.../ResolveItems/MemberNoExpressionResolve.cs | 61 +
.../MethodCallExpressionResolve.cs | 339 ++
...thodCallExpressionResolve_BaseDateFomat.cs | 284 ++
.../MethodCallExpressionResolve_Helper.cs | 1207 +++++
.../ResolveItems/NewArrayExpessionResolve.cs | 112 +
.../ResolveItems/NewExpressionResolve.cs | 174 +
.../OneToManyNavgateExpression.cs | 337 ++
.../OneToManyNavgateExpressionN.cs | 311 ++
.../ResolveItems/OneToOneNavgateExpression.cs | 203 +
.../OneToOneNavgateExpressionN.cs | 187 +
.../TypeParameterExpressionReolve.cs | 48 +
.../ResolveItems/UnaryExpressionResolve.cs | 190 +
.../Subquery/Items/ISubOperation.cs | 14 +
.../ExpressionsToSql/Subquery/Items/SubAnd.cs | 112 +
.../Subquery/Items/SubAndIF.cs | 74 +
.../ExpressionsToSql/Subquery/Items/SubAny.cs | 43 +
.../ExpressionsToSql/Subquery/Items/SubAs.cs | 52 +
.../Subquery/Items/SubAsWithAttr.cs | 51 +
.../ExpressionsToSql/Subquery/Items/SubAvg.cs | 45 +
.../Subquery/Items/SubBegin.cs | 43 +
.../Subquery/Items/SubCount.cs | 44 +
.../Subquery/Items/SubDistinctCount.cs | 77 +
.../Subquery/Items/SubEnableTableFilter.cs | 72 +
.../Subquery/Items/SubFirst.cs | 195 +
.../Subquery/Items/SubFromTable.cs | 58 +
.../Subquery/Items/SubGroupBy.cs | 76 +
.../Subquery/Items/SubHaving.cs | 46 +
.../Subquery/Items/SubInnerJoin.cs | 75 +
.../Subquery/Items/SubLeftBracket.cs | 43 +
.../Subquery/Items/SubLeftJoin.cs | 75 +
.../ExpressionsToSql/Subquery/Items/SubMax.cs | 64 +
.../ExpressionsToSql/Subquery/Items/SubMin.cs | 64 +
.../Subquery/Items/SubNotAny.cs | 43 +
.../Subquery/Items/SubOrderBy.cs | 113 +
.../Subquery/Items/SubRightBracket.cs | 43 +
.../Subquery/Items/SubSelect.cs | 92 +
.../Subquery/Items/SubSelectDefault.cs | 43 +
.../Subquery/Items/SubSelectStringJoin.cs | 104 +
.../ExpressionsToSql/Subquery/Items/SubSum.cs | 64 +
.../Subquery/Items/SubTake.cs | 89 +
.../Subquery/Items/SubToList.cs | 210 +
.../ExpressionsToSql/Subquery/Items/SubTop.cs | 75 +
.../Subquery/Items/SubWhere.cs | 128 +
.../Subquery/Items/SubWhereIF.cs | 81 +
.../Subquery/Items/SubWithNoLock.cs | 50 +
.../ExpressionsToSql/Subquery/SubResolve.cs | 326 ++
.../ExpressionsToSql/Subquery/SubTemplate.cs | 40 +
.../ExpressionsToSql/Subquery/SubTools.cs | 91 +
.../ExpressionsToSql/Subquery/Subquerable.cs | 229 +
.../Subquery/SubqueryableN.cs | 695 +++
.../ExternalServiceInterface/ICacheService.cs | 13 +
.../ExternalServiceInterface/IRazorService.cs | 7 +
.../ISerializeService.cs | 9 +
.../ISplitTableService.cs | 11 +
.../Sugar/Infrastructure/ContextMethods.cs | 1282 ++++++
.../Infrastructure/DependencyManagement.cs | 166 +
.../Sugar/Infrastructure/InstanceFactory.cs | 823 ++++
.../Sugar/Infrastructure/Mapper.cs | 73 +
.../Sugar/Infrastructure/StaticConfig.cs | 38 +
.../Sugar/IntegrationServices/CacheService.cs | 139 +
.../IntegrationServices/SerializeService.cs | 105 +
.../IntegrationServices/SplitTableService.cs | 274 ++
.../Sugar/Interface/IAdo.cs | 198 +
.../Sugar/Interface/ICodeFirst.cs | 26 +
.../Sugar/Interface/IContextMethods.cs | 51 +
.../Sugar/Interface/ICustomConditionalFunc.cs | 7 +
.../Sugar/Interface/IDMLBuilder.cs | 14 +
.../Sugar/Interface/IDbBind.cs | 28 +
.../Sugar/Interface/IDbFirst.cs | 29 +
.../Sugar/Interface/IDbMaintenance.cs | 113 +
.../Sugar/Interface/IDeleteable.cs | 52 +
.../Sugar/Interface/IFastBuilder.cs | 18 +
.../Sugar/Interface/IFastest.cs | 45 +
.../Sugar/Interface/IFilter.cs | 9 +
.../Sugar/Interface/IIncludes.cs | 286 ++
.../Sugar/Interface/IIncludes.txt | 106 +
.../Sugar/Interface/ILambdaExpressions.cs | 33 +
.../Sugar/Interface/IParameterInsertable.cs | 8 +
.../Sugar/Interface/IQueryable.cs | 1970 ++++++++
.../Sugar/Interface/IReportable.cs | 10 +
.../Sugar/Interface/ISaveable.cs | 22 +
.../Sugar/Interface/ISimpleClient.cs | 142 +
.../Sugar/Interface/ISqlBuilder.cs | 49 +
.../Sugar/Interface/ISqlSugarClient.cs | 245 +
.../Sugar/Interface/IStorageable.cs | 191 +
.../Sugar/Interface/ISubInsertable.cs | 14 +
.../Sugar/Interface/ISugarDataConverter.cs | 11 +
.../Sugar/Interface/ISugarRepository.cs | 7 +
.../Sugar/Interface/ITenant.cs | 46 +
.../Sugar/Interface/IUpdateable.cs | 136 +
.../Sugar/Interface/Insertable.cs | 67 +
.../Json2Sql/DynamicLinq/DynamicCoreHelper.cs | 171 +
.../Json2Sql/DynamicLinq/DynamicParameters.cs | 50 +
.../SqlSugarDynamicExpressionParser.cs | 53 +
.../Json2Sql/Entities/JsonDeleteResult.cs | 7 +
.../Json2Sql/Entities/JsonInsertResult.cs | 8 +
.../Json2Sql/Entities/JsonQueryResult.cs | 9 +
.../Json2Sql/Entities/JsonTableConfig.cs | 23 +
.../Json2Sql/Entities/JsonUpdateResult.cs | 7 +
.../Sugar/Json2Sql/Enums/AsNameFormatType.cs | 8 +
.../Sugar/Json2Sql/Enums/Json2SqlType.cs | 12 +
.../Sugar/Json2Sql/Interface/IFuncModel.cs | 6 +
.../Sugar/Json2Sql/Interface/IJsonClient.cs | 13 +
.../Interface/IJsonDeleteableProvider.cs | 7 +
.../Interface/IJsonInsertableProvider.cs | 7 +
.../Sugar/Json2Sql/Interface/IJsonProvider.cs | 11 +
.../Interface/IJsonQueryableProvider.cs | 9 +
.../Sugar/Json2Sql/Interface/IJsonToModel.cs | 15 +
.../Interface/IJsonUpdateableProvider.cs | 7 +
.../Sugar/Json2Sql/Interface/IModelToSql.cs | 14 +
.../Json2Sql/Interface/ISugarQueryable.cs | 16 +
.../Sugar/Json2Sql/JsonModels/FuncModel.cs | 18 +
.../Sugar/Json2Sql/JsonModels/GroupByModel.cs | 11 +
.../Sugar/Json2Sql/JsonModels/JoinModel.cs | 11 +
.../Json2Sql/JsonModels/JsonQueryParameter.cs | 13 +
.../Json2Sql/JsonModels/JsonSqlModels.cs | 18 +
.../Json2Sql/JsonModels/JsonTableNameInfo.cs | 9 +
.../Sugar/Json2Sql/JsonModels/OrderByModel.cs | 12 +
.../Json2Sql/JsonModels/SelectFieldModel.cs | 17 +
.../Sugar/Json2Sql/JsonToModel/Helper.cs | 43 +
.../JsonToModel/JsonSqlFuncToModel.cs | 84 +
.../JsonToModel/JsonSqlFuncToParameters.cs | 62 +
.../JsonToModel/JsonToColumnsModels.cs | 57 +
.../JsonToModel/JsonToGroupByModels.cs | 27 +
.../Json2Sql/JsonToModel/JsonToJoinModels.cs | 26 +
.../JsonToModel/JsonToOrderByModels.cs | 34 +
.../JsonToModel/JsonToSelectModels.cs | 65 +
.../Json2Sql/ModelToSql/FuncModelToSql.cs | 182 +
.../Json2Sql/ModelToSql/GroupByModelToSql.cs | 31 +
.../Json2Sql/ModelToSql/OrderByModelToSql.cs | 31 +
.../Json2Sql/ModelToSql/SelectModelToSql.cs | 54 +
.../Sugar/Json2Sql/ModelToSql/SqlPart.cs | 152 +
.../Provider/Common/JsonCommonProvider.cs | 87 +
.../Deleteable/JsonDeleteableProvider.cs | 88 +
.../Provider/Insertable/AppendIdentity.cs | 12 +
.../Provider/Insertable/AppendName.cs | 16 +
.../Json2Sql/Provider/Insertable/AppendRow.cs | 13 +
.../Json2Sql/Provider/Insertable/Helper.cs | 42 +
.../Insertable/JsonInsertableProvider.cs | 60 +
.../Provider/Insertable/PrivateProperty.cs | 16 +
.../Provider/Queryable/ApendJoinLastAfter.cs | 43 +
.../Json2Sql/Provider/Queryable/AppendFrom.cs | 26 +
.../Provider/Queryable/AppendGroupBy.cs | 17 +
.../Provider/Queryable/AppendHaving.cs | 17 +
.../Json2Sql/Provider/Queryable/AppendJoin.cs | 52 +
.../Provider/Queryable/AppendOrderBy.cs | 18 +
.../Json2Sql/Provider/Queryable/AppendPage.cs | 24 +
.../Provider/Queryable/AppendSelect.cs | 79 +
.../Provider/Queryable/AppendWhere.cs | 33 +
.../Json2Sql/Provider/Queryable/Entities.cs | 11 +
.../Json2Sql/Provider/Queryable/Helper.cs | 100 +
.../Queryable/JsonQueryableProvider.cs | 114 +
.../Json2Sql/Provider/Queryable/Property.cs | 22 +
.../Provider/Queryable/RegisterAop.cs | 37 +
.../Provider/Queryable/ResultDefault.cs | 45 +
.../Provider/Queryable/ResultHelper.cs | 64 +
.../Json2Sql/Provider/Updateable/AppendRow.cs | 21 +
.../Provider/Updateable/AppendTable.cs | 17 +
.../Provider/Updateable/AppendWhere.cs | 15 +
.../Provider/Updateable/AppendWhereColumns.cs | 15 +
.../Json2Sql/Provider/Updateable/Helpercs.cs | 26 +
.../Updateable/JsonUpdateableProvider.cs | 82 +
.../Json2Sql/Queryable/QueryableProvider.cs | 112 +
.../Sugar/Json2Sql/Utils/Json2SqlConfig.cs | 31 +
.../Sugar/Json2Sql/Utils/Json2SqlHelper.cs | 36 +
.../Sugar/JsonClient.cs | 34 +
.../Sugar/OnlyCore/Compatible.cs | 7 +
.../Sugar/OnlyCore/DataExtensions.cs | 1127 +++++
.../Sugar/OnlyCore/IDataExtensions.cs.cs | 48 +
.../OnlyCore/PartialExpressionContexts.cs | 32 +
.../Realization/Dm/CodeFirst/DmCodeFirst.cs | 105 +
.../Sugar/Realization/Dm/DbBind/DmDbBind.cs | 170 +
.../Sugar/Realization/Dm/DbFirst/DmDbFirst.cs | 6 +
.../Dm/DbMaintenance/DmDbMaintenance.cs | 669 +++
.../Sugar/Realization/Dm/DmProvider.cs | 246 +
.../Dm/Insertable/DmInserttable.cs | 7 +
.../Realization/Dm/Queryable/DmQueryable.cs | 63 +
.../Realization/Dm/SqlBuilder/DmBlukCopy.cs | 150 +
.../Realization/Dm/SqlBuilder/DmBuilder.cs | 61 +
.../Dm/SqlBuilder/DmDeleteBuilder.cs | 7 +
.../Dm/SqlBuilder/DmExpressionContext.cs | 338 ++
.../Dm/SqlBuilder/DmFastBuilder.cs | 98 +
.../Dm/SqlBuilder/DmInsertBuilder.cs | 139 +
.../Dm/SqlBuilder/DmQueryBuilder.cs | 193 +
.../Dm/SqlBuilder/DmUpdateBuilder.cs | 135 +
.../Kdbndp/CodeFirst/KdbndpCodeFirst.cs | 91 +
.../Realization/Kdbndp/DbBind/KdbndpBind.cs | 162 +
.../Kdbndp/DbFirst/KdbndpDbFirst.cs | 6 +
.../DbMaintenance/KdbndpDbMaintenance.cs | 712 +++
.../Kdbndp/Insertable/KdbndpInserttable.cs | 99 +
.../Realization/Kdbndp/KdbndpSQLProvider.cs | 196 +
.../Kdbndp/Queryable/KdbndpQueryable.cs | 63 +
.../Kdbndp/SqlBuilder/KdbndpBuilder.cs | 117 +
.../Kdbndp/SqlBuilder/KdbndpDeleteBuilder.cs | 7 +
.../SqlBuilder/KdbndpExpressionContext.cs | 563 +++
.../Kdbndp/SqlBuilder/KdbndpFastBuilder.cs | 139 +
.../Kdbndp/SqlBuilder/KdbndpInsertBuilder.cs | 131 +
.../Kdbndp/SqlBuilder/KdbndpQueryBuilder.cs | 149 +
.../Kdbndp/SqlBuilder/KdbndpUpdateBuilder.cs | 281 ++
.../MySql/CodeFirst/MySqlCodeFirst.cs | 140 +
.../Realization/MySql/DbBind/MySqlDbBind.cs | 94 +
.../Realization/MySql/DbFirst/MySqlDbFirst.cs | 30 +
.../MySql/DbMaintenance/DorisHelper.cs | 54 +
.../MySql/DbMaintenance/MySqlDbMaintenance.cs | 810 ++++
.../Sugar/Realization/MySql/MySqlProvider.cs | 323 ++
.../MySql/PatialClass/MySqlFastBuilder.cs | 31 +
.../MySql/Queryable/MySqlQueryable.cs | 72 +
.../MySql/SqlBuilder/MySqlBlukCopy.cs | 202 +
.../MySql/SqlBuilder/MySqlBuilder.cs | 35 +
.../MySql/SqlBuilder/MySqlDeleteBuilder.cs | 7 +
.../SqlBuilder/MySqlExpressionContext.cs | 332 ++
.../MySql/SqlBuilder/MySqlFastBuilder.cs | 105 +
.../MySql/SqlBuilder/MySqlInsertBuilder.cs | 191 +
.../MySql/SqlBuilder/MySqlQueryBuilder.cs | 165 +
.../MySql/SqlBuilder/MySqlUpdateBuilder.cs | 231 +
.../Oracle/CodeFirst/OracleCodeFirst.cs | 63 +
.../Realization/Oracle/DbBind/OracleDbBind.cs | 136 +
.../Oracle/DbFirst/OracleDbFirst.cs | 7 +
.../DbMaintenance/OracleDbMaintenance.cs | 702 +++
.../Oracle/Deleteable/OracleDeleteable.cs | 10 +
.../Oracle/Insertable/OracleInsertable.cs | 219 +
.../Realization/Oracle/OracleProvider.cs | 341 ++
.../Oracle/Queryable/OracleQueryable.cs | 60 +
.../Oracle/SqlBuilder/OracleBlukCopy.cs | 318 ++
.../Oracle/SqlBuilder/OracleBuilder.cs | 85 +
.../Oracle/SqlBuilder/OracleDeleteBuilder.cs | 7 +
.../SqlBuilder/OracleExpressionContext.cs | 453 ++
.../Oracle/SqlBuilder/OracleFastBuilder.cs | 122 +
.../Oracle/SqlBuilder/OracleInsertBuilder.cs | 222 +
.../Oracle/SqlBuilder/OracleQueryBuilder.cs | 136 +
.../Oracle/SqlBuilder/OracleUpdateBuilder.cs | 168 +
.../Oracle/Updateable/OracleUpdateable.cs | 58 +
.../Oscar/CodeFirst/OscarCodeFirst.cs | 73 +
.../Realization/Oscar/DbBind/OscarDbBind.cs | 136 +
.../Realization/Oscar/DbFirst/OscarDbFirst.cs | 6 +
.../Oscar/DbMaintenance/OscarDbMaintenance.cs | 415 ++
.../Oscar/Insertable/OscarInserttable.cs | 67 +
.../Sugar/Realization/Oscar/OscarProvider.cs | 158 +
.../Oscar/Queryable/OscarQueryable.cs | 63 +
.../Oscar/SqlBuilder/OscarBuilder.cs | 97 +
.../Oscar/SqlBuilder/OscarDeleteBuilder.cs | 7 +
.../SqlBuilder/OscarExpressionContext.cs | 258 ++
.../Oscar/SqlBuilder/OscarInsertBuilder.cs | 95 +
.../Oscar/SqlBuilder/OscarQueryBuilder.cs | 93 +
.../Oscar/SqlBuilder/OscarUpdateBuilder.cs | 104 +
.../CodeFirst/PostgreSQLCodeFirst.cs | 85 +
.../PostgreSQL/DbBind/PostgreSQLDbBind.cs | 189 +
.../PostgreSQL/DbFirst/PostgreSQLDbFirst.cs | 6 +
.../DbMaintenance/PostgreSQLDbMaintenance.cs | 656 +++
.../Insertable/PostgreSQLInserttable.cs | 98 +
.../PostgreSQL/PostgreSQLProvider.cs | 275 ++
.../Queryable/PostgreSqlQueryable.cs | 63 +
.../SqlBuilder/PostgreSQLBuilder.cs | 124 +
.../SqlBuilder/PostgreSQLDeleteBuilder.cs | 7 +
.../SqlBuilder/PostgreSQLExpressionContext.cs | 521 +++
.../SqlBuilder/PostgreSQLFastBuilder.cs | 166 +
.../SqlBuilder/PostgreSQLInsertBuilder.cs | 268 ++
.../SqlBuilder/PostgreSQLQueryBuilder.cs | 129 +
.../SqlBuilder/PostgreSQLUpdateBuilder.cs | 288 ++
.../QuestDB/CodeFirst/QuestDBCodeFirst.cs | 101 +
.../QuestDB/DbBind/QuestDBDbBind.cs | 144 +
.../QuestDB/DbFirst/QuestDBDbFirst.cs | 6 +
.../DbMaintenance/QuestDBDbMaintenance.cs | 503 ++
.../QuestDB/Queryable/QuestDBQueryable.cs | 67 +
.../Realization/QuestDB/QuestDBProvider.cs | 214 +
.../QuestDB/SqlBuilder/QuestDBBuilder.cs | 113 +
.../SqlBuilder/QuestDBDeleteBuilder.cs | 7 +
.../SqlBuilder/QuestDBExpressionContext.cs | 379 ++
.../QuestDB/SqlBuilder/QuestDBFastBuilder.cs | 121 +
.../SqlBuilder/QuestDBInsertBuilder.cs | 115 +
.../QuestDB/SqlBuilder/QuestDBQueryBuilder.cs | 169 +
.../SqlBuilder/QuestDBUpdateBuilder.cs | 103 +
.../SqlServer/CodeFirst/SqlServerCodeFirst.cs | 50 +
.../SqlServer/DbBind/SqlServerDbBind.cs | 69 +
.../SqlServer/DbFirst/SqlServerDbFirst.cs | 6 +
.../DbMaintenance/SqlServerDbMaintenance.cs | 786 ++++
.../SqlServer/Queryable/SqlServerQueryable.cs | 51 +
.../SqlServer/SqlBuilder/SqlServerBlukCopy.cs | 150 +
.../SqlServer/SqlBuilder/SqlServerBuilder.cs | 33 +
.../SqlBuilder/SqlServerDeleteBuilder.cs | 7 +
.../SqlBuilder/SqlServerExpressionContext.cs | 192 +
.../SqlBuilder/SqlServerFastBuilder.cs | 92 +
.../SqlBuilder/SqlServerInsertBuilder.cs | 82 +
.../SqlBuilder/SqlServerQueryBuilder.cs | 130 +
.../SqlBuilder/SqlServerUpdateBuilder.cs | 118 +
.../SqlServer/SqlServerProvider.cs | 234 +
.../Sqlite/CodeFirst/SqliteCodeFirst.cs | 178 +
.../Realization/Sqlite/DbBind/SqliteDbBind.cs | 109 +
.../Sqlite/DbFirst/SqliteDbFirst.cs | 6 +
.../DbMaintenance/SqliteDbMaintenance.cs | 610 +++
.../Sqlite/Queryable/SqliteQueryable.cs | 60 +
.../Sqlite/SqlBuilder/SqliteBuilder.cs | 39 +
.../Sqlite/SqlBuilder/SqliteDeleteBuilder.cs | 7 +
.../SqlBuilder/SqliteExpressionContext.cs | 347 ++
.../Sqlite/SqlBuilder/SqliteFastBuilder.cs | 212 +
.../Sqlite/SqlBuilder/SqliteInsertBuilder.cs | 162 +
.../Sqlite/SqlBuilder/SqliteQueryBuilder.cs | 105 +
.../Sqlite/SqlBuilder/SqliteUpdateBuilder.cs | 126 +
.../Realization/Sqlite/SqliteProvider.cs | 137 +
.../Sugar/SimpleClient.cs | 758 +++
.../Sugar/SpliteTable/SplitTableAttribute.cs | 42 +
.../Sugar/SpliteTable/SplitTableContext.cs | 108 +
.../Sugar/SpliteTable/SplitTableExtensions.cs | 14 +
.../Sugar/SpliteTable/SplitTableInfo.cs | 13 +
.../Sugar/SpliteTable/SplitType.cs | 18 +
.../Sugar/SpliteTable/SplitTypeExtensions.cs | 38 +
.../Sugar/SqlSugarClient.cs | 1620 +++++++
.../Sugar/SqlSugarScope.cs | 917 ++++
.../Sugar/SugarUnitOfWork.cs | 109 +
.../Sugar/Utilities/CallContext.cs | 8 +
.../Sugar/Utilities/CallContextAsync.cs | 22 +
.../Sugar/Utilities/Check.cs | 43 +
.../Sugar/Utilities/CommonExtensions.cs | 156 +
.../Sugar/Utilities/DataTableExtensions.cs | 125 +
.../Sugar/Utilities/DbExtensions.cs | 172 +
.../Sugar/Utilities/ErrorMessage.cs | 45 +
.../Utilities/ExpressionBuilderHelper.cs | 205 +
.../Sugar/Utilities/FastCopy.cs | 128 +
.../Sugar/Utilities/FileHelper.cs | 69 +
.../Utilities/PropertyCallAdapterProvider.cs | 76 +
.../Sugar/Utilities/ReflectionExtensions.cs | 77 +
.../Sugar/Utilities/SugarAsyncLock.cs | 25 +
.../Sugar/Utilities/SugarRetry.cs | 159 +
.../Sugar/Utilities/UtilConstants.cs | 80 +
.../Sugar/Utilities/UtilConvert.cs | 192 +
.../Sugar/Utilities/UtilExceptions.cs | 83 +
.../Sugar/Utilities/UtilExtensions.cs | 119 +
.../Sugar/Utilities/UtilMethods.cs | 1954 ++++++++
.../Sugar/Utilities/UtilRandom.cs | 28 +
.../Sugar/Utilities/ValidateExtensions.cs | 186 +
.../Sugar/dll/Dm.nuspec | 22 +
.../Sugar/dll/Kdbndp.nuspec | 22 +
.../Sugar/dll/NuGet.exe | Bin 0 -> 3957976 bytes
.../ThingsGateway.SqlSugar/Sugar/dll/dm.bat | 1 +
.../Sugar/dll/kdbndp.bat | 1 +
.../ThingsGateway.SqlSugar/TDengine/STable.cs | 14 +
.../TDengine/STableAttribute.cs | 13 +
.../TDengine/CodeFirst/TDengineCodeFirst.cs | 309 ++
.../TDengine/DbBind/TDengineDbBind.cs | 146 +
.../TDengine/DbFirst/TDengineDbFirst.cs | 6 +
.../DbMaintenance/TDengineDbMaintenance.cs | 588 +++
.../Insertable/TDengineInserttable.cs | 90 +
.../TDengine/Insertable/TagInserttable.cs | 129 +
.../Queryable/TDengineSqlQueryable.cs | 63 +
.../TDengine/SqlBuilder/TDengineBuilder.cs | 133 +
.../SqlBuilder/TDengineDeleteBuilder.cs | 7 +
.../SqlBuilder/TDengineExpressionContext.cs | 444 ++
.../SqlBuilder/TDengineFastBuilder.cs | 218 +
.../SqlBuilder/TDengineInsertBuilder.cs | 184 +
.../SqlBuilder/TDengineQueryBuilder.cs | 120 +
.../SqlBuilder/TDengineUpdateBuilder.cs | 16 +
.../TDengine/TDengine/TDengineProvider.cs | 124 +
.../TDengine/TDengineDataAdapter.cs | 173 +
.../TDengine/Tools/DateTime16.cs | 21 +
.../TDengine/Tools/DateTime19.cs | 25 +
.../TDengine/Tools/FileHelper.cs | 66 +
.../TDengine/Tools/SqlSugarExtensions.cs | 36 +
.../TDengine/Tools/UtilConstants.cs | 69 +
.../TDengine/Tools/UtilExtensions.cs | 140 +
.../TDengine/Tools/UtilMethods.cs | 513 +++
.../TDengine/Tools/ValidateExtensions.cs | 166 +
.../ThingsGateway.SqlSugar.csproj | 23 +-
src/Directory.Build.props | 19 +-
.../Attributes/UriValidationAttribute.cs | 1 +
.../Channel/DDP/DDPTcpSessionClientChannel.cs | 24 +-
.../Channel/DDP/DDPUdpSessionChannel.cs | 4 +-
.../Channel/OtherChannel.cs | 4 +-
.../Device/DeviceBase.cs | 4 +-
.../Extensions/StringExtensions.cs | 6 +-
.../Extensions/TypeExtensions.cs | 5 +-
.../Logger/TextFileReader.cs | 2 +-
.../Utils/CRC16Utils.cs | 2 +-
.../Utils/DataTransUtil.cs | 2 +-
.../Components/BlazorDiagramsException.cs | 8 +
.../Components/Renderers/GroupRenderer.cs | 2 +-
.../Components/Renderers/NodeRenderer.cs | 2 +-
.../Core/Behaviors/DragMovablesBehavior.cs | 2 +-
.../Core/Behaviors/DragNewLinkBehavior.cs | 2 +-
.../SvgPathProperties/Parser.cs | 2 +-
.../SvgPathProperties/SvgPath.cs | 4 +-
.../Const/ThingsGatewayCacheConst.cs | 2 +-
.../Driver/CacheDB/CacheDBUtil.cs | 2 +-
.../GlobalData/GlobalData.cs | 40 +-
.../Model/DeviceRunTime.cs | 3 +-
.../Services/Device/DeviceServiceHelpers.cs | 4 +-
.../Services/Plugin/PluginServiceUtil.cs | 4 +-
.../Services/Variable/VariableService.cs | 2 +-
.../Variable/VariableServiceHelpers.cs | 2 +-
.../Channel/ChannelRuntimeInfo1.razor.cs | 2 +-
.../Device/DeviceRuntimeInfo1.razor.cs | 3 +-
.../Pages/PluginPage/PluginDebugPage.razor.cs | 2 -
.../Helper/ModbusHelper.cs | 2 +-
.../Helper/PackHelper.cs | 2 +-
.../COM/Comn/ComInterop.cs | 4 +-
.../COM/Da/OpcServer.cs | 1 -
.../COM/Rcw/Interop.cs | 10 +-
.../COM/Rcw/ItemProperty.cs | 12 +-
.../Utils/OpcUaUtils.cs | 4 +-
.../QuestDB/QuestDBProducer.cs | 3 +-
.../ThingsGateway.Plugin.DB.csproj | 4 +-
.../Dlt645_2007AddressComponent.razor.cs | 3 +-
.../Pages/Dlt645_2007Master.razor.cs | 5 +-
.../Pages/ModbusAddressComponent.razor.cs | 3 +-
.../Pages/ModbusMaster.razor.cs | 5 +-
.../Pages/ModbusSlave.razor.cs | 5 +-
.../MqttServer/MqttServer.cs | 5 +-
.../Core/ThingsGatewayNodeManager.cs | 2 +-
.../Pages/OpcUaImportVariable.razor.cs | 2 +-
.../Pages/SiemensS7AddressComponent.razor.cs | 3 +-
.../Pages/SiemensS7Master.razor.cs | 5 +-
.../Services/FileConst.cs | 2 +-
.../GlobalUsings.cs | 13 +-
src/Version.props | 2 +-
794 files changed, 108577 insertions(+), 410 deletions(-)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Attributes/IgnoreExcelAttribute.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Attributes/IgnoreSeedDataAttribute.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Const/ClaimConst.cs (98%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Entity/BaseEntity.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Extensions/ExportExcelExtensions.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Extensions/FileExtensions.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Extensions/QueryPageOptionsExtensions.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Extensions/SqlSugarExtensions.cs (99%)
create mode 100644 src/Admin/ThingsGateway.DB/GlobalUsings.cs
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Services/AppService/ClaimsPrincipalService.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Services/AppService/IClaimsPrincipalService.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Services/SugarAopService/ISugarAopService.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Services/SugarAopService/SugarAopService.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Services/SugarService/BaseService.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/SqlSugar/CodeFirstUtils.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/SqlSugar/DbContext.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/SqlSugar/ISqlSugarEntitySeedData.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/SqlSugar/SeedDataUtil.cs (99%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/SqlSugar/SqlSugarOptions.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Startup.cs (100%)
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Static/UserManager.cs (100%)
create mode 100644 src/Admin/ThingsGateway.DB/ThingsGateway.DB.csproj
rename src/Admin/{ThingsGateway.SqlSugar => ThingsGateway.DB}/Util/CommonUtils.cs (100%)
create mode 100644 src/Admin/ThingsGateway.SqlSugar/.txt
create mode 100644 src/Admin/ThingsGateway.SqlSugar/QuestDb/CsvHelperEnumToIntConverter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbPageSizeBulkCopy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPI.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbSqlSugarClientExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoAccessory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AopProvider/AopProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/CacheProvider/CacheProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/CodeFirstProvider/SplitCodeFirstProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/CodeFirstProvider/TableDifferenceProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbBindProvider/DbBindAccessory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbBindProvider/DbBindProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbBindProvider/IDataRecordExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbFirstProvider/DbFirstProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbFirstProvider/DbFirstTemplate.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbFirstProvider/DbRazor.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbMaintenanceProvider/Methods.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DbMaintenanceProvider/Properties.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/DeleteMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/DeleteNavMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/DeleteablePage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/DeleteableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/LogicDeleteProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/SplitTableDeleteByObjectProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DeleteProvider/SplitTableDeleteProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/CommonMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/DynamicBuilderHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/DynamicOneselfType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/DynamicProperyBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/EmitTool.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/Helper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/DynamicBuilder/Master.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/EntityMaintenance/EntityColumnExtension.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/EntityMaintenance/EntityMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/DeleteNavManyToMany.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/DeleteNavOneToMany.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/DeleteNavOneToOne.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/DeleteNavProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/DeleteNavTask.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/InsertNavProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/InsertNavProviderHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/InsertNavProviderOneToMany.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/InsertNavProviderOneToOne.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/InsertNavTask.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/NavContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/UpdateNavOneToMany.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/UpdateNavOneToOne.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/UpdateNavProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/UpdateNavProviderHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExecuteNavProvider/UpdateNavTask.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/ExpressionableProvider/Expressionable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/FastestProvider/FastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/FastestProvider/FastestProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/FastestProvider/Private.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/FastestProvider/Setting.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/FastestProvider/SplitFastest.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/FilterProvider/FilterProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/GridSave/GridSaveProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/InsertMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/InsertNavMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/InsertableHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/InsertablePage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/InsertableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/ParameterInsertable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/SplitInsertable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/InsertableProvider/SubInserable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Entities/AppendNavInfoList.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Entities/QueryableAppendColumn.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Entities/QueryableFormat.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Entities/SqlInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Entities/SubQueryToListDefaultT.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Includes.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/Includes.txt
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/IncludesHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/MappingFieldsHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/NavSelectHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/NavigatManager.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableAccessory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableExecuteSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableExecuteSqlAsync.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableProperties.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableProvider02-05.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableProvider06-10.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/QueryableProvider/QueryableProvider11-12.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/Reportable/ReportableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SaveableProvider/SaveableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SaveableProvider/Storageable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SaveableProvider/StorageableDataTable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SaveableProvider/StorageableMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SaveableProvider/StorageablePage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SaveableProvider/StorageableSplitProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/DeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/Entities.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/InsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/QueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/SqlBuilderAccessory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/SqlBuilderProvider_Condition.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/SqlQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SugarProvider/SqlSugarAccessory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SugarProvider/SqlSugarCoreProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SugarProvider/SqlSugarProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/ParameterUpdateable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/SplitTableUpdateByObjectProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/SplitTableUpdateProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateExpressionMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateNavMethodInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateableFilter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateableHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateablePage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateableProviderT2.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateableProviderT3.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/UpdateProvider/UpdateableProviderT4.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/CacheScheme/CacheKeyBuider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/CacheScheme/CacheSchemeMain.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/DistributedSystem/Snowflake/DisposableAction.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/DistributedSystem/Snowflake/IdWorker.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/DistributedSystem/Snowflake/InvalidSystemClock.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/DistributedSystem/Snowflake/SnowFlakeSingle.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/DistributedSystem/Snowflake/TimeExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/DistributedSystem/Snowflake/ValueToStringConverter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/AsyncRef.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/CacheKey.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/ConditionalModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/ConfigQuery.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/ConnMoreSettings.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/ConnectionConfig.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DbColumnInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DbFastestProperties.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DbResult.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DbTableInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DefaultCustom.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DefaultServices.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DeleteNavOptions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DiffLogModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DiffType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DiscriminatorObject .cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/DynamicSelectModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/EntityColumnInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/EntityInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/JoinInfoParameter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/JoinMapper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/JoinQueryInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/ManyToManyConfig.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/MapperCache.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/Mapping/IgnoreComumn.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/Mapping/MappingColumn.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/Mapping/MappingTable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/Mapping/SugarMappingAttribute.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/ModelContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/NavigationInitializer.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/PageModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/PropertyMetadata.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/QueueItem.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SchemaInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SingleColumnsEntity.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SlaveConnectionConfig.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SqlFilter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SqlSguarTransaction.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SqlWith.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/StackTraceInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SubInsertTree.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SugarAbMapping.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SugarConnection.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SugarDebugger.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SugarList.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Entities/SugarTerant.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/ApplyType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/ConditionalType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/DataFilterType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/DbLockType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/DbObjectType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/DbType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/InitKeyType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/JoinType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/LanguageType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/NavigatType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/OrderByType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/ProperyType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/ReportableDateType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/SampleByUnit.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/SugarActionType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/SugarDateTimeFormat.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Enum/WhereType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/CaseWhen/CaseWhen.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/CaseWhen/CaseWhenResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/BinaryExpressionInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/CommonTempDataType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/DateType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ErrorMessage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpResolveAccessory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionConst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionContextCase.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionItems.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionOutParameter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionParameter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionResult.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionResultAcceptType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ExpressionTool.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ListAnyParameter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/MapperExpression.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/MapperSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/MethodCallExpressionModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/NewExpressionInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ParameterExpressionVisitor.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ParameterReplacer.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/ResolveExpressType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Common/SugarParameter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/DbMethods/IDbMethods.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/DbMethods/SqlFunc.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/DbMethods/SqlFuncExtendsion.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/DbMethods/SqlFuncExternal.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve_Append.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve_Helper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve_Item.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve_NewExp.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve_Property.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BaseResolve_Validate.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/BlockExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/CoalesceResolveItems.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/ConditionalExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/ConstantExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/LambdaExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MapperExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MemberConstExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MemberInitExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MemberNewExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MemberNoExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve_BaseDateFomat.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve_Helper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/NewArrayExpessionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/NewExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/OneToManyNavgateExpression.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/OneToManyNavgateExpressionN.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/OneToOneNavgateExpression.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/OneToOneNavgateExpressionN.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/TypeParameterExpressionReolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/ResolveItems/UnaryExpressionResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/ISubOperation.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubAnd.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubAndIF.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubAny.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubAs.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubAsWithAttr.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubAvg.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubBegin.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubCount.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubDistinctCount.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubEnableTableFilter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubFromTable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubGroupBy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubHaving.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubInnerJoin.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubLeftBracket.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubLeftJoin.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubMax.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubMin.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubNotAny.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubOrderBy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubRightBracket.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubSelect.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubSelectDefault.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubSelectStringJoin.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubSum.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubTake.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubToList.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubTop.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubWhere.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubWhereIF.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Items/SubWithNoLock.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/SubResolve.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/SubTemplate.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/SubTools.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/Subquerable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExpressionsToSql/Subquery/SubqueryableN.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExternalServiceInterface/ICacheService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExternalServiceInterface/IRazorService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExternalServiceInterface/ISerializeService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/ExternalServiceInterface/ISplitTableService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Infrastructure/ContextMethods.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Infrastructure/DependencyManagement.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Infrastructure/InstanceFactory.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Infrastructure/Mapper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Infrastructure/StaticConfig.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/IntegrationServices/CacheService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/IntegrationServices/SerializeService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/IntegrationServices/SplitTableService.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IAdo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ICodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IContextMethods.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ICustomConditionalFunc.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IDMLBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IDeleteable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IFastest.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IFilter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IIncludes.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IIncludes.txt
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ILambdaExpressions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IParameterInsertable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IReportable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISaveable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISimpleClient.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISqlBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISqlSugarClient.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IStorageable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISubInsertable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISugarDataConverter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ISugarRepository.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/ITenant.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/IUpdateable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Interface/Insertable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/DynamicLinq/DynamicCoreHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/DynamicLinq/DynamicParameters.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/DynamicLinq/SqlSugarDynamicExpressionParser.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Entities/JsonDeleteResult.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Entities/JsonInsertResult.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Entities/JsonQueryResult.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Entities/JsonTableConfig.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Entities/JsonUpdateResult.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Enums/AsNameFormatType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Enums/Json2SqlType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IFuncModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonClient.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonDeleteableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonInsertableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonQueryableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonToModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IJsonUpdateableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/IModelToSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Interface/ISugarQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/FuncModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/GroupByModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/JoinModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/JsonQueryParameter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/JsonSqlModels.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/JsonTableNameInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/OrderByModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonModels/SelectFieldModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/Helper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonSqlFuncToModel.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonSqlFuncToParameters.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonToColumnsModels.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonToGroupByModels.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonToJoinModels.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonToOrderByModels.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/JsonToModel/JsonToSelectModels.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/ModelToSql/FuncModelToSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/ModelToSql/GroupByModelToSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/ModelToSql/OrderByModelToSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/ModelToSql/SelectModelToSql.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/ModelToSql/SqlPart.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Common/JsonCommonProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Deleteable/JsonDeleteableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Insertable/AppendIdentity.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Insertable/AppendName.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Insertable/AppendRow.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Insertable/Helper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Insertable/JsonInsertableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Insertable/PrivateProperty.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/ApendJoinLastAfter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendFrom.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendGroupBy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendHaving.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendJoin.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendOrderBy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendPage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendSelect.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/AppendWhere.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/Entities.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/Helper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/JsonQueryableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/Property.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/RegisterAop.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/ResultDefault.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Queryable/ResultHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Updateable/AppendRow.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Updateable/AppendTable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Updateable/AppendWhere.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Updateable/AppendWhereColumns.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Updateable/Helpercs.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Provider/Updateable/JsonUpdateableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Queryable/QueryableProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Utils/Json2SqlConfig.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Json2Sql/Utils/Json2SqlHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/JsonClient.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/OnlyCore/Compatible.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/OnlyCore/DataExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/OnlyCore/IDataExtensions.cs.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/OnlyCore/PartialExpressionContexts.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/CodeFirst/DmCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/DbBind/DmDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/DbFirst/DmDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/DmProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/Insertable/DmInserttable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/Queryable/DmQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmBlukCopy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Dm/SqlBuilder/DmUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/CodeFirst/KdbndpCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/DbBind/KdbndpBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/DbFirst/KdbndpDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/DbMaintenance/KdbndpDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/Insertable/KdbndpInserttable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/KdbndpSQLProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/Queryable/KdbndpQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Kdbndp/SqlBuilder/KdbndpUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/CodeFirst/MySqlCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/DbBind/MySqlDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/DbFirst/MySqlDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/DbMaintenance/DorisHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/MySqlProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/PatialClass/MySqlFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/Queryable/MySqlQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlBlukCopy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/MySql/SqlBuilder/MySqlUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/CodeFirst/OracleCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/DbBind/OracleDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/DbFirst/OracleDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/DbMaintenance/OracleDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/Deleteable/OracleDeleteable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/Insertable/OracleInsertable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/OracleProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/Queryable/OracleQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleBlukCopy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oracle/Updateable/OracleUpdateable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/CodeFirst/OscarCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/DbBind/OscarDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/DbFirst/OscarDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/DbMaintenance/OscarDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/Insertable/OscarInserttable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/OscarProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/Queryable/OscarQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/SqlBuilder/OscarBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/SqlBuilder/OscarDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/SqlBuilder/OscarExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/SqlBuilder/OscarInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/SqlBuilder/OscarQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Oscar/SqlBuilder/OscarUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/CodeFirst/PostgreSQLCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/DbFirst/PostgreSQLDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/Insertable/PostgreSQLInserttable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/PostgreSQLProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/Queryable/PostgreSqlQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/CodeFirst/QuestDBCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/DbBind/QuestDBDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/DbFirst/QuestDBDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/DbMaintenance/QuestDBDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/Queryable/QuestDBQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/QuestDBProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/QuestDB/SqlBuilder/QuestDBUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/CodeFirst/SqlServerCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/DbBind/SqlServerDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/DbFirst/SqlServerDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/DbMaintenance/SqlServerDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/Queryable/SqlServerQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerBlukCopy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlBuilder/SqlServerUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/SqlServer/SqlServerProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/CodeFirst/SqliteCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/DbBind/SqliteDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/DbFirst/SqliteDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/Queryable/SqliteQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqlBuilder/SqliteUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Realization/Sqlite/SqliteProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SimpleClient.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SpliteTable/SplitTableAttribute.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SpliteTable/SplitTableContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SpliteTable/SplitTableExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SpliteTable/SplitTableInfo.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SpliteTable/SplitType.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SpliteTable/SplitTypeExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SqlSugarClient.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SqlSugarScope.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/SugarUnitOfWork.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/CallContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/CallContextAsync.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/Check.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/CommonExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/DataTableExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/DbExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/ErrorMessage.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/ExpressionBuilderHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/FastCopy.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/FileHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/PropertyCallAdapterProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/ReflectionExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/SugarAsyncLock.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/SugarRetry.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/UtilConstants.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/UtilConvert.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/UtilExceptions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/UtilExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/UtilMethods.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/UtilRandom.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/Utilities/ValidateExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/dll/Dm.nuspec
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/dll/Kdbndp.nuspec
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/dll/NuGet.exe
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/dll/dm.bat
create mode 100644 src/Admin/ThingsGateway.SqlSugar/Sugar/dll/kdbndp.bat
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/STable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/STableAttribute.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/CodeFirst/TDengineCodeFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/DbBind/TDengineDbBind.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/DbFirst/TDengineDbFirst.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/DbMaintenance/TDengineDbMaintenance.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/Insertable/TDengineInserttable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/Insertable/TagInserttable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/Queryable/TDengineSqlQueryable.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineDeleteBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineExpressionContext.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineFastBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineInsertBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineQueryBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/SqlBuilder/TDengineUpdateBuilder.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengine/TDengineProvider.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/TDengineDataAdapter.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/DateTime16.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/DateTime19.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/FileHelper.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/SqlSugarExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/UtilConstants.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/UtilExtensions.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/UtilMethods.cs
create mode 100644 src/Admin/ThingsGateway.SqlSugar/TDengine/Tools/ValidateExtensions.cs
diff --git a/src/.editorconfig b/src/.editorconfig
index 38812cd3f..763ef2d0a 100644
--- a/src/.editorconfig
+++ b/src/.editorconfig
@@ -126,35 +126,8 @@ dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
-
-dotnet_diagnostic.CA2208.severity = none
-dotnet_diagnostic.CA2008.severity = none
-dotnet_diagnostic.CA1812.severity = none
-dotnet_diagnostic.CA1508.severity = none
-dotnet_diagnostic.CA1512.severity = none
-dotnet_diagnostic.CA1513.severity = none
-dotnet_diagnostic.CA1810.severity = none
-dotnet_diagnostic.CA1814.severity = none
-dotnet_diagnostic.CA1815.severity = none
-dotnet_diagnostic.CA1835.severity = none
-dotnet_diagnostic.CA1819.severity = none
-dotnet_diagnostic.CA1823.severity = none
-dotnet_diagnostic.CA2002.severity = none
-dotnet_diagnostic.CA5350.severity = none
-dotnet_diagnostic.CA5351.severity = none
-dotnet_diagnostic.CA5358.severity = none
-dotnet_diagnostic.CA5384.severity = none
-dotnet_diagnostic.CA5392.severity = none
-dotnet_diagnostic.CA1805.severity = none
-dotnet_diagnostic.CA1851.severity = none
-dotnet_diagnostic.CA1510.severity = none
-dotnet_diagnostic.CA5401.severity = none
-dotnet_diagnostic.CA2022.severity = none
-dotnet_diagnostic.CA1848.severity = none
-dotnet_diagnostic.CA2000.severity = none
-dotnet_diagnostic.CA5394.severity = none
-dotnet_diagnostic.CA3003.severity = none
-dotnet_diagnostic.CA1515.severity = none
-dotnet_diagnostic.CA1849.severity = none
+dotnet_diagnostic.RCS1146.severity = warning
+dotnet_diagnostic.RCS1059.severity = none
+dotnet_diagnostic.RCS1138.severity = suggestion
dotnet_code_quality.CA1822.api_surface = private, internal
\ No newline at end of file
diff --git a/src/Admin/ThingsGateway.Admin.Application/Attributes/IgnoreRolePermissionAttribute.cs b/src/Admin/ThingsGateway.Admin.Application/Attributes/IgnoreRolePermissionAttribute.cs
index 19045fbf1..922063946 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Attributes/IgnoreRolePermissionAttribute.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Attributes/IgnoreRolePermissionAttribute.cs
@@ -13,14 +13,16 @@ namespace ThingsGateway.Admin.Application;
///
/// 需要角色授权权限
///
-[AttributeUsage(AttributeTargets.Class)]
+[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class RolePermissionAttribute : Attribute
{
}
+
///
/// 忽略角色授权权限
///
+[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)]
public sealed class IgnoreRolePermissionAttribute : Attribute
{
}
diff --git a/src/Admin/ThingsGateway.Admin.Application/Const/CacheConst.cs b/src/Admin/ThingsGateway.Admin.Application/Const/CacheConst.cs
index 16f3da5a6..5ccb5adee 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Const/CacheConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Const/CacheConst.cs
@@ -11,7 +11,7 @@
namespace ThingsGateway.Admin.Application;
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class CacheConst
+public static class CacheConst
{
///
/// Token表缓存Key
diff --git a/src/Admin/ThingsGateway.Admin.Application/Const/HubConst.cs b/src/Admin/ThingsGateway.Admin.Application/Const/HubConst.cs
index 569408420..51939736e 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Const/HubConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Const/HubConst.cs
@@ -13,7 +13,7 @@ namespace ThingsGateway.Admin.Application;
///
/// 通讯器常量
///
-public class HubConst
+public static class HubConst
{
///
/// 系统HubUrl
diff --git a/src/Admin/ThingsGateway.Admin.Application/Const/ResourceConst.cs b/src/Admin/ThingsGateway.Admin.Application/Const/ResourceConst.cs
index 3152560fd..7fbddb814 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Const/ResourceConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Const/ResourceConst.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
/// 资源表常量
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class ResourceConst
+public static class ResourceConst
{
///
/// 系统内置编码
diff --git a/src/Admin/ThingsGateway.Admin.Application/Const/RoleConst.cs b/src/Admin/ThingsGateway.Admin.Application/Const/RoleConst.cs
index 2ac3c3601..66350dd97 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Const/RoleConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Const/RoleConst.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
/// 角色常量
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class RoleConst
+public static class RoleConst
{
///
/// api角色
diff --git a/src/Admin/ThingsGateway.Admin.Application/Const/SqlSugarConst.cs b/src/Admin/ThingsGateway.Admin.Application/Const/SqlSugarConst.cs
index 6ef6796f2..bca8c97a2 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Const/SqlSugarConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Const/SqlSugarConst.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
/// SqlSugar系统常量
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class SqlSugarConst
+public static class SqlSugarConst
{
///
/// DB_Admin
diff --git a/src/Admin/ThingsGateway.Admin.Application/Filter/RequestAuditAttribute.cs b/src/Admin/ThingsGateway.Admin.Application/Filter/RequestAuditAttribute.cs
index 3a7bfabe5..ecbc4b706 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Filter/RequestAuditAttribute.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Filter/RequestAuditAttribute.cs
@@ -1,14 +1,4 @@
-// ------------------------------------------------------------------------
-// 版权信息
-// 版权归百小僧及百签科技(广东)有限公司所有。
-// 所有权利保留。
-// 官方网站:https://baiqian.com
-//
-// 许可证信息
-// 项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。
-// 许可证的完整文本可以在源代码树根目录中的 LICENSE-APACHE 和 LICENSE-MIT 文件中找到。
-// ------------------------------------------------------------------------
-
+
using ThingsGateway.DependencyInjection;
namespace System;
diff --git a/src/Admin/ThingsGateway.Admin.Application/Filter/SuppressRequestAuditAttribute.cs b/src/Admin/ThingsGateway.Admin.Application/Filter/SuppressRequestAuditAttribute.cs
index 625b62c54..830c0b7df 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Filter/SuppressRequestAuditAttribute.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Filter/SuppressRequestAuditAttribute.cs
@@ -1,14 +1,4 @@
-// ------------------------------------------------------------------------
-// 版权信息
-// 版权归百小僧及百签科技(广东)有限公司所有。
-// 所有权利保留。
-// 官方网站:https://baiqian.com
-//
-// 许可证信息
-// 项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。
-// 许可证的完整文本可以在源代码树根目录中的 LICENSE-APACHE 和 LICENSE-MIT 文件中找到。
-// ------------------------------------------------------------------------
-
+
using ThingsGateway.DependencyInjection;
namespace System;
diff --git a/src/Admin/ThingsGateway.Admin.Application/Gitee/AdminOAuthHandler.cs b/src/Admin/ThingsGateway.Admin.Application/Gitee/AdminOAuthHandler.cs
index acb17b6dc..058073171 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Gitee/AdminOAuthHandler.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Gitee/AdminOAuthHandler.cs
@@ -261,4 +261,17 @@ public class AdminOAuthHandler(
}
/// 自定义 Token 异常
-public class OAuthTokenException(string message) : Exception(message);
+public class OAuthTokenException : Exception
+{
+ public OAuthTokenException() : base()
+ {
+ }
+
+ public OAuthTokenException(string? message, Exception? innerException) : base(message, innerException)
+ {
+ }
+
+ public OAuthTokenException(string? message) : base(message)
+ {
+ }
+}
diff --git a/src/Admin/ThingsGateway.Admin.Application/Logging/LoggingConst.cs b/src/Admin/ThingsGateway.Admin.Application/Logging/LoggingConst.cs
index 470676394..39a69087b 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Logging/LoggingConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Logging/LoggingConst.cs
@@ -13,7 +13,7 @@ namespace ThingsGateway.Admin.Application;
///
/// 日志常量
///
-public class LoggingConst
+public static class LoggingConst
{
///
/// 分类
diff --git a/src/Admin/ThingsGateway.Admin.Application/Provider/BlazorAuthenticationHandler.cs b/src/Admin/ThingsGateway.Admin.Application/Provider/BlazorAuthenticationHandler.cs
index ccba7d4a1..5e7b3df51 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Provider/BlazorAuthenticationHandler.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Provider/BlazorAuthenticationHandler.cs
@@ -87,7 +87,7 @@ public class BlazorAuthenticationHandler : AppAuthorizeHandler
var roles = await _sysRoleService.GetRoleListByUserIdAsync(userId).ConfigureAwait(false);
//这里鉴别用户使能状态
- if (user == null || !user.Status)
+ if (user?.Status != true)
{
return false;
}
@@ -137,7 +137,7 @@ public class BlazorAuthenticationHandler : AppAuthorizeHandler
else
{
//这里鉴别用户使能状态
- if (user == null || !user.Status)
+ if (user?.Status != true)
{
return false;
}
diff --git a/src/Admin/ThingsGateway.Admin.Application/Services/Resource/SysResourceService.cs b/src/Admin/ThingsGateway.Admin.Application/Services/Resource/SysResourceService.cs
index 7fa9e6d5b..69bc7f3ea 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Services/Resource/SysResourceService.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Services/Resource/SysResourceService.cs
@@ -334,7 +334,7 @@ internal sealed class SysResourceService : BaseService, ISysResourc
flatList.Add(node);
// 如果当前节点有子节点,则递归处理每个子节点
- if (node.Children != null && node.Children.Count > 0)
+ if (node.Children?.Count > 0)
{
foreach (var child in node.Children)
{
diff --git a/src/Admin/ThingsGateway.Admin.Application/ThingsGateway.Admin.Application.csproj b/src/Admin/ThingsGateway.Admin.Application/ThingsGateway.Admin.Application.csproj
index 43f084540..9a3ed00e5 100644
--- a/src/Admin/ThingsGateway.Admin.Application/ThingsGateway.Admin.Application.csproj
+++ b/src/Admin/ThingsGateway.Admin.Application/ThingsGateway.Admin.Application.csproj
@@ -47,7 +47,7 @@
-
+
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/ClearTokenUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/ClearTokenUtil.cs
index d7c6c03c4..da413987e 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/ClearTokenUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/ClearTokenUtil.cs
@@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace ThingsGateway.Admin.Application;
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class ClearTokenUtil
+public static class ClearTokenUtil
{
private static IRelationService RelationService;
private static ISysUserService SysUserService;
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/NoticeUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/NoticeUtil.cs
index d3a586684..1a6be390c 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/NoticeUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/NoticeUtil.cs
@@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace ThingsGateway.Admin.Application;
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class NoticeUtil
+public static class NoticeUtil
{
private static INoticeService NoticeService;
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/OpenApiUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/OpenApiUtil.cs
index 7e7b6ba11..c880c59fd 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/OpenApiUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/OpenApiUtil.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class OpenApiUtil
+public static class OpenApiUtil
{
///
/// 构建树节点,传入的列表已经是树结构
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/OrgUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/OrgUtil.cs
index 3461b7875..47e32c047 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/OrgUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/OrgUtil.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class OrgUtil
+public static class OrgUtil
{
///
/// 构造选择项,ID/TITLE
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/PositionUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/PositionUtil.cs
index 32c765d88..d136baa7e 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/PositionUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/PositionUtil.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class PositionUtil
+public static class PositionUtil
{
///
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/RoleUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/RoleUtil.cs
index 35699ea48..62add004c 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/RoleUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/RoleUtil.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class RoleUtil
+public static class RoleUtil
{
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/UserUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/UserUtil.cs
index 4a3998afd..35948a5da 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/UserUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/UserUtil.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class UserUtil
+public static class UserUtil
{
///
diff --git a/src/Admin/ThingsGateway.Admin.Application/Util/VerificatInfoUtil.cs b/src/Admin/ThingsGateway.Admin.Application/Util/VerificatInfoUtil.cs
index 894d5180e..9a78937cd 100644
--- a/src/Admin/ThingsGateway.Admin.Application/Util/VerificatInfoUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Application/Util/VerificatInfoUtil.cs
@@ -14,7 +14,7 @@ using ThingsGateway.Extension.Generic;
namespace ThingsGateway.Admin.Application;
-public class VerificatInfoUtil
+public static class VerificatInfoUtil
{
private static IVerificatInfoService VerificatInfoService { get; set; }
static VerificatInfoUtil()
diff --git a/src/Admin/ThingsGateway.Admin.Razor/Const/AdminOperConst.cs b/src/Admin/ThingsGateway.Admin.Razor/Const/AdminOperConst.cs
index 992e741d8..5345d29ff 100644
--- a/src/Admin/ThingsGateway.Admin.Razor/Const/AdminOperConst.cs
+++ b/src/Admin/ThingsGateway.Admin.Razor/Const/AdminOperConst.cs
@@ -11,7 +11,7 @@
namespace ThingsGateway.Admin.Razor;
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class AdminOperConst
+public static class AdminOperConst
{
public const string Add = "新增";
public const string Delete = "删除";
diff --git a/src/Admin/ThingsGateway.Admin.Razor/Pages/User/SysUserAvatarEdit.razor.cs b/src/Admin/ThingsGateway.Admin.Razor/Pages/User/SysUserAvatarEdit.razor.cs
index 8d1a059cf..62a546a40 100644
--- a/src/Admin/ThingsGateway.Admin.Razor/Pages/User/SysUserAvatarEdit.razor.cs
+++ b/src/Admin/ThingsGateway.Admin.Razor/Pages/User/SysUserAvatarEdit.razor.cs
@@ -48,7 +48,7 @@ public partial class SysUserAvatarEdit : IDisposable
private async Task OnAvatarUpload(UploadFile file)
{
- if (file != null && file.File != null)
+ if (file?.File != null)
{
var format = file.File.ContentType;
ReadAvatarToken ??= new CancellationTokenSource();
diff --git a/src/Admin/ThingsGateway.Admin.Razor/Pages/UserCenter/UserInfoEditComponent.razor.cs b/src/Admin/ThingsGateway.Admin.Razor/Pages/UserCenter/UserInfoEditComponent.razor.cs
index 3572b9f88..1843e7445 100644
--- a/src/Admin/ThingsGateway.Admin.Razor/Pages/UserCenter/UserInfoEditComponent.razor.cs
+++ b/src/Admin/ThingsGateway.Admin.Razor/Pages/UserCenter/UserInfoEditComponent.razor.cs
@@ -48,7 +48,7 @@ public partial class UserInfoEditComponent
private async Task OnAvatarUpload(UploadFile file)
{
- if (file != null && file.File != null)
+ if (file?.File != null)
{
var format = file.File.ContentType;
ReadAvatarToken ??= new CancellationTokenSource();
diff --git a/src/Admin/ThingsGateway.Admin.Razor/Util/ResourceUtil.cs b/src/Admin/ThingsGateway.Admin.Razor/Util/ResourceUtil.cs
index 4b93e004a..c260688bb 100644
--- a/src/Admin/ThingsGateway.Admin.Razor/Util/ResourceUtil.cs
+++ b/src/Admin/ThingsGateway.Admin.Razor/Util/ResourceUtil.cs
@@ -16,7 +16,7 @@ namespace ThingsGateway.Admin.Razor;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class ResourceUtil
+public static class ResourceUtil
{
///
diff --git a/src/Admin/ThingsGateway.AdminServer/GlobalUsings.cs b/src/Admin/ThingsGateway.AdminServer/GlobalUsings.cs
index 29884ed1e..0a5641e42 100644
--- a/src/Admin/ThingsGateway.AdminServer/GlobalUsings.cs
+++ b/src/Admin/ThingsGateway.AdminServer/GlobalUsings.cs
@@ -1,12 +1 @@
-// ------------------------------------------------------------------------
-// 版权信息
-// 版权归百小僧及百签科技(广东)有限公司所有。
-// 所有权利保留。
-// 官方网站:https://baiqian.com
-//
-// 许可证信息
-// 项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。
-// 许可证的完整文本可以在源代码树根目录中的 LICENSE-APACHE 和 LICENSE-MIT 文件中找到。
-// ------------------------------------------------------------------------
-
-global using ThingsGateway.Admin.Application;
+global using ThingsGateway.Admin.Application;
diff --git a/src/Admin/ThingsGateway.SqlSugar/Attributes/IgnoreExcelAttribute.cs b/src/Admin/ThingsGateway.DB/Attributes/IgnoreExcelAttribute.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Attributes/IgnoreExcelAttribute.cs
rename to src/Admin/ThingsGateway.DB/Attributes/IgnoreExcelAttribute.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Attributes/IgnoreSeedDataAttribute.cs b/src/Admin/ThingsGateway.DB/Attributes/IgnoreSeedDataAttribute.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Attributes/IgnoreSeedDataAttribute.cs
rename to src/Admin/ThingsGateway.DB/Attributes/IgnoreSeedDataAttribute.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Const/ClaimConst.cs b/src/Admin/ThingsGateway.DB/Const/ClaimConst.cs
similarity index 98%
rename from src/Admin/ThingsGateway.SqlSugar/Const/ClaimConst.cs
rename to src/Admin/ThingsGateway.DB/Const/ClaimConst.cs
index 7b6db1c3c..0bc0dd62b 100644
--- a/src/Admin/ThingsGateway.SqlSugar/Const/ClaimConst.cs
+++ b/src/Admin/ThingsGateway.DB/Const/ClaimConst.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Admin.Application;
/// 授权用户常量
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class ClaimConst
+public static class ClaimConst
{
///
/// 账号
diff --git a/src/Admin/ThingsGateway.SqlSugar/Entity/BaseEntity.cs b/src/Admin/ThingsGateway.DB/Entity/BaseEntity.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Entity/BaseEntity.cs
rename to src/Admin/ThingsGateway.DB/Entity/BaseEntity.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Extensions/ExportExcelExtensions.cs b/src/Admin/ThingsGateway.DB/Extensions/ExportExcelExtensions.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Extensions/ExportExcelExtensions.cs
rename to src/Admin/ThingsGateway.DB/Extensions/ExportExcelExtensions.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Extensions/FileExtensions.cs b/src/Admin/ThingsGateway.DB/Extensions/FileExtensions.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Extensions/FileExtensions.cs
rename to src/Admin/ThingsGateway.DB/Extensions/FileExtensions.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Extensions/QueryPageOptionsExtensions.cs b/src/Admin/ThingsGateway.DB/Extensions/QueryPageOptionsExtensions.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Extensions/QueryPageOptionsExtensions.cs
rename to src/Admin/ThingsGateway.DB/Extensions/QueryPageOptionsExtensions.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Extensions/SqlSugarExtensions.cs b/src/Admin/ThingsGateway.DB/Extensions/SqlSugarExtensions.cs
similarity index 99%
rename from src/Admin/ThingsGateway.SqlSugar/Extensions/SqlSugarExtensions.cs
rename to src/Admin/ThingsGateway.DB/Extensions/SqlSugarExtensions.cs
index a2b766cef..b12b1c0f9 100644
--- a/src/Admin/ThingsGateway.SqlSugar/Extensions/SqlSugarExtensions.cs
+++ b/src/Admin/ThingsGateway.DB/Extensions/SqlSugarExtensions.cs
@@ -225,7 +225,7 @@ public static class SqlSugarExtensions
private static IEnumerable Sort(this IEnumerable list, BasePageInput basePageInput)
{
- if (basePageInput != null && basePageInput.SortField != null)
+ if (basePageInput?.SortField != null)
{
for (int i = 0; i < basePageInput.SortField.Count; i++)
{
diff --git a/src/Admin/ThingsGateway.DB/GlobalUsings.cs b/src/Admin/ThingsGateway.DB/GlobalUsings.cs
new file mode 100644
index 000000000..ec2e58001
--- /dev/null
+++ b/src/Admin/ThingsGateway.DB/GlobalUsings.cs
@@ -0,0 +1,11 @@
+//------------------------------------------------------------------------------
+// 此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
+// 此代码版权(除特别声明外的代码)归作者本人Diego所有
+// 源代码使用协议遵循本仓库的开源协议及附加协议
+// Gitee源代码仓库:https://gitee.com/diego2098/ThingsGateway
+// Github源代码仓库:https://github.com/kimdiego2098/ThingsGateway
+// 使用文档:https://thingsgateway.cn/
+// QQ群:605534569
+//------------------------------------------------------------------------------
+
+global using ThingsGateway.NewLife.Extension;
\ No newline at end of file
diff --git a/src/Admin/ThingsGateway.SqlSugar/Services/AppService/ClaimsPrincipalService.cs b/src/Admin/ThingsGateway.DB/Services/AppService/ClaimsPrincipalService.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Services/AppService/ClaimsPrincipalService.cs
rename to src/Admin/ThingsGateway.DB/Services/AppService/ClaimsPrincipalService.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Services/AppService/IClaimsPrincipalService.cs b/src/Admin/ThingsGateway.DB/Services/AppService/IClaimsPrincipalService.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Services/AppService/IClaimsPrincipalService.cs
rename to src/Admin/ThingsGateway.DB/Services/AppService/IClaimsPrincipalService.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Services/SugarAopService/ISugarAopService.cs b/src/Admin/ThingsGateway.DB/Services/SugarAopService/ISugarAopService.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Services/SugarAopService/ISugarAopService.cs
rename to src/Admin/ThingsGateway.DB/Services/SugarAopService/ISugarAopService.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Services/SugarAopService/SugarAopService.cs b/src/Admin/ThingsGateway.DB/Services/SugarAopService/SugarAopService.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Services/SugarAopService/SugarAopService.cs
rename to src/Admin/ThingsGateway.DB/Services/SugarAopService/SugarAopService.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Services/SugarService/BaseService.cs b/src/Admin/ThingsGateway.DB/Services/SugarService/BaseService.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Services/SugarService/BaseService.cs
rename to src/Admin/ThingsGateway.DB/Services/SugarService/BaseService.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/SqlSugar/CodeFirstUtils.cs b/src/Admin/ThingsGateway.DB/SqlSugar/CodeFirstUtils.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/SqlSugar/CodeFirstUtils.cs
rename to src/Admin/ThingsGateway.DB/SqlSugar/CodeFirstUtils.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/SqlSugar/DbContext.cs b/src/Admin/ThingsGateway.DB/SqlSugar/DbContext.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/SqlSugar/DbContext.cs
rename to src/Admin/ThingsGateway.DB/SqlSugar/DbContext.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/SqlSugar/ISqlSugarEntitySeedData.cs b/src/Admin/ThingsGateway.DB/SqlSugar/ISqlSugarEntitySeedData.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/SqlSugar/ISqlSugarEntitySeedData.cs
rename to src/Admin/ThingsGateway.DB/SqlSugar/ISqlSugarEntitySeedData.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/SqlSugar/SeedDataUtil.cs b/src/Admin/ThingsGateway.DB/SqlSugar/SeedDataUtil.cs
similarity index 99%
rename from src/Admin/ThingsGateway.SqlSugar/SqlSugar/SeedDataUtil.cs
rename to src/Admin/ThingsGateway.DB/SqlSugar/SeedDataUtil.cs
index 45bfc1238..2a4e7affd 100644
--- a/src/Admin/ThingsGateway.SqlSugar/SqlSugar/SeedDataUtil.cs
+++ b/src/Admin/ThingsGateway.DB/SqlSugar/SeedDataUtil.cs
@@ -25,7 +25,7 @@ namespace ThingsGateway.Admin.Application;
/// 种子数据工具类
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class SeedDataUtil
+public static class SeedDataUtil
{
///
/// 获取List列表
diff --git a/src/Admin/ThingsGateway.SqlSugar/SqlSugar/SqlSugarOptions.cs b/src/Admin/ThingsGateway.DB/SqlSugar/SqlSugarOptions.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/SqlSugar/SqlSugarOptions.cs
rename to src/Admin/ThingsGateway.DB/SqlSugar/SqlSugarOptions.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Startup.cs b/src/Admin/ThingsGateway.DB/Startup.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Startup.cs
rename to src/Admin/ThingsGateway.DB/Startup.cs
diff --git a/src/Admin/ThingsGateway.SqlSugar/Static/UserManager.cs b/src/Admin/ThingsGateway.DB/Static/UserManager.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Static/UserManager.cs
rename to src/Admin/ThingsGateway.DB/Static/UserManager.cs
diff --git a/src/Admin/ThingsGateway.DB/ThingsGateway.DB.csproj b/src/Admin/ThingsGateway.DB/ThingsGateway.DB.csproj
new file mode 100644
index 000000000..8d68e82e9
--- /dev/null
+++ b/src/Admin/ThingsGateway.DB/ThingsGateway.DB.csproj
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ True
+
+
+ net8.0;net9.0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Admin/ThingsGateway.SqlSugar/Util/CommonUtils.cs b/src/Admin/ThingsGateway.DB/Util/CommonUtils.cs
similarity index 100%
rename from src/Admin/ThingsGateway.SqlSugar/Util/CommonUtils.cs
rename to src/Admin/ThingsGateway.DB/Util/CommonUtils.cs
diff --git a/src/Admin/ThingsGateway.Furion/App/App.cs b/src/Admin/ThingsGateway.Furion/App/App.cs
index 92ed0775b..f203af482 100644
--- a/src/Admin/ThingsGateway.Furion/App/App.cs
+++ b/src/Admin/ThingsGateway.Furion/App/App.cs
@@ -471,7 +471,7 @@ public static class App
IEnumerable pathOfExternalAssemblies = Array.Empty();
// 加载 appsettings.json 配置的外部程序集
- if (Settings.ExternalAssemblies != null && Settings.ExternalAssemblies.Length > 0)
+ if (Settings.ExternalAssemblies?.Length > 0)
{
var externalDlls = new List();
foreach (var item in Settings.ExternalAssemblies)
@@ -552,7 +552,7 @@ public static class App
}
// 处理排除的程序集
- if (Settings.ExcludeAssemblies != null && Settings.ExcludeAssemblies.Length > 0)
+ if (Settings.ExcludeAssemblies?.Length > 0)
{
scanAssemblies = scanAssemblies.Where(ass => !Settings.ExcludeAssemblies.Contains(ass.GetName().Name, StringComparer.OrdinalIgnoreCase));
}
diff --git a/src/Admin/ThingsGateway.Furion/App/Extensions/ObjectExtensions.cs b/src/Admin/ThingsGateway.Furion/App/Extensions/ObjectExtensions.cs
index 386fed9c7..9aa793338 100644
--- a/src/Admin/ThingsGateway.Furion/App/Extensions/ObjectExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/App/Extensions/ObjectExtensions.cs
@@ -455,7 +455,7 @@ public static class ObjectExtensions
foreach (var property in propertys)
{
var p = oldType.GetProperty(property.Name);
- if (property.CanWrite && p != null && p.CanRead)
+ if (property.CanWrite && p?.CanRead == true)
{
property.SetValue(o, ChangeType(p.GetValue(obj, null), property.PropertyType), null);
}
@@ -647,7 +647,7 @@ public static class ObjectExtensions
/// 实例,true 表示空集合,false 表示非空集合
internal static bool IsEmpty(this IEnumerable collection)
{
- return collection == null || !collection.Any();
+ return collection?.Any() != true;
}
diff --git a/src/Admin/ThingsGateway.Furion/AspNetCore/ModelBinders/Binders/FromConvertBinderProvider.cs b/src/Admin/ThingsGateway.Furion/AspNetCore/ModelBinders/Binders/FromConvertBinderProvider.cs
index da2dfc34b..409946fdb 100644
--- a/src/Admin/ThingsGateway.Furion/AspNetCore/ModelBinders/Binders/FromConvertBinderProvider.cs
+++ b/src/Admin/ThingsGateway.Furion/AspNetCore/ModelBinders/Binders/FromConvertBinderProvider.cs
@@ -54,8 +54,7 @@ public class FromConvertBinderProvider : IModelBinderProvider
// 判断是否定义 [FromConvert] 特性
if (context.Metadata is DefaultModelMetadata actMetadata
- && actMetadata.Attributes.ParameterAttributes != null
- && actMetadata.Attributes.ParameterAttributes.Count > 0
+ && actMetadata.Attributes.ParameterAttributes?.Count > 0
&& actMetadata.Attributes.ParameterAttributes.Any(u => u.GetType() == typeof(FromConvertAttribute)))
{
return new FromConvertBinder(_modelBinderConverts);
diff --git a/src/Admin/ThingsGateway.Furion/Authorization/Attributes/AppAuthorizeAttribute.cs b/src/Admin/ThingsGateway.Furion/Authorization/Attributes/AppAuthorizeAttribute.cs
index 424263ef2..16ed6b241 100644
--- a/src/Admin/ThingsGateway.Furion/Authorization/Attributes/AppAuthorizeAttribute.cs
+++ b/src/Admin/ThingsGateway.Furion/Authorization/Attributes/AppAuthorizeAttribute.cs
@@ -25,7 +25,7 @@ public sealed class AppAuthorizeAttribute : AuthorizeAttribute
/// 多个策略
public AppAuthorizeAttribute(params string[] policies)
{
- if (policies != null && policies.Length > 0) Policies = policies;
+ if (policies?.Length > 0) Policies = policies;
}
///
diff --git a/src/Admin/ThingsGateway.Furion/Components/Attributes/DependsOnAttribute.cs b/src/Admin/ThingsGateway.Furion/Components/Attributes/DependsOnAttribute.cs
index 276ee3834..6bcaf135c 100644
--- a/src/Admin/ThingsGateway.Furion/Components/Attributes/DependsOnAttribute.cs
+++ b/src/Admin/ThingsGateway.Furion/Components/Attributes/DependsOnAttribute.cs
@@ -47,7 +47,7 @@ public sealed class DependsOnAttribute : Attribute
var components = new List();
// 遍历所有依赖组件
- if (dependComponents != null && dependComponents.Length > 0)
+ if (dependComponents?.Length > 0)
{
foreach (var component in dependComponents)
{
@@ -102,7 +102,7 @@ public sealed class DependsOnAttribute : Attribute
var components = new List();
// 遍历所有依赖组件
- if (value != null && value.Length > 0)
+ if (value?.Length > 0)
{
foreach (var component in value)
{
diff --git a/src/Admin/ThingsGateway.Furion/CorsAccessor/Internal/Penetrates.cs b/src/Admin/ThingsGateway.Furion/CorsAccessor/Internal/Penetrates.cs
index 87376a99e..6f0615f68 100644
--- a/src/Admin/ThingsGateway.Furion/CorsAccessor/Internal/Penetrates.cs
+++ b/src/Admin/ThingsGateway.Furion/CorsAccessor/Internal/Penetrates.cs
@@ -65,7 +65,7 @@ internal static class Penetrates
IEnumerable exposedHeaders = corsAccessorSettings.FixedClientToken == true
? _defaultExposedHeaders
: Array.Empty();
- if (corsAccessorSettings.WithExposedHeaders != null && corsAccessorSettings.WithExposedHeaders.Length > 0)
+ if (corsAccessorSettings.WithExposedHeaders?.Length > 0)
{
exposedHeaders = exposedHeaders.Concat(corsAccessorSettings.WithExposedHeaders).Distinct(StringComparer.OrdinalIgnoreCase);
}
diff --git a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/AESEncryption.cs b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/AESEncryption.cs
index e727df64c..32171adf0 100644
--- a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/AESEncryption.cs
+++ b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/AESEncryption.cs
@@ -19,7 +19,7 @@ namespace ThingsGateway.DataEncryption;
/// AES 加解密
///
[SuppressSniffer]
-public class AESEncryption
+public static class AESEncryption
{
///
/// 加密
diff --git a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/DESEncryption.cs b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/DESEncryption.cs
index ed34e864b..d65db4e11 100644
--- a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/DESEncryption.cs
+++ b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/DESEncryption.cs
@@ -20,7 +20,7 @@ namespace ThingsGateway.DataEncryption;
/// DES 加解密
///
[SuppressSniffer]
-public class DESEncryption
+public static class DESEncryption
{
///
/// 加密
diff --git a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/KSortEncryption.cs b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/KSortEncryption.cs
index 99d17c7eb..71f30ea38 100644
--- a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/KSortEncryption.cs
+++ b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/KSortEncryption.cs
@@ -18,7 +18,7 @@ namespace ThingsGateway.DataEncryption;
/// KSort 加密(数据签名)
///
[SuppressSniffer]
-public class KSortEncryption
+public static class KSortEncryption
{
private static DateTime _timeStampStartTime = new(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
diff --git a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs
index 38f007549..053a2af68 100644
--- a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs
+++ b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs
@@ -17,7 +17,7 @@ namespace ThingsGateway.DataEncryption;
/// PBKDF2 加密
///
[SuppressSniffer]
-public class PBKDF2Encryption
+public static class PBKDF2Encryption
{
private const string SaltHashSeparator = ":";
diff --git a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/SHA1Encryption.cs b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/SHA1Encryption.cs
index 9ef9a64f4..8037614f1 100644
--- a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/SHA1Encryption.cs
+++ b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/SHA1Encryption.cs
@@ -18,7 +18,7 @@ namespace ThingsGateway.DataEncryption;
/// SHA1 加密
///
[SuppressSniffer]
-public class SHA1Encryption
+public static class SHA1Encryption
{
///
/// SHA1 加密
diff --git a/src/Admin/ThingsGateway.Furion/DataValidation/Attributes/DataValidationAttribute.cs b/src/Admin/ThingsGateway.Furion/DataValidation/Attributes/DataValidationAttribute.cs
index c5908fc6f..baa907344 100644
--- a/src/Admin/ThingsGateway.Furion/DataValidation/Attributes/DataValidationAttribute.cs
+++ b/src/Admin/ThingsGateway.Furion/DataValidation/Attributes/DataValidationAttribute.cs
@@ -18,6 +18,7 @@ namespace System.ComponentModel.DataAnnotations;
/// 数据类型验证特性
///
[SuppressSniffer]
+[AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
public sealed class DataValidationAttribute : ValidationAttribute
{
///
diff --git a/src/Admin/ThingsGateway.Furion/DependencyInjection/Extensions/DependencyInjectionServiceCollectionExtensions.cs b/src/Admin/ThingsGateway.Furion/DependencyInjection/Extensions/DependencyInjectionServiceCollectionExtensions.cs
index f77ba114e..3029ddf0b 100644
--- a/src/Admin/ThingsGateway.Furion/DependencyInjection/Extensions/DependencyInjectionServiceCollectionExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/DependencyInjection/Extensions/DependencyInjectionServiceCollectionExtensions.cs
@@ -215,7 +215,7 @@ public static class DependencyInjectionServiceCollectionExtensions
private static void AddDispatchProxy(IServiceCollection services, Type dependencyType, Type type, Type proxyType, Type inter, bool hasTarget = true)
{
proxyType ??= GlobalServiceProxyType;
- if (proxyType == null || (type != null && type.IsDefined(typeof(SuppressProxyAttribute), true))) return;
+ if (proxyType == null || (type?.IsDefined(typeof(SuppressProxyAttribute), true) == true)) return;
var lifetime = TryGetServiceLifetime(dependencyType);
diff --git a/src/Admin/ThingsGateway.Furion/DynamicApiController/Conventions/DynamicApiControllerApplicationModelConvention.cs b/src/Admin/ThingsGateway.Furion/DynamicApiController/Conventions/DynamicApiControllerApplicationModelConvention.cs
index 58ca1f379..d1530f6b1 100644
--- a/src/Admin/ThingsGateway.Furion/DynamicApiController/Conventions/DynamicApiControllerApplicationModelConvention.cs
+++ b/src/Admin/ThingsGateway.Furion/DynamicApiController/Conventions/DynamicApiControllerApplicationModelConvention.cs
@@ -220,8 +220,7 @@ internal sealed class DynamicApiControllerApplicationModelConvention : IApplicat
// 解决 Gitee 该 Issue:https://gitee.com/dotnetchina/Furion/issues/I59B74
if (CheckIsForceWithDefaultRoute(controllerApiDescriptionSettings)
&& !string.IsNullOrWhiteSpace(_dynamicApiControllerSettings.DefaultRoutePrefix)
- && controller.Selectors[0] != null
- && controller.Selectors[0].AttributeRouteModel != null
+ && controller.Selectors[0]?.AttributeRouteModel != null
&& !ForceWithDefaultPrefixRouteControllerTypes.Contains(controller.ControllerType))
{
// 读取模块
diff --git a/src/Admin/ThingsGateway.Furion/DynamicApiController/Extensions/DynamicApiControllerServiceCollectionExtensions.cs b/src/Admin/ThingsGateway.Furion/DynamicApiController/Extensions/DynamicApiControllerServiceCollectionExtensions.cs
index 32af1b237..8707a7197 100644
--- a/src/Admin/ThingsGateway.Furion/DynamicApiController/Extensions/DynamicApiControllerServiceCollectionExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/DynamicApiController/Extensions/DynamicApiControllerServiceCollectionExtensions.cs
@@ -126,7 +126,7 @@ public static class DynamicApiControllerServiceCollectionExtensions
{
var partManager = mvcBuilder.PartManager;
// 载入程序集部件
- if (partManager != null && assemblies != null && assemblies.Any())
+ if (partManager != null && assemblies?.Any() == true)
{
foreach (var assembly in assemblies)
{
diff --git a/src/Admin/ThingsGateway.Furion/DynamicApiController/Runtimes/DynamicApiRuntimeChangeProvider.cs b/src/Admin/ThingsGateway.Furion/DynamicApiController/Runtimes/DynamicApiRuntimeChangeProvider.cs
index 345b93033..9e358f749 100644
--- a/src/Admin/ThingsGateway.Furion/DynamicApiController/Runtimes/DynamicApiRuntimeChangeProvider.cs
+++ b/src/Admin/ThingsGateway.Furion/DynamicApiController/Runtimes/DynamicApiRuntimeChangeProvider.cs
@@ -48,7 +48,7 @@ internal sealed class DynamicApiRuntimeChangeProvider : IDynamicApiRuntimeChange
/// 程序集
public void AddAssemblies(params Assembly[] assemblies)
{
- if (assemblies != null && assemblies.Length > 0)
+ if (assemblies?.Length > 0)
{
foreach (var assembly in assemblies)
{
@@ -63,7 +63,7 @@ internal sealed class DynamicApiRuntimeChangeProvider : IDynamicApiRuntimeChange
/// 程序集
public void AddAssembliesWithNotifyChanges(params Assembly[] assemblies)
{
- if (assemblies != null && assemblies.Length > 0)
+ if (assemblies?.Length > 0)
{
AddAssemblies(assemblies);
NotifyChanges();
@@ -76,7 +76,7 @@ internal sealed class DynamicApiRuntimeChangeProvider : IDynamicApiRuntimeChange
/// 程序集名称
public void RemoveAssemblies(params string[] assemblyNames)
{
- if (assemblyNames != null && assemblyNames.Length > 0)
+ if (assemblyNames?.Length > 0)
{
foreach (var assemblyName in assemblyNames)
{
@@ -93,7 +93,7 @@ internal sealed class DynamicApiRuntimeChangeProvider : IDynamicApiRuntimeChange
/// 程序集
public void RemoveAssemblies(params Assembly[] assemblies)
{
- if (assemblies != null && assemblies.Length > 0)
+ if (assemblies?.Length > 0)
{
RemoveAssemblies(assemblies.Select(ass => ass.GetName().Name).ToArray());
}
@@ -105,7 +105,7 @@ internal sealed class DynamicApiRuntimeChangeProvider : IDynamicApiRuntimeChange
/// 程序集名称
public void RemoveAssembliesWithNotifyChanges(params string[] assemblyNames)
{
- if (assemblyNames != null && assemblyNames.Length > 0)
+ if (assemblyNames?.Length > 0)
{
RemoveAssemblies(assemblyNames);
NotifyChanges();
@@ -118,7 +118,7 @@ internal sealed class DynamicApiRuntimeChangeProvider : IDynamicApiRuntimeChange
/// 程序集
public void RemoveAssembliesWithNotifyChanges(params Assembly[] assemblies)
{
- if (assemblies != null && assemblies.Length > 0)
+ if (assemblies?.Length > 0)
{
RemoveAssemblies(assemblies);
NotifyChanges();
diff --git a/src/Admin/ThingsGateway.Furion/FriendlyException/Exceptions/AppFriendlyException.cs b/src/Admin/ThingsGateway.Furion/FriendlyException/Exceptions/AppFriendlyException.cs
index 1a125058b..bb6b9a754 100644
--- a/src/Admin/ThingsGateway.Furion/FriendlyException/Exceptions/AppFriendlyException.cs
+++ b/src/Admin/ThingsGateway.Furion/FriendlyException/Exceptions/AppFriendlyException.cs
@@ -49,6 +49,14 @@ public class AppFriendlyException : Exception
ErrorCode = OriginErrorCode = errorCode;
}
+ public AppFriendlyException(string? message) : base(message)
+ {
+ }
+
+ public AppFriendlyException(string? message, Exception? innerException) : base(message, innerException)
+ {
+ }
+
///
/// 错误码
///
diff --git a/src/Admin/ThingsGateway.Furion/FriendlyException/Retry.cs b/src/Admin/ThingsGateway.Furion/FriendlyException/Retry.cs
index 706484d27..0903dd2b5 100644
--- a/src/Admin/ThingsGateway.Furion/FriendlyException/Retry.cs
+++ b/src/Admin/ThingsGateway.Furion/FriendlyException/Retry.cs
@@ -102,7 +102,7 @@ public sealed class Retry
}
// 如果填写了 exceptionTypes 且异常类型不在 exceptionTypes 之内,则终止重试
- if (exceptionTypes != null && exceptionTypes.Length > 0 && !exceptionTypes.Any(u => u.IsAssignableFrom(ex.GetType())))
+ if (exceptionTypes?.Length > 0 && !exceptionTypes.Any(u => u.IsAssignableFrom(ex.GetType())))
{
if (finalThrow)
{
diff --git a/src/Admin/ThingsGateway.Furion/Logging/Implantations/Monitors/LoggingMonitorAttribute.cs b/src/Admin/ThingsGateway.Furion/Logging/Implantations/Monitors/LoggingMonitorAttribute.cs
index 4a80674d3..d6a673e4a 100644
--- a/src/Admin/ThingsGateway.Furion/Logging/Implantations/Monitors/LoggingMonitorAttribute.cs
+++ b/src/Admin/ThingsGateway.Furion/Logging/Implantations/Monitors/LoggingMonitorAttribute.cs
@@ -604,7 +604,7 @@ public sealed class LoggingMonitorAttribute : Attribute, IAsyncActionFilter, IAs
private string TrySerializeObject(object obj, LoggingMonitorMethod monitorMethod, out bool succeed)
{
// 排除 IQueryable<> 泛型
- if (obj != null && obj.GetType().HasImplementedRawGeneric(typeof(IQueryable<>)))
+ if (obj?.GetType().HasImplementedRawGeneric(typeof(IQueryable<>)) == true)
{
succeed = true;
return "{}";
@@ -961,8 +961,7 @@ public sealed class LoggingMonitorAttribute : Attribute, IAsyncActionFilter, IAs
// token 信息
// 判断是否是授权访问
var isAuth = actionMethod.GetFoundAttribute(true) == null
- && resultHttpContext.User != null
- && resultHttpContext.User.Identity.IsAuthenticated;
+ && resultHttpContext.User?.Identity.IsAuthenticated == true;
// 获取响应头信息
var accessToken = resultHttpContext.Response.Headers["access-token"].ToString();
var authorization = string.IsNullOrWhiteSpace(accessToken)
diff --git a/src/Admin/ThingsGateway.Furion/Logging/Internal/StringLoggingPartSetters.cs b/src/Admin/ThingsGateway.Furion/Logging/Internal/StringLoggingPartSetters.cs
index b35a2951c..c0558d01d 100644
--- a/src/Admin/ThingsGateway.Furion/Logging/Internal/StringLoggingPartSetters.cs
+++ b/src/Admin/ThingsGateway.Furion/Logging/Internal/StringLoggingPartSetters.cs
@@ -47,7 +47,7 @@ public sealed partial class StringLoggingPart
///
public StringLoggingPart SetArgs(params object[] args)
{
- if (args != null && args.Length > 0) Args = args;
+ if (args?.Length > 0) Args = args;
return this;
}
diff --git a/src/Admin/ThingsGateway.Furion/ObjectMapper/Extensions/ObjectMapperServiceCollectionExtensions.cs b/src/Admin/ThingsGateway.Furion/ObjectMapper/Extensions/ObjectMapperServiceCollectionExtensions.cs
index 5c5323dd8..36893adc4 100644
--- a/src/Admin/ThingsGateway.Furion/ObjectMapper/Extensions/ObjectMapperServiceCollectionExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/ObjectMapper/Extensions/ObjectMapperServiceCollectionExtensions.cs
@@ -47,7 +47,7 @@ public static class ObjectMapperServiceCollectionExtensions
var config = TypeAdapterConfig.GlobalSettings;
// 扫描所有继承 IRegister 接口的对象映射配置
- if (assemblies != null && assemblies.Length > 0) config.Scan(assemblies);
+ if (assemblies?.Length > 0) config.Scan(assemblies);
// 配置支持依赖注入
services.AddSingleton(config);
diff --git a/src/Admin/ThingsGateway.Furion/Schedule/Builders/SchedulerBuilder.cs b/src/Admin/ThingsGateway.Furion/Schedule/Builders/SchedulerBuilder.cs
index 0ef606eb5..9a688409f 100644
--- a/src/Admin/ThingsGateway.Furion/Schedule/Builders/SchedulerBuilder.cs
+++ b/src/Admin/ThingsGateway.Furion/Schedule/Builders/SchedulerBuilder.cs
@@ -235,7 +235,7 @@ public sealed class SchedulerBuilder
var schedulerBuilder = new SchedulerBuilder(jobBuilder);
// 批量添加触发器
- if (triggerBuilders != null && triggerBuilders.Length > 0)
+ if (triggerBuilders?.Length > 0)
{
schedulerBuilder.TriggerBuilders.AddRange(triggerBuilders);
}
diff --git a/src/Admin/ThingsGateway.Furion/Schedule/Extensions/ScheduleExtensions.cs b/src/Admin/ThingsGateway.Furion/Schedule/Extensions/ScheduleExtensions.cs
index 4ac714afb..92a0cfb9f 100644
--- a/src/Admin/ThingsGateway.Furion/Schedule/Extensions/ScheduleExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/Schedule/Extensions/ScheduleExtensions.cs
@@ -192,7 +192,7 @@ public static class ScheduleExtensions
var underScoreCasePropertyName = Penetrates.GetNaming(propertyName, NamingConventions.UnderScoreCase);
// 处理忽略属性问题
- if (ignorePropertyNames != null && ignorePropertyNames.Length > 0)
+ if (ignorePropertyNames?.Length > 0)
{
if (ignorePropertyNames.Contains(propertyName, StringComparer.OrdinalIgnoreCase)
|| ignorePropertyNames.Contains(camelCasePropertyName, StringComparer.OrdinalIgnoreCase)
diff --git a/src/Admin/ThingsGateway.Furion/Schedule/HostedServices/ScheduleHostedService.cs b/src/Admin/ThingsGateway.Furion/Schedule/HostedServices/ScheduleHostedService.cs
index d40b4ef89..3831f824a 100644
--- a/src/Admin/ThingsGateway.Furion/Schedule/HostedServices/ScheduleHostedService.cs
+++ b/src/Admin/ThingsGateway.Furion/Schedule/HostedServices/ScheduleHostedService.cs
@@ -327,7 +327,7 @@ internal sealed class ScheduleHostedService : BackgroundService
};
// 是否定义 FallbackAsync 方法
- var isDefinedFallbackAsyncMethod = jobHandler != null && jobHandler.GetType().GetMethod(nameof(IJob.FallbackAsync)
+ var isDefinedFallbackAsyncMethod = jobHandler?.GetType().GetMethod(nameof(IJob.FallbackAsync)
, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly
, null
, new[] { typeof(JobExecutedContext), typeof(CancellationToken) }
diff --git a/src/Admin/ThingsGateway.Furion/Schedule/Http/HttpJob.cs b/src/Admin/ThingsGateway.Furion/Schedule/Http/HttpJob.cs
index 38c70c701..ea1590ae0 100644
--- a/src/Admin/ThingsGateway.Furion/Schedule/Http/HttpJob.cs
+++ b/src/Admin/ThingsGateway.Furion/Schedule/Http/HttpJob.cs
@@ -101,7 +101,7 @@ public class HttpJob : IJob
}
// 添加请求头
- if (httpJobMessage.Headers != null && httpJobMessage.Headers.Count > 0)
+ if (httpJobMessage.Headers?.Count > 0)
{
foreach (var (name, value) in httpJobMessage.Headers)
{
diff --git a/src/Admin/ThingsGateway.Furion/SpecificationDocument/Builders/SpecificationDocumentBuilder.cs b/src/Admin/ThingsGateway.Furion/SpecificationDocument/Builders/SpecificationDocumentBuilder.cs
index df10d78cf..c3cf35755 100644
--- a/src/Admin/ThingsGateway.Furion/SpecificationDocument/Builders/SpecificationDocumentBuilder.cs
+++ b/src/Admin/ThingsGateway.Furion/SpecificationDocument/Builders/SpecificationDocumentBuilder.cs
@@ -711,7 +711,7 @@ public static class SpecificationDocumentBuilder
.Union(
actions.SelectMany(u => GetActionGroups(u))
)
- .Where(u => u != null && u.Visible)
+ .Where(u => u?.Visible == true)
// 分组后取最大排序
.GroupBy(u => u.Group)
.Select(u => new GroupExtraInfo
diff --git a/src/Admin/ThingsGateway.Furion/Templates/TP.cs b/src/Admin/ThingsGateway.Furion/Templates/TP.cs
index c65c9ddf9..96ce12aa1 100644
--- a/src/Admin/ThingsGateway.Furion/Templates/TP.cs
+++ b/src/Admin/ThingsGateway.Furion/Templates/TP.cs
@@ -47,7 +47,7 @@ public static class TP
}
// 添加项
- if (items != null && items.Length > 0)
+ if (items?.Length > 0)
{
var propMaxLength = items.Where(u => _lazyRegex.Value.IsMatch(u))
.DefaultIfEmpty(string.Empty)
diff --git a/src/Admin/ThingsGateway.Furion/TimeCrontab/Crontab.Internal.cs b/src/Admin/ThingsGateway.Furion/TimeCrontab/Crontab.Internal.cs
index 9898ffddb..0ba062fd3 100644
--- a/src/Admin/ThingsGateway.Furion/TimeCrontab/Crontab.Internal.cs
+++ b/src/Admin/ThingsGateway.Furion/TimeCrontab/Crontab.Internal.cs
@@ -343,7 +343,7 @@ public partial class Crontab
// 如果存在且唯一,则进入下一轮判断
// 接下来的判断是处理 SUN + L 的情况,如 SUNL == 0L == SUNDAY,它们都是合法的 Cron 值
- if (replaceVal != null && replaceVal.Count == 1)
+ if (replaceVal?.Count == 1)
{
var missingParser = "";
diff --git a/src/Admin/ThingsGateway.Furion/UnifyResult/UnifyContext.cs b/src/Admin/ThingsGateway.Furion/UnifyResult/UnifyContext.cs
index 975a7af66..8a7f0d2aa 100644
--- a/src/Admin/ThingsGateway.Furion/UnifyResult/UnifyContext.cs
+++ b/src/Admin/ThingsGateway.Furion/UnifyResult/UnifyContext.cs
@@ -140,10 +140,10 @@ public static class UnifyContext
if (unifyResultSettings == null) return;
// 篡改响应状态码
- if (unifyResultSettings.AdaptStatusCodes != null && unifyResultSettings.AdaptStatusCodes.Length > 0)
+ if (unifyResultSettings.AdaptStatusCodes?.Length > 0)
{
var adaptStatusCode = unifyResultSettings.AdaptStatusCodes.FirstOrDefault(u => u[0] == statusCode);
- if (adaptStatusCode != null && adaptStatusCode.Length > 0 && adaptStatusCode[0] > 0)
+ if (adaptStatusCode?.Length > 0 && adaptStatusCode[0] > 0)
{
context.Response.StatusCode = adaptStatusCode[1];
return;
diff --git a/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/TypeExtensions.cs b/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/TypeExtensions.cs
index d9ff4ac72..4a2ebc1ca 100644
--- a/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/TypeExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/TypeExtensions.cs
@@ -139,8 +139,7 @@ internal static class TypeExtensions
}
// 类型限定名是否以 <> 开头且以 AnonymousType 结尾
- return type.FullName is not null
- && type.FullName.StartsWith("<>")
+ return type.FullName?.StartsWith("<>") == true
&& type.FullName.Contains("AnonymousType");
}
@@ -463,7 +462,7 @@ internal static class TypeExtensions
var elementType = type.GetElementType();
// 检查元素类型是否是 KeyValuePair<,> 类型
- if (elementType is null || !elementType.IsKeyValuePair())
+ if (elementType?.IsKeyValuePair() != true)
{
return false;
}
diff --git a/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/V5_ObjectExtensions.cs b/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/V5_ObjectExtensions.cs
index a3cff3a2e..15a6117e9 100644
--- a/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/V5_ObjectExtensions.cs
+++ b/src/Admin/ThingsGateway.Furion/V5_Experience/Core/Extensions/V5_ObjectExtensions.cs
@@ -135,7 +135,7 @@ internal static class V5_ObjectExtensions
var runtimeProperty = obj.GetType().GetRuntimeProperty("Count");
// 反射获取 Count 属性值
- if (runtimeProperty is not null && runtimeProperty.CanRead && runtimeProperty.PropertyType == typeof(int))
+ if (runtimeProperty?.CanRead == true && runtimeProperty.PropertyType == typeof(int))
{
count = (int)runtimeProperty.GetValue(obj)!;
return true;
@@ -332,7 +332,7 @@ internal static class V5_ObjectExtensions
var property = current.GetType().GetProperty(part, bindingFlags);
// 空检查
- if (property is null || !property.CanRead)
+ if (property?.CanRead != true)
{
return null;
}
diff --git a/src/Admin/ThingsGateway.Furion/V5_Experience/HttpRemote/Builders/HttpRequestBuilder.Methods.cs b/src/Admin/ThingsGateway.Furion/V5_Experience/HttpRemote/Builders/HttpRequestBuilder.Methods.cs
index bb13838e9..529642fea 100644
--- a/src/Admin/ThingsGateway.Furion/V5_Experience/HttpRemote/Builders/HttpRequestBuilder.Methods.cs
+++ b/src/Admin/ThingsGateway.Furion/V5_Experience/HttpRemote/Builders/HttpRequestBuilder.Methods.cs
@@ -1591,7 +1591,7 @@ public sealed partial class HttpRequestBuilder
public HttpRequestBuilder SetBaseAddress(Uri? baseAddress)
{
// 检查基地址是否是绝对路径地址
- if (baseAddress is not null && !baseAddress.IsAbsoluteUri)
+ if (baseAddress?.IsAbsoluteUri == false)
{
throw new ArgumentException("The base address must be absolute.", nameof(baseAddress));
}
diff --git a/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Events.cs b/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Events.cs
index a3639d1eb..5a2e1bade 100644
--- a/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Events.cs
+++ b/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Events.cs
@@ -136,7 +136,7 @@ public partial class Clay
{
handler(this, new ClayEventArgs(identifier, Contains(identifier)));
}
- catch (Exception)
+ catch
{
// ignored
}
diff --git a/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Exports.cs b/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Exports.cs
index 90d5dc38c..eef58ab7f 100644
--- a/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Exports.cs
+++ b/src/Admin/ThingsGateway.Furion/V5_Experience/Shapeless/Clay/Clay.Exports.cs
@@ -177,15 +177,6 @@ public partial class Clay
enumerableClay = this;
}
- ///
- ///
- /// dynamic 类型的
- ///
- ///
- ///
- ///
- ///
- ///
public void Deconstruct(out dynamic clay, out IEnumerable enumerableClay, out Clay rawClay)
{
clay = this;
@@ -888,7 +879,7 @@ public partial class Clay
foreach (var item in values)
{
// 检查值是否为空值或基本类型的值
- if (item is null || item.GetType().IsBasicType())
+ if (item?.GetType().IsBasicType() != false)
{
throw new InvalidOperationException("Cannot extend a single object with null or basic type values.");
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Attributes/MinValueAttribute.cs b/src/Admin/ThingsGateway.NewLife.X/Attributes/MinValueAttribute.cs
index 6040f62c7..c7717f1f8 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Attributes/MinValueAttribute.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Attributes/MinValueAttribute.cs
@@ -12,9 +12,11 @@ using System.ComponentModel.DataAnnotations;
namespace ThingsGateway;
+
///
/// 最小值校验
///
+[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class MinValueAttribute : ValidationAttribute
{
///
diff --git a/src/Admin/ThingsGateway.NewLife.X/Buffers/SpanReader.cs b/src/Admin/ThingsGateway.NewLife.X/Buffers/SpanReader.cs
index 1e56db88a..17590de8d 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Buffers/SpanReader.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Buffers/SpanReader.cs
@@ -244,7 +244,6 @@ public ref struct SpanReader
while (true)
{
var bt = ReadByte();
- if (bt < 0) throw new Exception($"The data stream is out of range! The integer read is {rs: n0}");
b = (Byte)bt;
// 必须转为Int32,否则可能溢出
diff --git a/src/Admin/ThingsGateway.NewLife.X/Caching/MemoryCache.cs b/src/Admin/ThingsGateway.NewLife.X/Caching/MemoryCache.cs
index 81076244d..b8df8e09d 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Caching/MemoryCache.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Caching/MemoryCache.cs
@@ -120,7 +120,7 @@ public class MemoryCache : Cache
/// 是否包含缓存项
///
///
- public override Boolean ContainsKey(String key) => _cache.TryGetValue(key, out var item) && item != null && !item.Expired;
+ public override Boolean ContainsKey(String key) => _cache.TryGetValue(key, out var item) && item?.Expired == false;
/// 添加缓存项,已存在时更新
/// 值类型
@@ -166,7 +166,7 @@ public class MemoryCache : Cache
[return: MaybeNull]
public override T Get(String key)
{
- if (!_cache.TryGetValue(key, out var item) || item == null || item.Expired) return default;
+ if (!_cache.TryGetValue(key, out var item) || item?.Expired != false) return default;
return item.Visit();
}
@@ -712,7 +712,7 @@ public class MemoryCache : Cache
for (var i = 0; i < slist.Count && over > 0; i++)
{
var ss = slist.Values[i];
- if (ss != null && ss.Count > 0)
+ if (ss?.Count > 0)
{
foreach (var item in ss)
{
diff --git a/src/Admin/ThingsGateway.NewLife.X/Collections/ObjectPool.cs b/src/Admin/ThingsGateway.NewLife.X/Collections/ObjectPool.cs
index 93d72b3ae..c71ac53ea 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Collections/ObjectPool.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Collections/ObjectPool.cs
@@ -402,7 +402,7 @@ public class ObjectPool : DisposeBase, IPool where T : notnull
///
public void WriteLog(String format, params Object?[] args)
{
- if (Log == null || !Log.Enable) return;
+ if (Log?.Enable != true) return;
Log.Info(Name + "." + format, args);
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Common/FileUtil.cs b/src/Admin/ThingsGateway.NewLife.X/Common/FileUtil.cs
index 0c499480e..b8dba675f 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Common/FileUtil.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Common/FileUtil.cs
@@ -15,7 +15,7 @@ namespace ThingsGateway.NewLife;
///
/// FileUtil
///
-public class FileUtil
+public static class FileUtil
{
///
/// 读取文件
diff --git a/src/Admin/ThingsGateway.NewLife.X/Common/MachineInfo.cs b/src/Admin/ThingsGateway.NewLife.X/Common/MachineInfo.cs
index b1c47572b..fed41f0fc 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Common/MachineInfo.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Common/MachineInfo.cs
@@ -633,7 +633,7 @@ public class MachineInfo
if (!_excludes.Contains(nameof(Temperature)))
{
var temp = ReadWmic(@"/namespace:\\root\wmi path MSAcpi_ThermalZoneTemperature", "CurrentTemperature");
- if (temp != null && temp.Count > 0)
+ if (temp?.Count > 0)
{
if (temp.TryGetValue("CurrentTemperature", out var str) && !str.IsNullOrEmpty())
Temperature = (str.SplitAsInt().Average() - 2732) / 10.0;
@@ -651,7 +651,7 @@ public class MachineInfo
else if (!_excludes.Contains(nameof(Battery)))
{
var battery = ReadWmic("path win32_battery", "EstimatedChargeRemaining");
- if (battery != null && battery.Count > 0)
+ if (battery?.Count > 0)
{
if (battery.TryGetValue("EstimatedChargeRemaining", out var str) && !str.IsNullOrEmpty())
Battery = str.SplitAsInt().Average() / 100.0;
@@ -937,7 +937,7 @@ public class MachineInfo
foreach (var item in ss)
{
var ks = item?.Split('=');
- if (ks != null && ks.Length >= 2)
+ if (ks?.Length >= 2)
{
var k = ks[0].Trim();
var v = ks[1].Trim().TrimInvisible();
@@ -1079,7 +1079,7 @@ public class MachineInfo
if (root.IsNullOrEmpty()) return 0;
var driveInfo = new DriveInfo(root);
- if (driveInfo == null || !driveInfo.IsReady) return -1;
+ if (driveInfo?.IsReady != true) return -1;
try
{
diff --git a/src/Admin/ThingsGateway.NewLife.X/Common/PinYin.cs b/src/Admin/ThingsGateway.NewLife.X/Common/PinYin.cs
index 2602c5d42..0135da99d 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Common/PinYin.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Common/PinYin.cs
@@ -6,7 +6,7 @@ namespace ThingsGateway.NewLife.Common;
///
/// 文档 https://newlifex.com/core/pinyin
///
-public class PinYin
+public static class PinYin
{
#region 数组信息
private static readonly Int32[] pyValue = new[] {
diff --git a/src/Admin/ThingsGateway.NewLife.X/Common/Runtime.cs b/src/Admin/ThingsGateway.NewLife.X/Common/Runtime.cs
index f8f8b02c7..6b65be0f1 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Common/Runtime.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Common/Runtime.cs
@@ -199,7 +199,7 @@ public static class Runtime
if (processId != ProcessId) gc = false;
var log = XTrace.Log;
- if (log != null && log.Enable && log.Level <= LogLevel.Debug)
+ if (log?.Enable == true && log.Level <= LogLevel.Debug)
{
p ??= Process.GetCurrentProcess();
var gcm = GC.GetTotalMemory(false) / 1024;
@@ -243,7 +243,7 @@ public static class Runtime
}
}
- if (log != null && log.Enable && log.Level <= LogLevel.Debug)
+ if (log?.Enable == true && log.Level <= LogLevel.Debug)
{
p ??= Process.GetProcessById(processId);
p.Refresh();
diff --git a/src/Admin/ThingsGateway.NewLife.X/Configuration/ConfigHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Configuration/ConfigHelper.cs
index 90a21aece..f5d2ccbc7 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Configuration/ConfigHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Configuration/ConfigHelper.cs
@@ -108,7 +108,7 @@ public static class ConfigHelper
dic[cfg.Key] = cfg.Value;
- if (cfg.Childs != null && cfg.Childs.Count > 0)
+ if (cfg.Childs?.Count > 0)
dic[cfg.Key] = cfg.Childs;
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Configuration/IConfigSection.cs b/src/Admin/ThingsGateway.NewLife.X/Configuration/IConfigSection.cs
index a4245d64f..582af4852 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Configuration/IConfigSection.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Configuration/IConfigSection.cs
@@ -54,6 +54,6 @@ public class ConfigSection : IConfigSection
/// 已重载。
///
- public override String ToString() => Childs != null && Childs.Count > 0 ? $"{Key}[{Childs.Count}]" : $"{Key}={Value}";
+ public override String ToString() => Childs?.Count > 0 ? $"{Key}[{Childs.Count}]" : $"{Key}={Value}";
#endregion
}
\ No newline at end of file
diff --git a/src/Admin/ThingsGateway.NewLife.X/Configuration/IniConfigProvider.cs b/src/Admin/ThingsGateway.NewLife.X/Configuration/IniConfigProvider.cs
index a3c65f1db..d91cf392c 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Configuration/IniConfigProvider.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Configuration/IniConfigProvider.cs
@@ -75,7 +75,7 @@ public class InIConfigProvider : FileConfigProvider
var sb = new StringBuilder();
foreach (var item in section.Childs.ToArray())
{
- if (item.Childs != null && item.Childs.Count > 0)
+ if (item.Childs?.Count > 0)
{
// 段前空一行
sb.AppendLine();
diff --git a/src/Admin/ThingsGateway.NewLife.X/Event/WeakAction.cs b/src/Admin/ThingsGateway.NewLife.X/Event/WeakAction.cs
index 0a30f6b30..214dc1969 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Event/WeakAction.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Event/WeakAction.cs
@@ -41,7 +41,7 @@ public class WeakAction
var target = Target;
if (target == null && Method.IsStatic) return true;
- return target != null && target.IsAlive;
+ return target?.IsAlive == true;
}
}
#endregion
diff --git a/src/Admin/ThingsGateway.NewLife.X/Extension/DateExtensions.cs b/src/Admin/ThingsGateway.NewLife.X/Extension/DateExtensions.cs
index 717361690..6bff46f59 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Extension/DateExtensions.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Extension/DateExtensions.cs
@@ -65,7 +65,7 @@ public static class DateExtensions
/// 开始时间
/// 结束时间
/// 时间差
- public static string GetDiffTime(this in DateTime beginTime, in DateTime endTime)
+ public static string GetDiffTime(this DateTime beginTime, DateTime endTime)
{
TimeSpan timeDifference = endTime - beginTime;
if (timeDifference.TotalDays >= 1)
@@ -88,7 +88,7 @@ public static class DateExtensions
/// 开始时间
/// 结束时间
/// 时间差
- public static string GetDiffTime(this in DateTimeOffset beginTime, in DateTimeOffset endTime)
+ public static string GetDiffTime(this DateTimeOffset beginTime, DateTimeOffset endTime)
{
TimeSpan timeDifference = endTime - beginTime;
if (timeDifference.TotalDays >= 1)
@@ -108,7 +108,7 @@ public static class DateExtensions
///
/// 返回yyyy-MM-ddTHH:mm:ss.fffffffzzz时间格式字符串
///
- public static string ToDefaultDateTimeFormat(this in DateTime dt, TimeSpan offset)
+ public static string ToDefaultDateTimeFormat(this DateTime dt, TimeSpan offset)
{
if (dt.Kind == DateTimeKind.Utc)
return new DateTimeOffset(dt.ToLocalTime(), offset).ToString("yyyy-MM-ddTHH:mm:ss.fffffffzzz");
@@ -129,7 +129,7 @@ public static class DateExtensions
///
/// 返回yyyy-MM-ddTHH:mm:ss.fffffffzzz时间格式字符串
///
- public static string ToDefaultDateTimeFormat(this in DateTime dt)
+ public static string ToDefaultDateTimeFormat(this DateTime dt)
{
return dt.ToString("yyyy-MM-ddTHH:mm:ss.fffffffzzz");
}
@@ -137,7 +137,7 @@ public static class DateExtensions
///
/// 返回yyyy-MM-dd HH-mm-ss-fff zz时间格式字符串
///
- public static string ToFileDateTimeFormat(this in DateTime dt)
+ public static string ToFileDateTimeFormat(this DateTime dt)
{
return ToDefaultDateTimeFormat(dt).Replace(":", "-");
}
@@ -145,7 +145,7 @@ public static class DateExtensions
///
/// 返回yyyy-MM-dd HH-mm-ss-fff zz时间格式字符串
///
- public static string ToFileDateTimeFormat(this in DateTime dt, TimeSpan offset)
+ public static string ToFileDateTimeFormat(this DateTime dt, TimeSpan offset)
{
return ToDefaultDateTimeFormat(dt, offset).Replace(":", "-");
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Extension/EndPointExtensions.cs b/src/Admin/ThingsGateway.NewLife.X/Extension/EndPointExtensions.cs
index 45312254d..79e547577 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Extension/EndPointExtensions.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Extension/EndPointExtensions.cs
@@ -6,31 +6,18 @@ namespace ThingsGateway.NewLife.Extension;
/// 网络结点扩展
public static class EndPointExtensions
{
- ///
- ///
- ///
- ///
- ///
public static String ToAddress(this EndPoint endpoint)
{
return ((IPEndPoint)endpoint).ToAddress();
}
- ///
- ///
- ///
- ///
- ///
+
public static String ToAddress(this IPEndPoint endpoint)
{
return String.Format("{0}:{1}", endpoint.Address, endpoint.Port);
}
private static readonly String[] SplitColon = new String[] { ":" };
- ///
- ///
- ///
- ///
- ///
+
public static IPEndPoint ToEndPoint(this String address)
{
var array = address.Split(SplitColon, StringSplitOptions.RemoveEmptyEntries);
@@ -44,11 +31,7 @@ public static class EndPointExtensions
}
private static readonly String[] SplitComma = new String[] { "," };
- ///
- ///
- ///
- ///
- ///
+
public static IEnumerable ToEndPoints(this String addresses)
{
var array = addresses.Split(SplitComma, StringSplitOptions.RemoveEmptyEntries);
diff --git a/src/Admin/ThingsGateway.NewLife.X/Extension/ProcessHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Extension/ProcessHelper.cs
index 763a05baa..9ff38c12a 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Extension/ProcessHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Extension/ProcessHelper.cs
@@ -24,7 +24,7 @@ public static class ProcessHelper
if (pname == "dotnet" || "*/dotnet".IsMatch(pname))
{
var args = GetCommandLineArgs(process.Id);
- if (args != null && args.Length >= 2 && args[0].Contains("dotnet"))
+ if (args?.Length >= 2 && args[0].Contains("dotnet"))
{
return Path.GetFileNameWithoutExtension(args[1]);
}
@@ -32,7 +32,7 @@ public static class ProcessHelper
if (pname == "java" || "*/java".IsMatch(pname))
{
var args = GetCommandLineArgs(process.Id);
- if (args != null && args.Length >= 3 && args[0].Contains("java") && args[1] == "-jar")
+ if (args?.Length >= 3 && args[0].Contains("java") && args[1] == "-jar")
{
return Path.GetFileNameWithoutExtension(args[2]);
}
@@ -210,7 +210,7 @@ public static class ProcessHelper
///
public static Process? SafetyKill(this Process process, Int32 msWait = 5_000, Int32 times = 50, Int32 interval = 200)
{
- if (process == null || process.GetHasExited()) return process;
+ if (process?.GetHasExited() != false) return process;
//XTrace.WriteLine("安全,温柔一刀!PID={0}/{1}", process.Id, process.ProcessName);
@@ -248,7 +248,7 @@ public static class ProcessHelper
///
public static Process? ForceKill(this Process process, Int32 msWait = 5_000)
{
- if (process == null || process.GetHasExited()) return process;
+ if (process?.GetHasExited() != false) return process;
//XTrace.WriteLine("强杀,大力出奇迹!PID={0}/{1}", process.Id, process.ProcessName);
diff --git a/src/Admin/ThingsGateway.NewLife.X/Extension/StringHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Extension/StringHelper.cs
index 6e44d7783..a46d41162 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Extension/StringHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Extension/StringHelper.cs
@@ -137,7 +137,7 @@ public static class StringHelper
public static IDictionary SplitAsDictionary(this String? value, String nameValueSeparator = "=", String separator = ";", Boolean trimQuotation = false)
{
var dic = new NullableDictionary(StringComparer.OrdinalIgnoreCase);
- if (value == null || value.IsNullOrWhiteSpace()) return dic;
+ if (value?.IsNullOrWhiteSpace() != false) return dic;
if (nameValueSeparator.IsNullOrEmpty()) nameValueSeparator = "=";
//if (separator == null || separator.Length <= 0) separator = new String[] { ",", ";" };
@@ -515,7 +515,7 @@ public static class StringHelper
p += after.Length;
// 记录位置
- if (positions != null && positions.Length > 0) positions[0] = p;
+ if (positions?.Length > 0) positions[0] = p;
}
if (String.IsNullOrEmpty(before)) return str[p..];
@@ -524,7 +524,7 @@ public static class StringHelper
if (f < 0) return String.Empty;
// 记录位置
- if (positions != null && positions.Length > 1) positions[1] = f;
+ if (positions?.Length > 1) positions[1] = f;
if (p >= 0)
return str[p..f];
@@ -770,7 +770,7 @@ public static class StringHelper
{
var rs = new List>();
- if (list == null || !list.Any()) return rs;
+ if (list?.Any() != true) return rs;
if (keys.IsNullOrWhiteSpace()) return rs;
if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));
@@ -825,7 +825,7 @@ public static class StringHelper
{
var rs = new List>();
- if (list == null || !list.Any()) return rs;
+ if (list?.Any() != true) return rs;
if (keys.IsNullOrWhiteSpace()) return rs;
if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));
diff --git a/src/Admin/ThingsGateway.NewLife.X/IO/ExcelReader.cs b/src/Admin/ThingsGateway.NewLife.X/IO/ExcelReader.cs
index a770a1daf..ddeb12cb5 100644
--- a/src/Admin/ThingsGateway.NewLife.X/IO/ExcelReader.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/IO/ExcelReader.cs
@@ -110,7 +110,7 @@ public class ExcelReader : DisposeBase
// 加快样式判断速度
var styles = _styles;
- if (styles != null && styles.Length == 0) styles = null;
+ if (styles?.Length == 0) styles = null;
foreach (var row in data.Elements())
{
@@ -139,7 +139,7 @@ public class ExcelReader : DisposeBase
// t=DataType, s=SharedString, b=Boolean, n=Number, d=Date
var t = col.Attribute("t");
- if (t != null && t.Value == "s")
+ if (t?.Value == "s")
{
val = _sharedStrings?[val.ToInt()];
}
@@ -153,7 +153,7 @@ public class ExcelReader : DisposeBase
if (si < styles.Length)
{
var st = styles[si];
- if (st != null && st.StartsWith("yy"))
+ if (st?.StartsWith("yy") == true)
{
if (val.Contains('.'))
{
diff --git a/src/Admin/ThingsGateway.NewLife.X/IO/FileSource.cs b/src/Admin/ThingsGateway.NewLife.X/IO/FileSource.cs
index bc8b92bd8..1e2c49800 100644
--- a/src/Admin/ThingsGateway.NewLife.X/IO/FileSource.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/IO/FileSource.cs
@@ -122,7 +122,7 @@ namespace ThingsGateway.NewLife.IO
var name = String.Empty;
if (asm == null) asm = Assembly.GetCallingAssembly();
var ss = asm.GetManifestResourceNames();
- if (ss != null && ss.Length > 0)
+ if (ss?.Length > 0)
{
//找到资源名
name = ss.FirstOrDefault(e => e == filename);
diff --git a/src/Admin/ThingsGateway.NewLife.X/IO/IOHelper.cs b/src/Admin/ThingsGateway.NewLife.X/IO/IOHelper.cs
index 4691932af..389ab6363 100644
--- a/src/Admin/ThingsGateway.NewLife.X/IO/IOHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/IO/IOHelper.cs
@@ -155,7 +155,7 @@ public static class IOHelper
///
public static Stream Write(this Stream des, params Byte[] src)
{
- if (src != null && src.Length > 0) des.Write(src, 0, src.Length);
+ if (src?.Length > 0) des.Write(src, 0, src.Length);
return des;
}
@@ -343,7 +343,7 @@ public static class IOHelper
// 可能数据流前面有编码字节序列,需要先去掉
var idx = 0;
var preamble = encoding.GetPreamble();
- if (preamble != null && preamble.Length > 0)
+ if (preamble?.Length > 0)
{
if (buf.Take(preamble.Length).SequenceEqual(preamble)) idx = preamble.Length;
}
@@ -368,7 +368,7 @@ public static class IOHelper
// 可能数据流前面有编码字节序列,需要先去掉
var idx = 0;
var preamble = encoding.GetPreamble();
- if (preamble != null && preamble.Length > 0 && buf.Length >= offset + preamble.Length)
+ if (preamble?.Length > 0 && buf.Length >= offset + preamble.Length)
{
if (buf.Skip(offset).Take(preamble.Length).SequenceEqual(preamble)) idx = preamble.Length;
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/IO/PathHelper.cs b/src/Admin/ThingsGateway.NewLife.X/IO/PathHelper.cs
index b4fd4bf7a..026e0b559 100644
--- a/src/Admin/ThingsGateway.NewLife.X/IO/PathHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/IO/PathHelper.cs
@@ -278,7 +278,7 @@ public static class PathHelper
public static Boolean CopyToIfNewer(this FileInfo fi, String destFileName)
{
// 源文件必须存在
- if (fi == null || !fi.Exists) return false;
+ if (fi?.Exists != true) return false;
var dest = destFileName.AsFile();
// 目标文件必须存在且源文件较新
@@ -425,7 +425,7 @@ public static class PathHelper
///
public static IEnumerable GetAllFiles(this DirectoryInfo di, String? exts = null, Boolean allSub = false)
{
- if (di == null || !di.Exists) yield break;
+ if (di?.Exists != true) yield break;
if (String.IsNullOrEmpty(exts)) exts = "*";
var opt = allSub ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
@@ -525,7 +525,7 @@ public static class PathHelper
Console.WriteLine("\t{1}\t{0}", name, item.CombinePath(name).AsFile().LastWriteTime.ToFullString());
Console.ResetColor();
});
- if (rs != null && rs.Length > 0) list.AddRange(rs);
+ if (rs?.Length > 0) list.AddRange(rs);
}
catch (Exception ex) { Console.WriteLine(" " + ex.Message); }
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Logger/Logger.cs b/src/Admin/ThingsGateway.NewLife.X/Logger/Logger.cs
index 069f326cc..362bbeafc 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Logger/Logger.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Logger/Logger.cs
@@ -62,7 +62,7 @@ public abstract class Logger : ILog
protected virtual String Format(String format, Object?[]? args)
{
//处理时间的格式化
- if (args != null && args.Length > 0)
+ if (args?.Length > 0)
{
// 特殊处理异常
if (args.Length == 1 && args[0] is Exception ex && (format.IsNullOrEmpty() || format == "{0}"))
diff --git a/src/Admin/ThingsGateway.NewLife.X/Logger/TextFileLog.cs b/src/Admin/ThingsGateway.NewLife.X/Logger/TextFileLog.cs
index 0acf2500d..4ec1e22bd 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Logger/TextFileLog.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Logger/TextFileLog.cs
@@ -229,7 +229,7 @@ public class TextFileLog : Logger, IDisposable
try
{
var dels = di.GetFiles("*.del");
- if (dels != null && dels.Length > 0)
+ if (dels?.Length > 0)
{
foreach (var item in dels)
{
@@ -304,7 +304,7 @@ public class TextFileLog : Logger, IDisposable
var e = WriteLogEventArgs.Current.Set(level);
// 特殊处理异常对象
- if (args != null && args.Length == 1 && args[0] is Exception ex && (format.IsNullOrEmpty() || format == "{0}"))
+ if (args?.Length == 1 && args[0] is Exception ex && (format.IsNullOrEmpty() || format == "{0}"))
e = e.Set(null, ex);
else
e = e.Set(Format(format, args), null);
diff --git a/src/Admin/ThingsGateway.NewLife.X/Net/IDnsResolver.cs b/src/Admin/ThingsGateway.NewLife.X/Net/IDnsResolver.cs
index 7bcc594f8..ac807d32d 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Net/IDnsResolver.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Net/IDnsResolver.cs
@@ -54,7 +54,7 @@ public class DnsResolver : IDnsResolver
if (!task.Wait(5000)) throw new TaskCanceledException();
var addrs = task.ConfigureAwait(false).GetAwaiter().GetResult();
#endif
- if (addrs != null && addrs.Length > 0)
+ if (addrs?.Length > 0)
{
// 更新缓存数据
@@ -76,9 +76,9 @@ public class DnsResolver : IDnsResolver
}
}
}
- catch (Exception ex)
+ catch (Exception)
{
- if (throwError) throw ex;
+ if (throwError) throw;
}
return item;
diff --git a/src/Admin/ThingsGateway.NewLife.X/Net/NetHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Net/NetHelper.cs
index 544ad81f6..283e15b90 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Net/NetHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Net/NetHelper.cs
@@ -180,7 +180,7 @@ public static class NetHelper
{
// 如果不是任意地址,直接返回
var addr = address;
- if (addr == null || !addr.IsAny()) return addr;
+ if (addr?.IsAny() != true) return addr;
// 如果是本地环回地址,返回环回地址
if (IPAddress.IsLoopback(remote)) return addr.IsIPv4() ? IPAddress.Loopback : IPAddress.IPv6Loopback;
@@ -300,7 +300,7 @@ public static class NetHelper
}
}
#else
- if (item != null && item.DhcpServerAddresses.Count > 0)
+ if (item?.DhcpServerAddresses.Count > 0)
{
foreach (var elm in item.DhcpServerAddresses)
{
@@ -321,7 +321,7 @@ public static class NetHelper
var list = new List();
foreach (var item in GetActiveInterfaces())
{
- if (item != null && item.DnsAddresses.Count > 0)
+ if (item?.DnsAddresses.Count > 0)
{
foreach (var elm in item.DnsAddresses)
{
@@ -341,7 +341,7 @@ public static class NetHelper
var list = new List();
foreach (var item in GetActiveInterfaces())
{
- if (item != null && item.GatewayAddresses.Count > 0)
+ if (item?.GatewayAddresses.Count > 0)
{
foreach (var elm in item.GatewayAddresses)
{
@@ -365,7 +365,7 @@ public static class NetHelper
if (item.NetworkInterfaceType is NetworkInterfaceType.Loopback or NetworkInterfaceType.Tunnel or NetworkInterfaceType.Unknown) continue;
var ipp = item.GetIPProperties();
- if (ipp != null && ipp.UnicastAddresses.Count > 0)
+ if (ipp?.UnicastAddresses.Count > 0)
{
var gw = 0;
@@ -446,7 +446,7 @@ public static class NetHelper
var list = new List();
foreach (var item in GetActiveInterfaces())
{
- if (item != null && item.MulticastAddresses.Count > 0)
+ if (item?.MulticastAddresses.Count > 0)
{
foreach (var elm in item.MulticastAddresses)
{
@@ -480,7 +480,7 @@ public static class NetHelper
if (addrs.Length > 0 && addrs.All(e => IPAddress.IsLoopback(e))) continue;
var mac = item.GetPhysicalAddress()?.GetAddressBytes();
- if (mac != null && mac.Length == 6) yield return mac;
+ if (mac?.Length == 6) yield return mac;
}
}
@@ -508,7 +508,7 @@ public static class NetHelper
if (addrs.Length == 0) continue;
var mac = item.GetPhysicalAddress()?.GetAddressBytes();
- if (mac != null && mac.Length == 6) return mac;
+ if (mac?.Length == 6) return mac;
}
return null;
@@ -604,7 +604,7 @@ public static class NetHelper
buf = item.GetPhysicalAddress()?.GetAddressBytes();
}
- if (buf != null && buf.Length == 6) return buf;
+ if (buf?.Length == 6) return buf;
}
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Net/NetUri.cs b/src/Admin/ThingsGateway.NewLife.X/Net/NetUri.cs
index 615784509..0d58f78cf 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Net/NetUri.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Net/NetUri.cs
@@ -67,7 +67,7 @@ public class NetUri
{
var ep = _EndPoint;
ep ??= _EndPoint = new IPEndPoint(IPAddress.Any, 0);
- if ((ep.Address == null || ep.Address.IsAny()) && !Host.IsNullOrEmpty()) ep.Address = ParseAddress(Host)?.FirstOrDefault() ?? IPAddress.Any;
+ if ((ep.Address?.IsAny() != false) && !Host.IsNullOrEmpty()) ep.Address = ParseAddress(Host)?.FirstOrDefault() ?? IPAddress.Any;
return ep;
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Net/TcpConnectionInformation2.cs b/src/Admin/ThingsGateway.NewLife.X/Net/TcpConnectionInformation2.cs
index daa6ab60f..e42b2a06e 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Net/TcpConnectionInformation2.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Net/TcpConnectionInformation2.cs
@@ -179,10 +179,10 @@ public class TcpConnectionInformation2 : TcpConnectionInformation
// 各个进程底下的/net/tcp,实际上是所有进程的连接
var rs = ParseTcpsFromFile(processId > 0 ? $"/proc/{processId}/net/tcp" : "/proc/net/tcp");
- if (rs != null && rs.Count > 0) list.AddRange(rs);
+ if (rs?.Count > 0) list.AddRange(rs);
var rs2 = ParseTcpsFromFile(processId > 0 ? $"/proc/{processId}/net/tcp6" : "/proc/net/tcp6");
- if (rs2 != null && rs2.Count > 0) list.AddRange(rs2);
+ if (rs2?.Count > 0) list.AddRange(rs2);
//XTrace.WriteLine("tcps: {0} nodes: {1}", list.Count, nodes?.Length);
// 过滤指定进程的连接
diff --git a/src/Admin/ThingsGateway.NewLife.X/Reflection/AssemblyX.cs b/src/Admin/ThingsGateway.NewLife.X/Reflection/AssemblyX.cs
index c9628db56..7b90efc82 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Reflection/AssemblyX.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Reflection/AssemblyX.cs
@@ -84,7 +84,7 @@ public class AssemblyX
{
try
{
- return Asm == null || Asm.IsDynamic ? null : Asm.Location;
+ return Asm?.IsDynamic != false ? null : Asm.Location;
}
catch { return null; }
}
@@ -187,7 +187,7 @@ public class AssemblyX
if (item == null) continue;
var ts2 = item.GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
- if (ts2 != null && ts2.Length > 0)
+ if (ts2?.Length > 0)
{
// 从下一个元素开始插入,让内嵌类紧挨着主类
//Int32 k = i + 1;
@@ -332,7 +332,7 @@ public class AssemblyX
{
foreach (var item in types)
{
- if (item != null && !item.IsInterface && !item.IsAbstract && !item.IsGenericType && item != baseType && item.As(baseType)) list.Add(item);
+ if (item?.IsInterface == false && !item.IsAbstract && !item.IsGenericType && item != baseType && item.As(baseType)) list.Add(item);
}
}
@@ -360,7 +360,7 @@ public class AssemblyX
foreach (var item in GetAssemblies())
{
signs = item.Asm.GetName().GetPublicKey();
- if (hasNotSign && signs != null && signs.Length > 0) continue;
+ if (hasNotSign && signs?.Length > 0) continue;
//// 如果excludeGlobalTypes为true,则指检查来自非GAC引用的程序集
//if (excludeGlobalTypes && item.Asm.GlobalAssemblyCache) continue;
@@ -389,7 +389,7 @@ public class AssemblyX
if (item.IsSystemAssembly || !IsReferencedFrom(item.Asm, baseAssemblyName)) continue;
var ts = item.FindPlugins(baseType);
- if (ts != null && ts.Count > 0)
+ if (ts?.Count > 0)
{
// 真实加载
if (XTrace.Debug)
diff --git a/src/Admin/ThingsGateway.NewLife.X/Reflection/AttributeX.cs b/src/Admin/ThingsGateway.NewLife.X/Reflection/AttributeX.cs
index 62af3412b..c19cd43e0 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Reflection/AttributeX.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Reflection/AttributeX.cs
@@ -36,7 +36,7 @@ public static class AttributeX
public static String? GetDisplayName(this MemberInfo member, Boolean inherit = true)
{
var att = member.GetCustomAttribute(inherit);
- if (att != null && !att.DisplayName.IsNullOrWhiteSpace()) return att.DisplayName;
+ if (att?.DisplayName.IsNullOrWhiteSpace() == false) return att.DisplayName;
return null;
}
@@ -48,7 +48,7 @@ public static class AttributeX
public static String? GetDescription(this MemberInfo member, Boolean inherit = true)
{
var att2 = member.GetCustomAttribute(inherit);
- if (att2 != null && !att2.Description.IsNullOrWhiteSpace()) return att2.Description;
+ if (att2?.Description.IsNullOrWhiteSpace() == false) return att2.Description;
return null;
}
@@ -72,7 +72,7 @@ public static class AttributeX
if (typeof(TAttribute) != item.Constructor.DeclaringType) continue;
var args = item.ConstructorArguments;
- if (args != null && args.Count > 0) return (TResult?)args[0].Value;
+ if (args?.Count > 0) return (TResult?)args[0].Value;
}
}
catch { }
@@ -93,14 +93,14 @@ public static class AttributeX
try
{
var list = CustomAttributeData.GetCustomAttributes(target);
- if (list != null && list.Count > 0)
+ if (list?.Count > 0)
{
foreach (var item in list)
{
if (typeof(TAttribute).FullName != item.Constructor.DeclaringType?.FullName) continue;
var args = item.ConstructorArguments;
- if (args != null && args.Count > 0) return (TResult?)args[0].Value;
+ if (args?.Count > 0) return (TResult?)args[0].Value;
}
}
if (inherit && target is Type type && type.BaseType != null)
diff --git a/src/Admin/ThingsGateway.NewLife.X/Reflection/IReflect.cs b/src/Admin/ThingsGateway.NewLife.X/Reflection/IReflect.cs
index 592c299de..78c364f37 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Reflection/IReflect.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Reflection/IReflect.cs
@@ -295,7 +295,7 @@ public class DefaultReflect : IReflect
while (type2 != null && type2 != typeof(Object))
{
var fs = type2.GetMember(name, ignoreCase ? bfic : bf);
- if (fs != null && fs.Length > 0)
+ if (fs?.Length > 0)
{
// 得到多个的时候,优先返回精确匹配
if (ignoreCase && fs.Length > 1)
@@ -566,7 +566,7 @@ public class DefaultReflect : IReflect
foreach (var pi in targetType.GetProperties(true))
{
if (!pi.CanWrite) continue;
- if (excludes != null && excludes.Contains(pi.Name)) continue;
+ if (excludes?.Contains(pi.Name) == true) continue;
if (sourceProperties.TryGetValue(pi.Name, out var pi2) && pi2.CanRead)
SetValue(target, pi, GetValue(source, pi2));
@@ -579,7 +579,7 @@ public class DefaultReflect : IReflect
foreach (var pi in sourceProperties.Values)
{
if (!pi.CanRead) continue;
- if (excludes != null && excludes.Contains(pi.Name)) continue;
+ if (excludes?.Contains(pi.Name) == true) continue;
dic[pi.Name] = GetValue(source, pi);
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Reflection/Reflect.cs b/src/Admin/ThingsGateway.NewLife.X/Reflection/Reflect.cs
index 8fbdd2bfc..1146cac0a 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Reflection/Reflect.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Reflection/Reflect.cs
@@ -489,12 +489,12 @@ public static class Reflect
/// 是否泛型列表
///
///
- public static Boolean IsList(this Type type) => type != null && type.IsGenericType && type.As(typeof(IList<>));
+ public static Boolean IsList(this Type type) => type?.IsGenericType == true && type.As(typeof(IList<>));
/// 是否泛型字典
///
///
- public static Boolean IsDictionary(this Type type) => type != null && type.IsGenericType && type.As(typeof(IDictionary<,>));
+ public static Boolean IsDictionary(this Type type) => type?.IsGenericType == true && type.As(typeof(IDictionary<,>));
#endregion
#region 插件
diff --git a/src/Admin/ThingsGateway.NewLife.X/Reflection/ScriptEngine.cs b/src/Admin/ThingsGateway.NewLife.X/Reflection/ScriptEngine.cs
index dacf9e5bc..43327f604 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Reflection/ScriptEngine.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Reflection/ScriptEngine.cs
@@ -305,7 +305,7 @@ public class ScriptEngine
if (FinalCode == null) GenerateCode();
var rs = Compile(FinalCode, null);
- if (rs.Errors == null || !rs.Errors.HasErrors)
+ if (rs.Errors?.HasErrors != true)
{
// 加载外部程序集
foreach (var item in ReferencedAssemblies)
diff --git a/src/Admin/ThingsGateway.NewLife.X/Security/Asn1.cs b/src/Admin/ThingsGateway.NewLife.X/Security/Asn1.cs
index b3a7f1b96..43f2000cd 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Security/Asn1.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Security/Asn1.cs
@@ -55,7 +55,7 @@ public class Asn1
foreach (var item in arr)
{
var ds = item.GetOids();
- if (ds != null && ds.Length > 0) list.AddRange(ds);
+ if (ds?.Length > 0) list.AddRange(ds);
}
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Security/Certificate.cs b/src/Admin/ThingsGateway.NewLife.X/Security/Certificate.cs
index 48466b85d..972cb5ccd 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Security/Certificate.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Security/Certificate.cs
@@ -7,7 +7,7 @@ namespace ThingsGateway.NewLife.Security
{
/// 证书
/// http://blogs.msdn.com/b/dcook/archive/2008/11/25/creating-a-self-signed-certificate-in-c.aspx
- public class Certificate
+ public static class Certificate
{
/// 建立自签名证书
///
@@ -52,7 +52,7 @@ namespace ThingsGateway.NewLife.Security
}
finally
{
- if (password != null) password.Dispose();
+ password?.Dispose();
}
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Security/DSAHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Security/DSAHelper.cs
index c15ab8dd8..6b13cc23c 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Security/DSAHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Security/DSAHelper.cs
@@ -62,7 +62,7 @@ public static class DSAHelper
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlString);
- if (xmlDoc.DocumentElement == null || !xmlDoc.DocumentElement.Name.Equals("DSAKeyValue"))
+ if (xmlDoc.DocumentElement?.Name.Equals("DSAKeyValue") != true)
{
throw new Exception("Invalid XML DSA key.");
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Security/RSAHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Security/RSAHelper.cs
index 6db742a00..6ab81fd53 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Security/RSAHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Security/RSAHelper.cs
@@ -56,7 +56,7 @@ public static class RSAHelper
ms.WriteArray(p.Modulus);
ms.WriteArray(p.Exponent);
- if (p.D != null && p.D.Length > 0)
+ if (p.D?.Length > 0)
{
if (p.D == null || p.P == null || p.Q == null ||
p.DP == null || p.DQ == null || p.InverseQ == null) throw new ArgumentNullException(nameof(p));
diff --git a/src/Admin/ThingsGateway.NewLife.X/Security/SecurityHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Security/SecurityHelper.cs
index 986e9d473..cdde89d5f 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Security/SecurityHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Security/SecurityHelper.cs
@@ -141,9 +141,9 @@ public static class SecurityHelper
{
if (data == null || data.Length <= 0) throw new ArgumentNullException(nameof(data));
- if (pass != null && pass.Length > 0)
+ if (pass?.Length > 0)
{
- if (sa.LegalKeySizes != null && sa.LegalKeySizes.Length > 0)
+ if (sa.LegalKeySizes?.Length > 0)
sa.Key = Pad(pass, sa.LegalKeySizes[0]);
else
sa.Key = pass;
@@ -206,9 +206,9 @@ public static class SecurityHelper
{
if (data == null || data.Length <= 0) throw new ArgumentNullException(nameof(data));
- if (pass != null && pass.Length > 0)
+ if (pass?.Length > 0)
{
- if (sa.LegalKeySizes != null && sa.LegalKeySizes.Length > 0)
+ if (sa.LegalKeySizes?.Length > 0)
sa.Key = Pad(pass, sa.LegalKeySizes[0]);
else
sa.Key = pass;
diff --git a/src/Admin/ThingsGateway.NewLife.X/Serialization/Binary/Binary.cs b/src/Admin/ThingsGateway.NewLife.X/Serialization/Binary/Binary.cs
index e2fac634b..f0d3c5b85 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Serialization/Binary/Binary.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Serialization/Binary/Binary.cs
@@ -118,7 +118,7 @@ public class Binary : FormatterBase, IBinary
type = value.GetType();
// 一般类型为空是顶级调用
- if (Hosts.Count == 0 && Log != null && Log.Enable) WriteLog("BinaryWrite {0} {1}", type.Name, value);
+ if (Hosts.Count == 0 && Log?.Enable == true) WriteLog("BinaryWrite {0} {1}", type.Name, value);
}
// 优先 IAccessor 接口
@@ -236,7 +236,7 @@ public class Binary : FormatterBase, IBinary
///
public virtual Boolean TryRead(Type type, ref Object? value)
{
- if (Hosts.Count == 0 && Log != null && Log.Enable) WriteLog("BinaryRead {0} {1}", type.Name, value);
+ if (Hosts.Count == 0 && Log?.Enable == true) WriteLog("BinaryRead {0} {1}", type.Name, value);
// 优先 IAccessor 接口
if (value is IAccessor acc)
diff --git a/src/Admin/ThingsGateway.NewLife.X/Serialization/DataMemberResolver.cs b/src/Admin/ThingsGateway.NewLife.X/Serialization/DataMemberResolver.cs
index b39fda228..2ba3adecf 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Serialization/DataMemberResolver.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Serialization/DataMemberResolver.cs
@@ -50,7 +50,7 @@ public class DataMemberResolver : DefaultJsonTypeInfoResolver
else
{
var attr = provider.GetCustomAttributes(typeof(DataMemberAttribute), false)?.FirstOrDefault() as DataMemberAttribute;
- if (attr != null && !attr.Name.IsNullOrEmpty())
+ if (attr?.Name.IsNullOrEmpty() == false)
propertyInfo.Name = attr.Name;
}
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Serialization/SerialHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Serialization/SerialHelper.cs
index e07cfee60..ed658f04e 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Serialization/SerialHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Serialization/SerialHelper.cs
@@ -22,12 +22,12 @@ public static class SerialHelper
if (name.IsNullOrEmpty())
{
var att = pi.GetCustomAttribute();
- if (att != null && !att.Name.IsNullOrEmpty()) name = att.Name;
+ if (att?.Name.IsNullOrEmpty() == false) name = att.Name;
}
if (name.IsNullOrEmpty())
{
var att = pi.GetCustomAttribute();
- if (att != null && !att.ElementName.IsNullOrEmpty()) name = att.ElementName;
+ if (att?.ElementName.IsNullOrEmpty() == false) name = att.ElementName;
}
if (name.IsNullOrEmpty()) name = pi.Name;
diff --git a/src/Admin/ThingsGateway.NewLife.X/Serialization/Xml/Xml.cs b/src/Admin/ThingsGateway.NewLife.X/Serialization/Xml/Xml.cs
index 425b3a217..7de4e54f9 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Serialization/Xml/Xml.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Serialization/Xml/Xml.cs
@@ -118,7 +118,7 @@ public class Xml : FormatterBase, IXml
CurrentName = name;
// 一般类型为空是顶级调用
- if (Hosts.Count == 0 && Log != null && Log.Enable) WriteLog("XmlWrite {0} {1}", name ?? type.Name, value);
+ if (Hosts.Count == 0 && Log?.Enable == true) WriteLog("XmlWrite {0} {1}", name ?? type.Name, value);
// 要先写入根
Depth++;
@@ -254,7 +254,7 @@ public class Xml : FormatterBase, IXml
// 移动到第一个元素
while (reader.NodeType != XmlNodeType.Element) { if (!reader.Read()) return false; }
- if (Hosts.Count == 0 && Log != null && Log.Enable) WriteLog("XmlRead {0} {1}", type.Name, value);
+ if (Hosts.Count == 0 && Log?.Enable == true) WriteLog("XmlRead {0} {1}", type.Name, value);
// 要先写入根
Depth++;
diff --git a/src/Admin/ThingsGateway.NewLife.X/Stub/ScriptIgnoreAttribute.cs b/src/Admin/ThingsGateway.NewLife.X/Stub/ScriptIgnoreAttribute.cs
index c11c0c627..a97a11135 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Stub/ScriptIgnoreAttribute.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Stub/ScriptIgnoreAttribute.cs
@@ -1,5 +1,6 @@
namespace System.Web.Script.Serialization
{
/// 忽略Json序列化
+ [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class ScriptIgnoreAttribute : Attribute { }
}
\ No newline at end of file
diff --git a/src/Admin/ThingsGateway.NewLife.X/Threading/TimerScheduler.cs b/src/Admin/ThingsGateway.NewLife.X/Threading/TimerScheduler.cs
index f8772a049..db6ad4c93 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Threading/TimerScheduler.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Threading/TimerScheduler.cs
@@ -129,7 +129,7 @@ public class TimerScheduler : ILogFeature
if (e != null)
{
var swh = e.SafeWaitHandle;
- if (swh != null && !swh.IsClosed) e.Set();
+ if (swh?.IsClosed == false) e.Set();
}
}
diff --git a/src/Admin/ThingsGateway.NewLife.X/Threading/TimerX.cs b/src/Admin/ThingsGateway.NewLife.X/Threading/TimerX.cs
index c26128c00..2022648c7 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Threading/TimerX.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Threading/TimerX.cs
@@ -36,7 +36,7 @@ public class TimerX : ITimer, IDisposable
/// 获取/设置 用户数据
public Object? State
{
- get => _state != null && _state.IsAlive ? _state.Target : null;
+ get => _state?.IsAlive == true ? _state.Target : null;
set
{
if (_state == null)
@@ -105,7 +105,7 @@ public class TimerX : ITimer, IDisposable
_nextTick = Runtime.TickCount64;
//_baseTime = DateTime.Now.AddMilliseconds(-_nextTick);
- Scheduler = (scheduler == null || scheduler.IsNullOrEmpty()) ? TimerScheduler.Default : TimerScheduler.Create(scheduler);
+ Scheduler = (scheduler?.IsNullOrEmpty() != false) ? TimerScheduler.Default : TimerScheduler.Create(scheduler);
//Scheduler.Add(this);
_baseTime = Scheduler.GetNow().AddMilliseconds(-_nextTick);
@@ -384,7 +384,7 @@ public class TimerX : ITimer, IDisposable
public Boolean Change(TimeSpan dueTime, TimeSpan period)
{
if (Absolutely) return false;
- if (Crons != null && Crons.Length > 0) return false;
+ if (Crons?.Length > 0) return false;
if (period.TotalMilliseconds <= 0)
{
diff --git a/src/Admin/ThingsGateway.NewLife.X/Web/Link.cs b/src/Admin/ThingsGateway.NewLife.X/Web/Link.cs
index 9e03eb8c2..49d18eb6c 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Web/Link.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Web/Link.cs
@@ -48,7 +48,7 @@ public class Link
public static Link[] Parse(String html, String? baseUrl = null, Func? filter = null)
{
// baseurl必须是/结尾
- if (baseUrl != null && !baseUrl.EndsWith('/')) baseUrl += "/";
+ if (baseUrl?.EndsWith('/') == false) baseUrl += "/";
if (baseUrl.StartsWithIgnoreCase("ftp://")) return ParseFTP(html, baseUrl, filter);
// 分析所有链接
@@ -218,7 +218,7 @@ public class Link
if (Time.Year < 2000)
{
var fi = file.AsFile();
- if (fi != null && fi.Exists) Time = fi.LastWriteTime;
+ if (fi?.Exists == true) Time = fi.LastWriteTime;
}
return this;
diff --git a/src/Admin/ThingsGateway.NewLife.X/Xml/SerializableDictionary.cs b/src/Admin/ThingsGateway.NewLife.X/Xml/SerializableDictionary.cs
index 5eff3de35..0417d22e8 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Xml/SerializableDictionary.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Xml/SerializableDictionary.cs
@@ -11,11 +11,8 @@ namespace ThingsGateway.NewLife.Xml
[Serializable]
public class SerializableDictionary : Dictionary, IXmlSerializable
{
- ///
public SerializableDictionary() : base() { }
- ///
- ///
public SerializableDictionary(IDictionary dictionary) : base(dictionary) { }
#region IXmlSerializable 成员
diff --git a/src/Admin/ThingsGateway.NewLife.X/Xml/XmlConfig.cs b/src/Admin/ThingsGateway.NewLife.X/Xml/XmlConfig.cs
index 15533693a..ca7e9de1c 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Xml/XmlConfig.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Xml/XmlConfig.cs
@@ -113,7 +113,7 @@ public class XmlConfig : DisposeBase where TConfig : XmlConfig
{
// 获取XmlConfigFileAttribute特性,那里会指定配置文件名称
var att = typeof(TConfig).GetCustomAttribute(true);
- if (att == null || att.FileName.IsNullOrWhiteSpace())
+ if (att?.FileName.IsNullOrWhiteSpace() != false)
{
// 这里不能着急,派生类可能通过静态构造函数指定配置文件路径
//throw new XException("编码错误!请为配置类{0}设置{1}特性,指定配置文件!", typeof(TConfig), typeof(XmlConfigFileAttribute).Name);
diff --git a/src/Admin/ThingsGateway.NewLife.X/Xml/XmlHelper.cs b/src/Admin/ThingsGateway.NewLife.X/Xml/XmlHelper.cs
index 8e6fa6ac4..a45b66d1c 100644
--- a/src/Admin/ThingsGateway.NewLife.X/Xml/XmlHelper.cs
+++ b/src/Admin/ThingsGateway.NewLife.X/Xml/XmlHelper.cs
@@ -278,7 +278,7 @@ public static class XmlHelper
var dic = new Dictionary();
- if (root.ChildNodes != null && root.ChildNodes.Count > 0)
+ if (root.ChildNodes?.Count > 0)
{
foreach (var item in root.ChildNodes)
{
@@ -311,7 +311,7 @@ public static class XmlHelper
var root = doc.CreateElement(rootName);
doc.AppendChild(root);
- if (dic != null && dic.Count > 0)
+ if (dic?.Count > 0)
{
foreach (var item in dic)
{
diff --git a/src/Admin/ThingsGateway.Razor/Common/RandomHelper.cs b/src/Admin/ThingsGateway.Razor/Common/RandomHelper.cs
index fb2dd3fba..52575c0c7 100644
--- a/src/Admin/ThingsGateway.Razor/Common/RandomHelper.cs
+++ b/src/Admin/ThingsGateway.Razor/Common/RandomHelper.cs
@@ -17,7 +17,7 @@ using System.Text;
/// 随机数
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class RandomHelper
+public static class RandomHelper
{
///
/// 生成随机纯字母随机数
diff --git a/src/Admin/ThingsGateway.Razor/Const/WebsiteConst.cs b/src/Admin/ThingsGateway.Razor/Const/WebsiteConst.cs
index 19de9687c..50327aeb2 100644
--- a/src/Admin/ThingsGateway.Razor/Const/WebsiteConst.cs
+++ b/src/Admin/ThingsGateway.Razor/Const/WebsiteConst.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Razor;
/// 网站常量
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class WebsiteConst
+public static class WebsiteConst
{
///
/// 默认的资源项目名称
diff --git a/src/Admin/ThingsGateway.Razor/Extensions/ObjectExtensions.cs b/src/Admin/ThingsGateway.Razor/Extensions/ObjectExtensions.cs
index feb6ecee2..7199bda53 100644
--- a/src/Admin/ThingsGateway.Razor/Extensions/ObjectExtensions.cs
+++ b/src/Admin/ThingsGateway.Razor/Extensions/ObjectExtensions.cs
@@ -8,9 +8,6 @@
// QQ群:605534569
//------------------------------------------------------------------------------
-// 版权归百小僧及百签科技(广东)有限公司所有。
-
-
using System.Collections.Concurrent;
using System.ComponentModel;
using System.Reflection;
@@ -282,7 +279,7 @@ public static class ObjectExtensions
foreach (var property in propertys)
{
var p = oldType.GetProperty(property.Name);
- if (property.CanWrite && p != null && p.CanRead)
+ if (property.CanWrite && p?.CanRead == true)
{
property.SetValue(o, ChangeType(p.GetValue(obj, null), property.PropertyType), null);
}
@@ -494,7 +491,7 @@ public static class ObjectExtensions
/// 实例,true 表示空集合,false 表示非空集合
internal static bool IsEmpty(this IEnumerable collection)
{
- return collection == null || !collection.Any();
+ return collection?.Any() != true;
}
///
diff --git a/src/Admin/ThingsGateway.Razor/Util/LocalizerUtil.cs b/src/Admin/ThingsGateway.Razor/Util/LocalizerUtil.cs
index d4ff30c15..09c04b875 100644
--- a/src/Admin/ThingsGateway.Razor/Util/LocalizerUtil.cs
+++ b/src/Admin/ThingsGateway.Razor/Util/LocalizerUtil.cs
@@ -14,7 +14,7 @@ namespace ThingsGateway.Razor;
///
[ThingsGateway.DependencyInjection.SuppressSniffer]
-public class LocalizerUtil
+public static class LocalizerUtil
{
#region 是否启用
diff --git a/src/Admin/ThingsGateway.SqlSugar/.txt b/src/Admin/ThingsGateway.SqlSugar/.txt
new file mode 100644
index 000000000..cf33ff233
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/.txt
@@ -0,0 +1,3 @@
+https://gitee.com/dotnetchina/SqlSugar/commit/98ed5e8a756bae6c245838df5ab4e19bf900d0af
+
+修改大部分CA规则,后期优化减少字符串操作
\ No newline at end of file
diff --git a/src/Admin/ThingsGateway.SqlSugar/QuestDb/CsvHelperEnumToIntConverter.cs b/src/Admin/ThingsGateway.SqlSugar/QuestDb/CsvHelperEnumToIntConverter.cs
new file mode 100644
index 000000000..9d8f559c8
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/QuestDb/CsvHelperEnumToIntConverter.cs
@@ -0,0 +1,31 @@
+using CsvHelper;
+using CsvHelper.Configuration;
+using CsvHelper.TypeConversion;
+
+namespace SqlSugar
+{
+ public class CsvHelperEnumToIntConverter : ITypeConverter
+ {
+ public string ConvertToString(object value, IWriterRow row, MemberMapData memberMapData)
+ {
+ if (value == null)
+ {
+ return "null";
+ }
+ else if (value is Enum enumValue)
+ {
+ return (Convert.ToInt32(enumValue)).ToString();
+ }
+ throw new NotSupportedException();
+ }
+
+ public object ConvertFromString(string text, IReaderRow row, MemberMapData memberMapData)
+ {
+ if (int.TryParse(text, out int intValue))
+ {
+ return text;
+ }
+ throw new NotSupportedException();
+ }
+ }
+}
diff --git a/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbPageSizeBulkCopy.cs b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbPageSizeBulkCopy.cs
new file mode 100644
index 000000000..ef379c279
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbPageSizeBulkCopy.cs
@@ -0,0 +1,33 @@
+namespace SqlSugar
+{
+ public class QuestDbPageSizeBulkCopy
+ {
+ private QuestDbRestAPI questDbRestAPI;
+ private int pageSize;
+ private ISqlSugarClient db;
+ public QuestDbPageSizeBulkCopy(QuestDbRestAPI questDbRestAPI, int pageSize, ISqlSugarClient db)
+ {
+ this.questDbRestAPI = questDbRestAPI;
+ this.pageSize = pageSize;
+ this.db = db;
+ }
+ public int BulkCopy(List insertDatas, string dateFormat = "yyyy/M/d H:mm:ss") where T : class, new()
+ {
+ int result = 0;
+ db.Utilities.PageEach(insertDatas, pageSize, pageItems =>
+ {
+ result += questDbRestAPI.BulkCopyAsync(pageItems, dateFormat).GetAwaiter().GetResult();
+ });
+ return result;
+ }
+ public async Task BulkCopyAsync(List insertDatas, string dateFormat = "yyyy/M/d H:mm:ss") where T : class, new()
+ {
+ int result = 0;
+ await db.Utilities.PageEachAsync(insertDatas, pageSize, async pageItems =>
+ {
+ result += await questDbRestAPI.BulkCopyAsync(pageItems, dateFormat).ConfigureAwait(false);
+ }).ConfigureAwait(false);
+ return result;
+ }
+ }
+}
diff --git a/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPHelper.cs b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPHelper.cs
new file mode 100644
index 000000000..7268b8826
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPHelper.cs
@@ -0,0 +1,56 @@
+using System.Data.Common;
+using System.Text;
+
+namespace SqlSugar
+{
+ internal static class QuestDbRestAPHelper
+ {
+
+ ///
+ /// 绑定RestAPI需要的信息
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SetRestApiInfo(DbConnectionStringBuilder builder, ref string host, ref string username, ref string password)
+ {
+ if (builder.TryGetValue("Host", out object hostValue))
+ {
+ host = Convert.ToString(hostValue);
+ }
+ if (builder.TryGetValue("Username", out object usernameValue))
+ {
+ username = Convert.ToString(usernameValue);
+ }
+ if (builder.TryGetValue("Password", out object passwordValue))
+ {
+ password = Convert.ToString(passwordValue);
+ }
+ }
+
+ ///
+ /// 逐行读取,包含空行
+ ///
+ ///
+ ///
+ public static List SplitByLine(string text)
+ {
+ List lines = new List();
+ byte[] array = Encoding.UTF8.GetBytes(text);
+ using (MemoryStream stream = new MemoryStream(array))
+ {
+ using (var sr = new StreamReader(stream))
+ {
+ string line = sr.ReadLine();
+ while (line != null)
+ {
+ lines.Add(line);
+ line = sr.ReadLine();
+ }
+ }
+ }
+ return lines;
+ }
+ }
+}
diff --git a/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPI.cs b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPI.cs
new file mode 100644
index 000000000..c01e994c3
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbRestAPI.cs
@@ -0,0 +1,240 @@
+using CsvHelper;
+using CsvHelper.Configuration;
+using CsvHelper.TypeConversion;
+
+using Newtonsoft.Json;
+
+using System.Collections;
+using System.Data.Common;
+using System.Globalization;
+using System.Net.Http.Headers;
+using System.Text;
+using System.Web;
+namespace SqlSugar
+{
+ ///
+ /// QuestDb RestAPI
+ ///
+ public class QuestDbRestAPI
+ {
+ internal string url = string.Empty;
+ internal string authorization = string.Empty;
+ internal static Random random = new Random();
+ //can be modified
+ ISqlSugarClient db;
+ public QuestDbRestAPI(ISqlSugarClient db)
+ {
+
+ var builder = new DbConnectionStringBuilder();
+ builder.ConnectionString = db.CurrentConnectionConfig.ConnectionString;
+ this.db = db;
+ string host = String.Empty;
+ string username = String.Empty;
+ string password = String.Empty;
+ QuestDbRestAPHelper.SetRestApiInfo(builder, ref host, ref username, ref password);
+ BindHost(host, username, password);
+ }
+ ///
+ /// 执行SQL异步
+ ///
+ ///
+ ///
+ public async Task ExecuteCommandAsync(string sql)
+ {
+ //HTTP GET 执行SQL
+ var result = string.Empty;
+ var url = $"{this.url}/exec?query={HttpUtility.UrlEncode(sql)}";
+ if (!string.IsNullOrWhiteSpace(authorization))
+ client.DefaultRequestHeaders.Add("Authorization", authorization);
+ var httpResponseMessage = await client.GetAsync(url).ConfigureAwait(false);
+ result = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
+ return result;
+ }
+ ///
+ /// 执行SQL
+ ///
+ ///
+ ///
+ public string ExecuteCommand(string sql)
+ {
+ return ExecuteCommandAsync(sql).GetAwaiter().GetResult();
+ }
+
+ public async Task BulkCopyAsync(T insertData, string dateFormat = "yyyy/M/d H:mm:ss") where T : class, new()
+ {
+ if (db.CurrentConnectionConfig.MoreSettings == null)
+ db.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings();
+ db.CurrentConnectionConfig.MoreSettings.DisableNvarchar = true;
+ var sql = db.Insertable(insertData).ToSqlString();
+ var result = await ExecuteCommandAsync(sql).ConfigureAwait(false);
+ return result.Contains("OK", StringComparison.OrdinalIgnoreCase) ? 1 : 0;
+ }
+
+ public int BulkCopy(T insertData, string dateFormat = "yyyy/M/d H:mm:ss") where T : class, new()
+ {
+ return BulkCopyAsync(insertData, dateFormat).GetAwaiter().GetResult();
+ }
+
+ public QuestDbPageSizeBulkCopy PageSize(int pageSize)
+ {
+ QuestDbPageSizeBulkCopy result = new QuestDbPageSizeBulkCopy(this, pageSize, db);
+ return result;
+ }
+ private static readonly HttpClient client = new HttpClient();
+ ///
+ /// 批量快速插入异步
+ ///
+ ///
+ ///
+ /// 导入时,时间格式 默认:yyyy/M/d H:mm:ss
+ ///
+ public async Task BulkCopyAsync(List insertList, string dateFormat = "yyyy/M/d H:mm:ss") where T : class, new()
+ {
+ var result = 0;
+ var fileName = $"{Guid.NewGuid()}.csv";
+ var filePath = Path.Combine(AppContext.BaseDirectory, fileName);
+ try
+ {
+ var boundary = "---------------" + DateTime.Now.Ticks.ToString("x");
+ var list = new List();
+ var name = db.EntityMaintenance.GetEntityInfo().DbTableName;
+
+ var key = "QuestDbBulkCopy" + typeof(T).FullName + typeof(T).GetHashCode();
+ var columns = new ReflectionInoCacheService().GetOrCreate(key, () =>
+ db.CopyNew().DbMaintenance.GetColumnInfosByTableName(name));
+ columns.ForEach(d =>
+ {
+ if (d.DataType == "TIMESTAMP")
+ {
+ list.Add(new Hashtable()
+ {
+ { "name", d.DbColumnName },
+ { "type", d.DataType },
+ { "pattern", dateFormat}
+ });
+ }
+ else
+ {
+ list.Add(new Hashtable()
+ {
+ { "name", d.DbColumnName },
+ { "type", d.DataType }
+ });
+ }
+ });
+ var schema = JsonConvert.SerializeObject(list);
+ //写入CSV文件
+ using (var writer = new StreamWriter(filePath))
+ using (var csv = new CsvWriter(writer, CultureInfo.CurrentCulture))
+ {
+ var options = new TypeConverterOptions { Formats = new[] { GetDefaultFormat() } };
+ csv.Context.TypeConverterOptionsCache.AddOptions(options);
+ CsvCreating(csv);
+ await csv.WriteRecordsAsync(insertList).ConfigureAwait(false);
+ }
+
+ using var httpContent = new MultipartFormDataContent(boundary);
+ using var fileStream = File.OpenRead(filePath);
+ if (!string.IsNullOrWhiteSpace(this.authorization))
+ client.DefaultRequestHeaders.Add("Authorization", this.authorization);
+ httpContent.Add(new StringContent(schema), "schema");
+ var streamContent = new StreamContent(fileStream);
+ streamContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
+ httpContent.Add(streamContent, "data", Path.GetFileName(filePath));
+
+ //boundary带双引号 可能导致服务器错误情况
+ httpContent.Headers.Remove("Content-Type");
+ httpContent.Headers.TryAddWithoutValidation("Content-Type",
+ "multipart/form-data; boundary=" + boundary);
+ var httpResponseMessage =
+ await Post(client, name, httpContent).ConfigureAwait(false);
+ var readAsStringAsync = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var splitByLine = QuestDbRestAPHelper.SplitByLine(readAsStringAsync);
+ foreach (var s in splitByLine)
+ {
+ if (s.Contains("Rows"))
+ {
+ var strings = s.Split('|');
+ if (strings[1].Trim() == "Rows imported")
+ {
+ result = Convert.ToInt32(strings[2].Trim());
+ }
+ }
+ }
+ }
+ catch (Exception)
+ {
+ throw;
+ }
+ finally
+ {
+ try
+ {
+ File.Delete(filePath);
+ }
+ catch
+ {
+ // ignored
+ }
+ }
+ return result;
+ }
+
+ private void CsvCreating(CsvWriter csv) where T : class, new()
+ {
+ var entityColumns = db.EntityMaintenance.GetEntityInfo().Columns;
+ if (entityColumns.Any(it => it.IsIgnore || it.UnderType?.IsEnum == true))
+ {
+ var customMap = new DefaultClassMap();
+ foreach (var item in entityColumns.Where(it => !it.IsIgnore))
+ {
+ var memberMap = customMap.Map(typeof(T), item.PropertyInfo).Name(item.PropertyName);
+ if (item.UnderType?.IsEnum == true
+ && item.SqlParameterDbType == null
+ && db.CurrentConnectionConfig?.MoreSettings?.TableEnumIsString != true)
+ {
+ memberMap.TypeConverter();
+ }
+ }
+ csv.Context.RegisterClassMap(customMap);
+ }
+ }
+
+ private static string GetDefaultFormat()
+ {
+ return "yyyy-MM-ddTHH:mm:ss.fffffff";
+ }
+
+ private Task Post(HttpClient client, string name, MultipartFormDataContent httpContent)
+ {
+ return client.PostAsync($"{this.url}/imp?name={name}", httpContent);
+ }
+
+ ///
+ /// 批量快速插入
+ ///
+ ///
+ ///
+ /// 导入时,时间格式 默认:yyyy/M/d H:mm:ss
+ ///
+ public int BulkCopy(List insertList, string dateFormat = "yyyy/M/d H:mm:ss") where T : class, new()
+ {
+ return BulkCopyAsync(insertList, dateFormat).GetAwaiter().GetResult();
+ }
+ private void BindHost(string host, string username, string password)
+ {
+ url = host;
+ if (url.EndsWith('/'))
+ url = url.Remove(url.Length - 1);
+
+ if (!url.StartsWith("http", StringComparison.OrdinalIgnoreCase))
+ url = $"http://{url}";
+ //生成TOKEN
+ if (!string.IsNullOrWhiteSpace(username) && !string.IsNullOrWhiteSpace(password))
+ {
+ var base64 = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{username}:{password}"));
+ authorization = $"Basic {base64}";
+ }
+ }
+ }
+}
diff --git a/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbSqlSugarClientExtensions.cs b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbSqlSugarClientExtensions.cs
new file mode 100644
index 000000000..2bb67b9e3
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/QuestDb/QuestDbSqlSugarClientExtensions.cs
@@ -0,0 +1,10 @@
+namespace SqlSugar
+{
+ public static class QuestDbSqlSugarClientExtensions
+ {
+ public static QuestDbRestAPI RestApi(this ISqlSugarClient db)
+ {
+ return new QuestDbRestAPI(db);
+ }
+ }
+}
diff --git a/src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoAccessory.cs b/src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoAccessory.cs
new file mode 100644
index 000000000..dfa038b54
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoAccessory.cs
@@ -0,0 +1,82 @@
+using System.Data;
+using System.Reflection;
+namespace SqlSugar
+{
+ public partial class AdoAccessory
+ {
+ protected IDbBind _DbBind;
+ protected IDbFirst _DbFirst;
+ protected ICodeFirst _CodeFirst;
+ protected IDbMaintenance _DbMaintenance;
+ protected IDbConnection _DbConnection;
+
+ protected virtual SugarParameter[] GetParameters(object parameters, PropertyInfo[] propertyInfo, string sqlParameterKeyWord)
+ {
+ List result = new List();
+ if (parameters != null)
+ {
+ var entityType = parameters.GetType();
+ var isDictionary = entityType.IsIn(UtilConstants.DicArraySO, UtilConstants.DicArraySS);
+ if (isDictionary)
+ DictionaryToParameters(parameters, sqlParameterKeyWord, result, entityType);
+ else if (parameters is List)
+ {
+ result = (parameters as List);
+ }
+ else if (parameters is SugarParameter[])
+ {
+ result = (parameters as SugarParameter[]).ToList();
+ }
+ else
+ {
+ Check.Exception(!entityType.IsAnonymousType(), "The parameter format is wrong. \nUse new{{xx=xx, xx2=xx2}} or \nDictionary or \nSugarParameter [] ");
+ ProperyToParameter(parameters, propertyInfo, sqlParameterKeyWord, result, entityType);
+ }
+ }
+ return result.ToArray();
+ }
+ protected void ProperyToParameter(object parameters, PropertyInfo[] propertyInfo, string sqlParameterKeyWord, List listParams, Type entityType)
+ {
+ PropertyInfo[] properties = null;
+ if (propertyInfo != null)
+ properties = propertyInfo;
+ else
+ properties = entityType.GetProperties();
+
+ foreach (PropertyInfo properyty in properties)
+ {
+ var value = properyty.GetValue(parameters, null);
+ if (properyty.PropertyType.IsEnum())
+ value = Convert.ToInt64(value);
+ if (value?.Equals(DateTime.MinValue) != false) value = DBNull.Value;
+ if (properyty.Name.Contains("hierarchyid", StringComparison.CurrentCultureIgnoreCase))
+ {
+ var parameter = new SugarParameter(sqlParameterKeyWord + properyty.Name, SqlDbType.Udt);
+ parameter.UdtTypeName = "HIERARCHYID";
+ parameter.Value = value;
+ listParams.Add(parameter);
+ }
+ else
+ {
+ var parameter = new SugarParameter(sqlParameterKeyWord + properyty.Name, value);
+ listParams.Add(parameter);
+ }
+ }
+ }
+ protected void DictionaryToParameters(object parameters, string sqlParameterKeyWord, List listParams, Type entityType)
+ {
+ if (entityType == UtilConstants.DicArraySO)
+ {
+ var dictionaryParameters = (Dictionary)parameters;
+ var sugarParameters = dictionaryParameters.Select(it => new SugarParameter(sqlParameterKeyWord + it.Key, it.Value));
+ listParams.AddRange(sugarParameters);
+ }
+ else
+ {
+ var dictionaryParameters = (Dictionary)parameters;
+ var sugarParameters = dictionaryParameters.Select(it => new SugarParameter(sqlParameterKeyWord + it.Key, it.Value));
+ listParams.AddRange(sugarParameters); ;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoProvider.cs b/src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoProvider.cs
new file mode 100644
index 000000000..6cd59311d
--- /dev/null
+++ b/src/Admin/ThingsGateway.SqlSugar/Sugar/Abstract/AdoProvider/AdoProvider.cs
@@ -0,0 +1,1836 @@
+using System.Collections;
+using System.Data;
+using System.Data.Common;
+using System.Reflection;
+using System.Text.RegularExpressions;
+namespace SqlSugar
+{
+ ///
+ /// ** description:ActiveX Data Objects
+ /// ** author:sunkaixuan
+ /// ** date:2017/1/2
+ /// ** email:610262374@qq.com
+ ///
+ public abstract partial class AdoProvider : AdoAccessory, IAdo
+ {
+ #region Constructor
+ public AdoProvider()
+ {
+ this.IsEnableLogEvent = false;
+ this.CommandType = CommandType.Text;
+ this.IsClearParameters = true;
+ this.CommandTimeOut = 300;
+ }
+ #endregion
+
+ #region Properties
+ public virtual bool IsNoSql { get; set; }
+ internal bool IsOpenAsync { get; set; }
+ protected List OutputParameters { get; set; }
+ public virtual string SqlParameterKeyWord { get { return "@"; } }
+ public IDbTransaction Transaction { get; set; }
+ public virtual SqlSugarProvider Context { get; set; }
+ internal CommandType OldCommandType { get; set; }
+ internal bool OldClearParameters { get; set; }
+ public IDataParameterCollection DataReaderParameters { get; set; }
+ public TimeSpan SqlExecutionTime { get { return AfterTime - BeforeTime; } }
+ public TimeSpan ConnectionExecutionTime { get { return CheckConnectionAfterTime - CheckConnectionBeforeTime; } }
+ public TimeSpan GetDataExecutionTime { get { return GetDataAfterTime - GetDataBeforeTime; } }
+ ///
+ /// Add, delete and modify: the number of affected items;
+ ///
+ public int SqlExecuteCount { get; protected set; } = 0;
+ public SugarActionType SqlExecuteType { get => this.Context.SugarActionType; }
+ public StackTraceInfo SqlStackTrace { get { return UtilMethods.GetStackTrace(); } }
+ public bool IsDisableMasterSlaveSeparation { get; set; }
+ internal DateTime BeforeTime = DateTime.MinValue;
+ internal DateTime AfterTime = DateTime.MinValue;
+ internal DateTime GetDataBeforeTime = DateTime.MinValue;
+ internal DateTime GetDataAfterTime = DateTime.MinValue;
+ internal DateTime CheckConnectionBeforeTime = DateTime.MinValue;
+ internal DateTime CheckConnectionAfterTime = DateTime.MinValue;
+ public virtual IDbBind DbBind
+ {
+ get
+ {
+ if (base._DbBind == null)
+ {
+ IDbBind bind = InstanceFactory.GetDbBind(this.Context.CurrentConnectionConfig);
+ base._DbBind = bind;
+ bind.Context = this.Context;
+ }
+ return base._DbBind;
+ }
+ }
+ public virtual int CommandTimeOut { get; set; }
+ public virtual CommandType CommandType { get; set; }
+ public virtual bool IsEnableLogEvent { get; set; }
+ public virtual bool IsClearParameters { get; set; }
+ public virtual Action LogEventStarting => this.Context.CurrentConnectionConfig.AopEvents?.OnLogExecuting;
+ public virtual Action LogEventCompleted => this.Context.CurrentConnectionConfig.AopEvents?.OnLogExecuted;
+ public virtual Action CheckConnectionExecuting => this.Context.CurrentConnectionConfig.AopEvents?.CheckConnectionExecuting;
+ public virtual Action CheckConnectionExecuted => this.Context.CurrentConnectionConfig.AopEvents?.CheckConnectionExecuted;
+ public virtual Action OnGetDataReadering => this.Context.CurrentConnectionConfig.AopEvents?.OnGetDataReadering;
+ public virtual Action OnGetDataReadered => this.Context.CurrentConnectionConfig.AopEvents?.OnGetDataReadered;
+ public virtual Func> ProcessingEventStartingSQL => this.Context.CurrentConnectionConfig.AopEvents?.OnExecutingChangeSql;
+ protected virtual Func FormatSql { get; set; }
+ public virtual Action ErrorEvent => this.Context.CurrentConnectionConfig.AopEvents?.OnError;
+ public virtual Action DiffLogEvent => this.Context.CurrentConnectionConfig.AopEvents?.OnDiffLogEvent;
+ public virtual List SlaveConnections { get; set; }
+ public virtual IDbConnection MasterConnection { get; set; }
+ public virtual string MasterConnectionString { get; set; }
+ public virtual CancellationToken? CancellationToken { get; set; }
+ #endregion
+
+ #region Connection
+ public virtual bool IsValidConnection()
+ {
+ try
+ {
+ if (this.IsAnyTran())
+ {
+ return true;
+ }
+ using (OpenAlways())
+ {
+ return true;
+ }
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+ }
+ public virtual bool IsValidConnectionNoClose()
+ {
+ try
+ {
+ this.Open();
+ return true;
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+ }
+ public virtual void Open()
+ {
+ CheckConnection();
+ }
+ public virtual async Task OpenAsync()
+ {
+ await CheckConnectionAsync().ConfigureAwait(false);
+ }
+ public SugarConnection OpenAlways()
+ {
+ SugarConnection result = new SugarConnection();
+ result.IsAutoClose = this.Context.CurrentConnectionConfig.IsAutoCloseConnection;
+ result.conn = this.Connection;
+ result.Context = this.Context;
+ this.Context.CurrentConnectionConfig.IsAutoCloseConnection = false;
+ this.Open();
+ return result;
+ }
+ public virtual void Close()
+ {
+ if (this.Transaction != null)
+ {
+ this.Transaction = null;
+ }
+ if (this.Connection != null && this.Connection.State == ConnectionState.Open)
+ {
+ this.Connection.Close();
+ }
+ if (this.IsMasterSlaveSeparation && this.SlaveConnections.HasValue())
+ {
+ foreach (var slaveConnection in this.SlaveConnections)
+ {
+ if (slaveConnection != null && slaveConnection.State == ConnectionState.Open)
+ {
+ slaveConnection.Close();
+ }
+ }
+ }
+ }
+ public virtual void Dispose()
+ {
+ if (this.Transaction != null)
+ {
+ this.Transaction.Rollback();
+ this.Transaction = null;
+ }
+ //if (this.Connection != null && this.Connection.State != ConnectionState.Open)
+ //{
+ // this.Connection.Close();
+ //}
+ this.Connection?.Dispose();
+ this.Connection = null;
+
+ if (this.IsMasterSlaveSeparation)
+ {
+ if (this.SlaveConnections != null)
+ {
+ foreach (var slaveConnection in this.SlaveConnections)
+ {
+ if (slaveConnection != null && slaveConnection.State == ConnectionState.Open)
+ {
+ slaveConnection.Dispose();
+ }
+ }
+ }
+ }
+ }
+ public virtual void CheckConnection()
+ {
+ this.CheckConnectionBefore(this.Connection);
+ if (this.Connection.State != ConnectionState.Open)
+ {
+ try
+ {
+ this.Connection.Open();
+ }
+ catch (Exception ex)
+ {
+ if (this.Context.CurrentConnectionConfig?.DbType == DbType.SqlServer && ex.Message?.Contains("provider: SSL") == true)
+ {
+ Check.ExceptionEasy(true, ex.Message, "SSL出错,因为升级了驱动,字符串增加Encrypt=True;TrustServerCertificate=True;即可。详细错误:" + ex.Message);
+ }
+ Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message + $"DbType=\"{this.Context.CurrentConnectionConfig.DbType}\";ConfigId=\"{this.Context.CurrentConnectionConfig.ConfigId}\"");
+ }
+ }
+ this.CheckConnectionAfter(this.Connection);
+ }
+
+ public virtual async Task CheckConnectionAsync()
+ {
+ this.CheckConnectionBefore(this.Connection);
+ if (this.Connection.State != ConnectionState.Open)
+ {
+ try
+ {
+ await (Connection as DbConnection).OpenAsync().ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message + $"DbType=\"{this.Context.CurrentConnectionConfig.DbType}\";ConfigId=\"{this.Context.CurrentConnectionConfig.ConfigId}\"");
+ }
+ }
+ this.CheckConnectionAfter(this.Connection);
+ }
+ public virtual void CheckConnectionBefore(IDbConnection Connection)
+ {
+ this.CheckConnectionBeforeTime = DateTime.Now;
+ if (this.IsEnableLogEvent)
+ {
+ Action action = CheckConnectionExecuting;
+ if (action != null)
+ {
+ action(Connection);
+ }
+ }
+ }
+ public virtual void CheckConnectionAfter(IDbConnection Connection)
+ {
+ this.CheckConnectionAfterTime = DateTime.Now;
+ if (this.IsEnableLogEvent)
+ {
+ Action action = CheckConnectionExecuted;
+ if (action != null)
+ {
+ action(Connection, this.ConnectionExecutionTime);
+ }
+ }
+ }
+ #endregion
+
+ #region Transaction
+ public virtual bool IsAnyTran()
+ {
+ return this.Transaction != null;
+ }
+ public virtual bool IsNoTran()
+ {
+ return this.Transaction == null;
+ }
+ public virtual void BeginTran()
+ {
+ CheckConnection();
+ if (this.Transaction == null)
+ this.Transaction = this.Connection.BeginTransaction();
+ }
+ public virtual async Task BeginTranAsync()
+ {
+ await CheckConnectionAsync().ConfigureAwait(false);
+ if (this.Transaction == null)
+ this.Transaction = await (Connection as DbConnection).BeginTransactionAsync().ConfigureAwait(false);
+ }
+ public virtual void BeginTran(IsolationLevel iso)
+ {
+ CheckConnection();
+ if (this.Transaction == null)
+ this.Transaction = this.Connection.BeginTransaction(iso);
+ }
+ public virtual async Task BeginTranAsync(IsolationLevel iso)
+ {
+ await CheckConnectionAsync().ConfigureAwait(false);
+ if (this.Transaction == null)
+ this.Transaction = await (Connection as DbConnection).BeginTransactionAsync(iso).ConfigureAwait(false);
+ }
+ public virtual void RollbackTran()
+ {
+ if (this.Transaction != null)
+ {
+ this.Transaction.Rollback();
+ this.Transaction = null;
+ if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection) this.Close();
+ }
+ }
+
+ public virtual async Task RollbackTranAsync()
+ {
+ if (this.Transaction != null)
+ {
+ await (Transaction as DbTransaction).RollbackAsync().ConfigureAwait(false);
+ this.Transaction = null;
+ if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection) await CloseAsync().ConfigureAwait(false);
+ }
+ }
+ public virtual void CommitTran()
+ {
+ if (this.Transaction != null)
+ {
+ this.Transaction.Commit();
+ this.Transaction = null;
+ if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection) this.Close();
+ }
+ }
+ public virtual async Task CommitTranAsync()
+ {
+ if (this.Transaction != null)
+ {
+ await (Transaction as DbTransaction).CommitAsync().ConfigureAwait(false);
+ this.Transaction = null;
+ if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection) await CloseAsync().ConfigureAwait(false);
+ }
+ }
+ #endregion
+
+ #region abstract
+ public abstract IDataParameter[] ToIDbDataParameter(params SugarParameter[] pars);
+ public abstract void SetCommandToAdapter(IDataAdapter adapter, DbCommand command);
+ public abstract IDataAdapter GetAdapter();
+ public abstract DbCommand GetCommand(string sql, SugarParameter[] pars);
+ public abstract IDbConnection Connection { get; set; }
+ public abstract void BeginTran(string transactionName);//Only SqlServer
+ public abstract void BeginTran(IsolationLevel iso, string transactionName);//Only SqlServer
+ #endregion
+
+ #region Use
+ public SqlSugarTransactionAdo UseTran()
+ {
+ return new SqlSugarTransactionAdo(this.Context);
+ }
+ public DbResult UseTran(Action action, Action errorCallBack = null)
+ {
+ var result = new DbResult();
+ try
+ {
+ this.BeginTran();
+ if (action != null)
+ action();
+ this.CommitTran();
+ result.Data = result.IsSuccess = true;
+ }
+ catch (Exception ex)
+ {
+ result.ErrorException = ex;
+ result.ErrorMessage = ex.Message;
+ result.IsSuccess = false;
+ this.RollbackTran();
+ if (errorCallBack != null)
+ {
+ errorCallBack(ex);
+ }
+ }
+ return result;
+ }
+
+ public async Task> UseTranAsync(Func action, Action errorCallBack = null)
+ {
+ var result = new DbResult();
+ try
+ {
+ await BeginTranAsync().ConfigureAwait(false);
+ if (action != null)
+ await action().ConfigureAwait(false);
+ await CommitTranAsync().ConfigureAwait(false);
+ result.Data = result.IsSuccess = true;
+ }
+ catch (Exception ex)
+ {
+ result.ErrorException = ex;
+ result.ErrorMessage = ex.Message;
+ result.IsSuccess = false;
+ await RollbackTranAsync().ConfigureAwait(false);
+ if (errorCallBack != null)
+ {
+ errorCallBack(ex);
+ }
+ }
+ return result;
+ }
+
+ public DbResult UseTran(Func action, Action errorCallBack = null)
+ {
+ var result = new DbResult();
+ try
+ {
+ this.BeginTran();
+ if (action != null)
+ result.Data = action();
+ this.CommitTran();
+ result.IsSuccess = true;
+ }
+ catch (Exception ex)
+ {
+ result.ErrorException = ex;
+ result.ErrorMessage = ex.Message;
+ result.IsSuccess = false;
+ this.RollbackTran();
+ if (errorCallBack != null)
+ {
+ errorCallBack(ex);
+ }
+ }
+ return result;
+ }
+
+ public async Task> UseTranAsync(Func> action, Action errorCallBack = null)
+ {
+ var result = new DbResult();
+ try
+ {
+ this.BeginTran();
+ if (action != null)
+ result.Data = await action().ConfigureAwait(false);
+ this.CommitTran();
+ result.IsSuccess = true;
+ }
+ catch (Exception ex)
+ {
+ result.ErrorException = ex;
+ result.ErrorMessage = ex.Message;
+ result.IsSuccess = false;
+ this.RollbackTran();
+ if (errorCallBack != null)
+ {
+ errorCallBack(ex);
+ }
+ }
+ return result;
+ }
+
+ public IAdo UseStoredProcedure()
+ {
+ this.OldCommandType = this.CommandType;
+ this.OldClearParameters = this.IsClearParameters;
+ this.CommandType = CommandType.StoredProcedure;
+ this.IsClearParameters = false;
+ return this;
+ }
+ #endregion
+
+ #region Core
+ public virtual int ExecuteCommandWithGo(string sql, params SugarParameter[] parameters)
+ {
+ if (string.IsNullOrEmpty(sql))
+ return 0;
+ if (!sql.Contains("go", StringComparison.CurrentCultureIgnoreCase))
+ {
+ return ExecuteCommand(sql);
+ }
+ System.Collections.ArrayList al = new System.Collections.ArrayList();
+ System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"^(\s*)go(\s*)$", System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Multiline | System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.ExplicitCapture);
+ al.AddRange(reg.Split(sql));
+ int count = 0;
+ foreach (string item in al)
+ {
+ if (item.HasValue())
+ {
+ count += ExecuteCommand(item, parameters);
+ }
+ }
+ return count;
+ }
+ public virtual int ExecuteCommand(string sql, params SugarParameter[] parameters)
+ {
+ try
+ {
+ InitParameters(ref sql, parameters);
+ if (IsFormat(parameters))
+ sql = FormatSql(sql);
+ if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true)
+ return this.Context.CurrentConnectionConfig.SqlMiddle.ExecuteCommand(sql, parameters);
+ SetConnectionStart(sql);
+ if (this.ProcessingEventStartingSQL != null)
+ ExecuteProcessingSQL(ref sql, ref parameters);
+ ExecuteBefore(sql, parameters);
+ IDbCommand sqlCommand = GetCommand(sql, parameters);
+ int count = sqlCommand.ExecuteNonQuery();
+ if (this.IsClearParameters)
+ sqlCommand.Parameters.Clear();
+ // 影响条数
+ this.SqlExecuteCount = count;
+ ExecuteAfter(sql, parameters);
+ sqlCommand.Dispose();
+ return count;
+ }
+ catch (Exception ex)
+ {
+ SugarCatch(ex, sql, parameters);
+ CommandType = CommandType.Text;
+ if (ErrorEvent != null)
+ ExecuteErrorEvent(sql, parameters, ex);
+ throw;
+ }
+ finally
+ {
+ if (this.IsAutoClose()) this.Close();
+ SetConnectionEnd(sql);
+ }
+ }
+ public virtual IDataReader GetDataReader(string sql, params SugarParameter[] parameters)
+ {
+ try
+ {
+ InitParameters(ref sql, parameters);
+ if (IsFormat(parameters))
+ sql = FormatSql(sql);
+ if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true)
+ return this.Context.CurrentConnectionConfig.SqlMiddle.GetDataReader(sql, parameters);
+ SetConnectionStart(sql);
+ var isSp = this.CommandType == CommandType.StoredProcedure;
+ if (this.ProcessingEventStartingSQL != null)
+ ExecuteProcessingSQL(ref sql, ref parameters);
+ ExecuteBefore(sql, parameters);
+ IDbCommand sqlCommand = GetCommand(sql, parameters);
+ IDataReader sqlDataReader = sqlCommand.ExecuteReader(this.IsAutoClose() ? CommandBehavior.CloseConnection : CommandBehavior.Default);
+ if (isSp)
+ DataReaderParameters = sqlCommand.Parameters;
+ if (this.IsClearParameters)
+ sqlCommand.Parameters.Clear();
+ ExecuteAfter(sql, parameters);
+ SetConnectionEnd(sql);
+ if (SugarCompatible.IsFramework || this.Context.CurrentConnectionConfig.DbType != DbType.Sqlite)
+ sqlCommand.Dispose();
+ return sqlDataReader;
+ }
+ catch (Exception ex)
+ {
+ SugarCatch(ex, sql, parameters);
+ CommandType = CommandType.Text;
+ if (ErrorEvent != null)
+ ExecuteErrorEvent(sql, parameters, ex);
+ throw;
+ }
+ }
+ public virtual DataSet GetDataSetAll(string sql, params SugarParameter[] parameters)
+ {
+ try
+ {
+ InitParameters(ref sql, parameters);
+ if (IsFormat(parameters))
+ sql = FormatSql(sql);
+ if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true)
+ return this.Context.CurrentConnectionConfig.SqlMiddle.GetDataSetAll(sql, parameters);
+ SetConnectionStart(sql);
+ if (this.ProcessingEventStartingSQL != null)
+ ExecuteProcessingSQL(ref sql, ref parameters);
+ ExecuteBefore(sql, parameters);
+ IDataAdapter dataAdapter = this.GetAdapter();
+ DbCommand sqlCommand = GetCommand(sql, parameters);
+ this.SetCommandToAdapter(dataAdapter, sqlCommand);
+ DataSet ds = new DataSet();
+ dataAdapter.Fill(ds);
+ if (this.IsClearParameters)
+ sqlCommand.Parameters.Clear();
+ ExecuteAfter(sql, parameters);
+ sqlCommand.Dispose();
+ return ds;
+ }
+ catch (Exception ex)
+ {
+ SugarCatch(ex, sql, parameters);
+ CommandType = CommandType.Text;
+ if (ErrorEvent != null)
+ ExecuteErrorEvent(sql, parameters, ex);
+ throw;
+ }
+ finally
+ {
+ if (this.IsAutoClose()) this.Close();
+ SetConnectionEnd(sql);
+ }
+ }
+ public virtual object GetScalar(string sql, params SugarParameter[] parameters)
+ {
+ try
+ {
+ InitParameters(ref sql, parameters);
+ if (IsFormat(parameters))
+ sql = FormatSql(sql);
+ if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true)
+ return this.Context.CurrentConnectionConfig.SqlMiddle.GetScalar(sql, parameters);
+ SetConnectionStart(sql);
+ if (this.ProcessingEventStartingSQL != null)
+ ExecuteProcessingSQL(ref sql, ref parameters);
+ ExecuteBefore(sql, parameters);
+ IDbCommand sqlCommand = GetCommand(sql, parameters);
+ object scalar = sqlCommand.ExecuteScalar();
+ //scalar = (scalar == null ? 0 : scalar);
+ if (this.IsClearParameters)
+ sqlCommand.Parameters.Clear();
+ ExecuteAfter(sql, parameters);
+ sqlCommand.Dispose();
+ return scalar;
+ }
+ catch (Exception ex)
+ {
+ SugarCatch(ex, sql, parameters);
+ CommandType = CommandType.Text;
+ if (ErrorEvent != null)
+ ExecuteErrorEvent(sql, parameters, ex);
+ throw;
+ }
+ finally
+ {
+ if (this.IsAutoClose()) this.Close();
+ SetConnectionEnd(sql);
+ }
+ }
+
+ public virtual async Task ExecuteCommandAsync(string sql, params SugarParameter[] parameters)
+ {
+ try
+ {
+ Async();
+ InitParameters(ref sql, parameters);
+ if (IsFormat(parameters))
+ sql = FormatSql(sql);
+ if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true)
+ return await Context.CurrentConnectionConfig.SqlMiddle.ExecuteCommandAsync(sql, parameters).ConfigureAwait(false);
+ SetConnectionStart(sql);
+ if (this.ProcessingEventStartingSQL != null)
+ ExecuteProcessingSQL(ref sql, ref parameters);
+ ExecuteBefore(sql, parameters);
+ var sqlCommand = IsOpenAsync ? await GetCommandAsync(sql, parameters).ConfigureAwait(false) : GetCommand(sql, parameters);
+ int count;
+ if (this.CancellationToken == null)
+ count = await sqlCommand.ExecuteNonQueryAsync().ConfigureAwait(false);
+ else
+ count = await sqlCommand.ExecuteNonQueryAsync(CancellationToken.Value).ConfigureAwait(false);
+ if (this.IsClearParameters)
+ sqlCommand.Parameters.Clear();
+ this.SqlExecuteCount = count;
+ ExecuteAfter(sql, parameters);
+ sqlCommand.Dispose();
+ return count;
+ }
+ catch (Exception ex)
+ {
+ SugarCatch(ex, sql, parameters);
+ CommandType = CommandType.Text;
+ if (ErrorEvent != null)
+ ExecuteErrorEvent(sql, parameters, ex);
+ throw;
+ }
+ finally
+ {
+ if (this.IsAutoClose()) this.Close();
+ SetConnectionEnd(sql);
+ }
+ }
+ public virtual async Task GetDataReaderAsync(string sql, params SugarParameter[] parameters)
+ {
+ try
+ {
+ Async();
+ InitParameters(ref sql, parameters);
+ if (IsFormat(parameters))
+ sql = FormatSql(sql);
+ if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true)
+ return await Context.CurrentConnectionConfig.SqlMiddle.GetDataReaderAsync(sql, parameters).ConfigureAwait(false);
+ SetConnectionStart(sql);
+ var isSp = this.CommandType == CommandType.StoredProcedure;
+ if (this.ProcessingEventStartingSQL != null)
+ ExecuteProcessingSQL(ref sql, ref parameters);
+ ExecuteBefore(sql, parameters);
+ var sqlCommand = IsOpenAsync ? await GetCommandAsync(sql, parameters).ConfigureAwait(false) : GetCommand(sql, parameters);
+ DbDataReader sqlDataReader;
+ if (this.CancellationToken == null)
+ sqlDataReader = await sqlCommand.ExecuteReaderAsync(IsAutoClose() ? CommandBehavior.CloseConnection : CommandBehavior.Default).ConfigureAwait(false);
+ else
+ sqlDataReader = await sqlCommand.ExecuteReaderAsync(IsAutoClose() ? CommandBehavior.CloseConnection : CommandBehavior.Default, CancellationToken.Value).ConfigureAwait(false);
+ if (isSp)
+ DataReaderParameters = sqlCommand.Parameters;
+ if (this.IsClearParameters)
+ sqlCommand.Parameters.Clear();
+ ExecuteAfter(sql, parameters);
+ SetConnectionEnd(sql);
+ if (SugarCompatible.IsFramework || this.Context.CurrentConnectionConfig.DbType != DbType.Sqlite)
+ sqlCommand.Dispose();
+ return sqlDataReader;
+ }
+ catch (Exception ex)
+ {
+ SugarCatch(ex, sql, parameters);
+ CommandType = CommandType.Text;
+ if (ErrorEvent != null)
+ ExecuteErrorEvent(sql, parameters, ex);
+ throw;
+ }
+ }
+ public virtual async Task