移除无用文件

This commit is contained in:
ChenYi 2025-06-05 14:37:21 +08:00
parent 5f77e60eab
commit 71f58154ec
17 changed files with 0 additions and 445 deletions

View File

@ -52,8 +52,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C
Temp.Dockerfile = Temp.Dockerfile Temp.Dockerfile = Temp.Dockerfile
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers.Shared", "shared\JiShe.CollectBus.Analyzers.Shared\JiShe.CollectBus.Analyzers.Shared.csproj", "{DD68F314-BC66-5601-B094-B1A7BE93F4E0}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -112,10 +110,6 @@ Global
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Debug|Any CPU.Build.0 = Debug|Any CPU {75B7D419-C261-577D-58D6-AA3ACED9129F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.ActiveCfg = Release|Any CPU {75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.Build.0 = Release|Any CPU {75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.Build.0 = Release|Any CPU
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -134,7 +128,6 @@ Global
{8A61DF78-069B-40B5-8811-614E2960443E} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC} {8A61DF78-069B-40B5-8811-614E2960443E} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{E27377CC-E2D3-4237-060F-96EA214D3129} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC} {E27377CC-E2D3-4237-060F-96EA214D3129} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{75B7D419-C261-577D-58D6-AA3ACED9129F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC} {75B7D419-C261-577D-58D6-AA3ACED9129F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{DD68F314-BC66-5601-B094-B1A7BE93F4E0} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}

View File

@ -1,6 +0,0 @@
namespace JiShe.CollectBus.Protocol.Contracts.ProtocolPools
{
public interface IPluginContainer
{
}
}

View File

@ -1,26 +0,0 @@
using JiShe.CollectBus.Interfaces;
namespace JiShe.CollectBus.Protocol.Contracts.ProtocolPools
{
public class PluginContainer: IPluginContainer
{
public Dictionary<string, object> ProtocolPools;
public PluginContainer()
{
}
}
public static class ServiceProviderKeyedServiceExtensions
{
//public static Task AddKeyedSingleton<TImp>(this IServiceProvider provider, string key)
//{
// //var aa = Activator.CreateInstance<TImp>();
//}
}
}

View File

@ -1,39 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace JiShe.CollectBus.EntityFrameworkCore;
[ConnectionStringName("Default")]
public class CollectBusDbContext :
AbpDbContext<CollectBusDbContext>
{
/* Add DbSet properties for your Aggregate Roots / Entities here. */
#region Entities from the modules
/* Notice: We only implemented IIdentityProDbContext and ISaasDbContext
* and replaced them for this DbContext. This allows you to perform JOIN
* queries for the entities of these modules over the repositories easily. You
* typically don't need that for other modules. But, if you need, you can
* implement the DbContext interface of the needed module and use ReplaceDbContext
* attribute just like IIdentityProDbContext and ISaasDbContext.
*
* More info: Replacing a DbContext of a module ensures that the related module
* uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
*/
#endregion
public CollectBusDbContext(DbContextOptions<CollectBusDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
}
}

View File

@ -1,33 +0,0 @@
using System;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace JiShe.CollectBus.EntityFrameworkCore;
/* This class is needed for EF Core console commands
* (like Add-Migration and Update-Database commands) */
public class CollectBusDbContextFactory : IDesignTimeDbContextFactory<CollectBusDbContext>
{
public CollectBusDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
CollectBusEfCoreEntityExtensionMappings.Configure();
var builder = new DbContextOptionsBuilder<CollectBusDbContext>()
.UseMySql(configuration.GetConnectionString("Default"), MySqlServerVersion.LatestSupportedServerVersion);
return new CollectBusDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../JiShe.CollectBus.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}

View File

@ -1,44 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace JiShe.CollectBus.EntityFrameworkCore;
public static class CollectBusEfCoreEntityExtensionMappings
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
CollectBusGlobalFeatureConfigurator.Configure();
CollectBusModuleExtensionConfigurator.Configure();
OneTimeRunner.Run(() =>
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to map these extra properties to table fields in the database.
*
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
* USE CollectBusModuleExtensionConfigurator CLASS (in the Domain.Shared project)
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
*
* Example: Map a property to a table field:
ObjectExtensionManager.Instance
.MapEfCoreProperty<IdentityUser, string>(
"MyProperty",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(128);
}
);
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
*/
});
}
}

View File

@ -1,50 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
namespace JiShe.CollectBus.EntityFrameworkCore;
[DependsOn(
typeof(CollectBusDomainModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(BlobStoringDatabaseEntityFrameworkCoreModule)
)]
public class CollectBusEntityFrameworkCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
CollectBusEfCoreEntityExtensionMappings.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<CollectBusDbContext>(options =>
{
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});
Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also CollectBusDbContextFactory for EF Core tooling. */
options.UseMySQL();
});
}
}

View File

@ -1,33 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using JiShe.CollectBus.Data;
using Volo.Abp.DependencyInjection;
namespace JiShe.CollectBus.EntityFrameworkCore;
public class EntityFrameworkCoreCollectBusDbSchemaMigrator
: ICollectBusDbSchemaMigrator, ITransientDependency
{
private readonly IServiceProvider _serviceProvider;
public EntityFrameworkCoreCollectBusDbSchemaMigrator(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public async Task MigrateAsync()
{
/* We intentionally resolving the CollectBusDbContext
* from IServiceProvider (instead of directly injecting it)
* to properly get the connection string of the current tenant in the
* current scope.
*/
await _serviceProvider
.GetRequiredService<CollectBusDbContext>()
.Database
.MigrateAsync();
}
}

View File

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

View File

@ -1,40 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>JiShe.CollectBus</RootNamespace>
</PropertyGroup>
<ItemGroup>
<None Remove="FodyWeavers.xml" />
<None Remove="JiShe.CollectBus.EntityFrameworkCore.abppkg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\JiShe.CollectBus.Domain\JiShe.CollectBus.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="8.3.3" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="8.3.3" />
<PackageReference Include="Volo.Abp.MongoDB" Version="8.3.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

View File

@ -1,2 +0,0 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("JiShe.CollectBus.EntityFrameworkCore.Tests")]

View File

@ -1,60 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace JiShe.CollectBus.Analyzers.Shared
{
/// <summary>
/// 实体成员信息
/// </summary>
public sealed class EntityMemberInfo
{
/// <summary>
/// 名称或者路径
/// </summary>
public string NameOrPath { get; set; }
/// <summary>
/// 声明的类型
/// </summary>
public Type DeclaredType { get; set; }
/// <summary>
/// 声明的类型的名称
/// </summary>
public string DeclaredTypeName { get; }
/// <summary>
/// 获取值
/// </summary>
public Func<object, object> Getter { get; }
/// <summary>
/// 设置值
/// </summary>
public Action<object, object> Setter { get; }
/// <summary>
/// 自定义Attribute集合
/// </summary>
public List<Attribute> CustomAttributes { get; set; }
public EntityMemberInfo(
string nameOrPath,
Type declaredType,
string declaredTypeName,
Func<object, object> getter,
Action<object, object> setter)
{
NameOrPath = nameOrPath;
this.DeclaredType = declaredType;
DeclaredTypeName = declaredTypeName;
Getter = getter;
Setter = setter;
}
public object GetValue(object entity) => Getter(entity);
public void SetValue(object entity, object value) => Setter(entity, value);
}
}

View File

@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace JiShe.CollectBus.Analyzers.Shared
{
/// <summary>
/// 实体类型枚举
/// </summary>
public enum EntityTypeEnum
{
/// <summary>
/// IoTDB树模型
/// </summary>
TreeModel = 1,
/// <summary>
/// IoTDB表模型
/// </summary>
TableModel = 2,
/// <summary>
/// 其他情况
/// </summary>
Other = 3
}
}

View File

@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace JiShe.CollectBus.Analyzers.Shared
{
public interface ISourceEntityAccessor<T>
{
/// <summary>
/// 实体类名称
/// </summary>
string EntityName { get; }
/// <summary>
/// 实体类型
/// </summary>
EntityTypeEnum? EntityType { get;}
/// <summary>
/// 获取属性值
/// </summary>
/// <param name="entity"></param>
/// <param name="propertyName"></param>
/// <returns></returns>
object GetPropertyValue(T entity, string propertyName);
/// <summary>
/// 设置属性值
/// </summary>
/// <param name="entity"></param>
/// <param name="propertyName"></param>
/// <param name="value"></param>
void SetPropertyValue(T entity, string propertyName, object value);
/// <summary>
/// 属性名称集合
/// </summary>
List<string> PropertyNameList { get; }
/// <summary>
/// 属性信息集合
/// </summary>
List<EntityMemberInfo> MemberList { get; }
}
}

View File

@ -1,7 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -1,19 +0,0 @@
using System;
namespace JiShe.CollectBus.Analyzers.Shared
{
/// <summary>
/// 标记需要生成源码的类
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class SourceAnalyzersAttribute : Attribute
{
public EntityTypeEnum EntityType { get; }
public SourceAnalyzersAttribute(EntityTypeEnum entityType)
{
EntityType = entityType;
}
}
}