Browse Source

Merge pull request #13959 from abpframework/auto-merge/rel-6-0/1339

Merge branch dev with rel-6.0
pull/13228/head
maliming 3 years ago
committed by GitHub
parent
commit
bedf69d160
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. 3
      build/common.ps1
  3. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs
  4. 2
      modules/account/src/Volo.Abp.Account.Installer/Volo.Abp.Account.Installer.csproj
  5. 2
      modules/account/src/Volo.Abp.Account.Installer/Volo/Abp/Account/AbpAccountInstallerModule.cs
  6. 16
      modules/account/src/Volo.Abp.Account.Installer/Volo/Abp/Account/AccountInstallerPipelineBuilder.cs
  7. 2
      modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj
  8. 2
      modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AbpAuditLoggingInstallerModule.cs
  9. 23
      modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AuditLoggingInstallerPipelineBuilder.cs
  10. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj
  11. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/AbpBackgroundJobsInstallerModule.cs
  12. 23
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/BackgroundJobsInstallerPipelineBuilder.cs
  13. 2
      modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo.Abp.BasicTheme.Installer.csproj
  14. 2
      modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/AbpBasicThemeInstallerModule.cs
  15. 16
      modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/BasicThemeInstallerPipelineBuilder.cs
  16. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo.Abp.BlobStoring.Database.Installer.csproj
  17. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo/Abp/BlobStoring/Database/AbpBlobStoringDatabaseInstallerModule.cs
  18. 23
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo/Abp/BlobStoring/Database/BlobStoringDatabaseInstallerPipelineBuilder.cs
  19. 2
      modules/blogging/src/Volo.Blogging.Installer/Volo.Blogging.Installer.csproj
  20. 2
      modules/blogging/src/Volo.Blogging.Installer/Volo/Blogging/BloggingInstallerModule.cs
  21. 17
      modules/blogging/src/Volo.Blogging.Installer/Volo/Blogging/BloggingInstallerPipelineBuilder.cs
  22. 2
      modules/cms-kit/src/Volo.CmsKit.Installer/Volo.CmsKit.Installer.csproj
  23. 2
      modules/cms-kit/src/Volo.CmsKit.Installer/Volo/Abp/CmsKit/AbpCmsKitInstallerModule.cs
  24. 23
      modules/cms-kit/src/Volo.CmsKit.Installer/Volo/Abp/CmsKit/CmsKitInstallerPipelineBuilder.cs
  25. 2
      modules/docs/src/Volo.Docs.Installer/Volo.Docs.Installer.csproj
  26. 2
      modules/docs/src/Volo.Docs.Installer/Volo/Docs/DocsInstallerModule.cs
  27. 17
      modules/docs/src/Volo.Docs.Installer/Volo/Docs/DocsInstallerPipelineBuilder.cs
  28. 2
      modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/Volo.Abp.FeatureManagement.Installer.csproj
  29. 2
      modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/Volo/Abp/FeatureManagement/AbpFeatureManagementInstallerModule.cs
  30. 23
      modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/Volo/Abp/FeatureManagement/FeatureManagementInstallerPipelineBuilder.cs
  31. 2
      modules/identity/src/Volo.Abp.Identity.Installer/Volo.Abp.Identity.Installer.csproj
  32. 4
      modules/identity/src/Volo.Abp.Identity.Installer/Volo/Abp/Identity/AbpIdentityInstallerModule.cs
  33. 24
      modules/identity/src/Volo.Abp.Identity.Installer/Volo/Abp/Identity/IdentityInstallerPipelineBuilder.cs
  34. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Installer/Volo.Abp.IdentityServer.Installer.csproj
  35. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Installer/Volo/Abp/IdentityServer/AbpIdentityServerInstallerModule.cs
  36. 23
      modules/identityserver/src/Volo.Abp.IdentityServer.Installer/Volo/Abp/IdentityServer/IdentityServerInstallerPipelineBuilder.cs
  37. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.Installer/Volo.Abp.OpenIddict.Installer.csproj
  38. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.Installer/Volo/Abp/OpenIddict/AbpOpenIddictInstallerModule.cs
  39. 16
      modules/openiddict/src/Volo.Abp.OpenIddict.Installer/Volo/Abp/OpenIddict/OpenIddictInstallerPipelineBuilder.cs
  40. 2
      modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/Volo.Abp.PermissionManagement.Installer.csproj
  41. 2
      modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/Volo/Abp/PermissionManagement/AbpPermissionManagementInstallerModule.cs
  42. 23
      modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/Volo/Abp/PermissionManagement/PermissionManagementInstallerPipelineBuilder.cs
  43. 2
      modules/setting-management/src/Volo.Abp.SettingManagement.Installer/Volo.Abp.SettingManagement.Installer.csproj
  44. 2
      modules/setting-management/src/Volo.Abp.SettingManagement.Installer/Volo/Abp/SettingManagement/AbpSettingManagementInstallerModule.cs
  45. 23
      modules/setting-management/src/Volo.Abp.SettingManagement.Installer/Volo/Abp/SettingManagement/SettingManagementInstallerPipelineBuilder.cs
  46. 2
      modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/Volo.Abp.TenantManagement.Installer.csproj
  47. 2
      modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/Volo/Abp/TenantManagement/AbpTenantManagementInstallerModule.cs
  48. 23
      modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/Volo/Abp/TenantManagement/TenantManagementInstallerPipelineBuilder.cs
  49. 2
      modules/users/src/Volo.Abp.Users.Installer/Volo.Abp.Users.Installer.csproj
  50. 2
      modules/users/src/Volo.Abp.Users.Installer/Volo/Abp/Users/AbpUsersInstallerModule.cs
  51. 23
      modules/users/src/Volo.Abp.Users.Installer/Volo/Abp/Users/UsersInstallerPipelineBuilder.cs
  52. 2
      modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/Volo.Abp.VirtualFileExplorer.Installer.csproj
  53. 2
      modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerInstallerModule.cs
  54. 16
      modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/Volo/Abp/VirtualFileExplorer/VirtualFileExplorerInstallerPipelineBuilder.cs
  55. 8
      nupkg/common.ps1
  56. 29
      studio/Volo.Abp.Studio.Open.abpmdl.json
  57. 7
      studio/Volo.Abp.Studio.Open.abpsln.json
  58. 49
      studio/Volo.Abp.Studio.Open.sln
  59. 1
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo.Abp.Studio.Analyzing.Abstractions.abppkg.json
  60. 14
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo.Abp.Studio.Analyzing.Abstractions.csproj
  61. 8
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/AbpStudioAnalyzingAbstractionsModule.cs
  62. 20
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Application/ApplicationServiceModel.cs
  63. 23
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Authorization/PermissionModel.cs
  64. 16
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/DatabaseCollectionModel.cs
  65. 16
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/DatabaseTableModel.cs
  66. 24
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/EfCoreDbContextModel.cs
  67. 6
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/IDbContextModel.cs
  68. 24
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/MongoDbContextModel.cs
  69. 11
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/AggregateRootModel.cs
  70. 17
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/DomainServiceModel.cs
  71. 24
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/EntityModel.cs
  72. 19
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/RepositoryInterfaceModel.cs
  73. 39
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Feature/FeatureModel.cs
  74. 15
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Module/AbpModuleModel.cs
  75. 15
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageContentItemModel.cs
  76. 25
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageContentItemNameAttribute.cs
  77. 8
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageContentList.cs
  78. 19
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageModel.cs
  79. 25
      studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Setting/SettingModel.cs
  80. 1
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo.Abp.Studio.Domain.CommonServices.abppkg.json
  81. 21
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo.Abp.Studio.Domain.CommonServices.csproj
  82. 16
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/AbpStudioDomainCommonServicesModule.cs
  83. 27
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/AbpStudioException.cs
  84. 36
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Helpers/PathHelper.cs
  85. 76
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/AbpModuleFileManager.cs
  86. 261
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/CsprojFileManager.cs
  87. 10
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/IAbpModuleFileManager.cs
  88. 25
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/ICsprojFileManager.cs
  89. 17
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/INugetSourceCodeStore.cs
  90. 35
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/NugetPackageCacheManager.cs
  91. 162
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/NugetSourceCodeStore.cs
  92. 17
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/TemplateNugetPackageInfoProvider.cs
  93. 29
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Package/PackageDependency.cs
  94. 243
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Package/PackageTypes.cs
  95. 7
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Package/ReferenceType.cs
  96. 125
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/DotnetSlnFileModifierService.cs
  97. 8
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/IDotnetSlnFileModifierService.cs
  98. 8
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/ISolutionFileModuleAdder.cs
  99. 46
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/SolutionFileModuleAdder.cs
  100. 50
      studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Xml/XmlFileManagerBase.cs

4
.gitignore

@ -323,3 +323,7 @@ deploy/npm-auth-token.txt
deploy/ssh-password.txt
deploy/github-api-key.txt
deploy/_run_all_log.txt
# No commit yarn.lock files in the subfolders of templates directory
templates/**/yarn.lock

3
build/common.ps1

@ -20,8 +20,7 @@ $solutionPaths = @(
"../modules/background-jobs",
"../modules/account",
"../modules/cms-kit",
"../modules/blob-storing-database",
"../studio"
"../modules/blob-storing-database"
)
if ($full -eq "-f")

4
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs

@ -221,7 +221,9 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency
}
catch (Exception ex)
{
throw new Exception($"Error occured while getting the versions from {url} : {ex.Message}");
Logger.LogWarning($"Error occured while getting the versions from {url} : {ex.Message}");
// The remote service is currently unavailable, try to work offline.
return true;
}
}

2
modules/account/src/Volo.Abp.Account.Installer/Volo.Abp.Account.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/account/src/Volo.Abp.Account.Installer/Volo/Abp/Account/AbpAccountInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.Account;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpAccountInstallerModule : AbpModule

16
modules/account/src/Volo.Abp.Account.Installer/Volo/Abp/Account/AccountInstallerPipelineBuilder.cs

@ -1,16 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.Account;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class AccountInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
return GetBasePipeline(context);
}
}

2
modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AbpAuditLoggingInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AuditLogging;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpAuditLoggingInstallerModule : AbpModule

23
modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AuditLoggingInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.AuditLogging;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class AuditLoggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.AuditLogging.EntityFrameworkCore",
"ConfigureAuditLogging"
)
);
return GetBasePipeline(context);
}
}

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/AbpBackgroundJobsInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpBackgroundJobsInstallerModule : AbpModule

23
modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/BackgroundJobsInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.BackgroundJobs;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class BackgroundJobsInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.BackgroundJobs.EntityFrameworkCore",
"ConfigureBackgroundJobs"
)
);
return GetBasePipeline(context);
}
}

2
modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo.Abp.BasicTheme.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/AbpBasicThemeInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.BasicTheme;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpBasicThemeInstallerModule : AbpModule

16
modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/BasicThemeInstallerPipelineBuilder.cs

@ -1,16 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.BasicTheme;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class BasicThemeInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
return GetBasePipeline(context);
}
}

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo.Abp.BlobStoring.Database.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo/Abp/BlobStoring/Database/AbpBlobStoringDatabaseInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.BlobStoring.Database;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpBlobStoringDatabaseInstallerModule : AbpModule

23
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo/Abp/BlobStoring/Database/BlobStoringDatabaseInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.BlobStoring.Database;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class BlobStoringDatabaseInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.BlobStoring.Database.EntityFrameworkCore",
"ConfigureBlobStoring"
)
);
return GetBasePipeline(context);
}
}

2
modules/blogging/src/Volo.Blogging.Installer/Volo.Blogging.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/blogging/src/Volo.Blogging.Installer/Volo/Blogging/BloggingInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Blogging;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class BloggingInstallerModule : AbpModule

17
modules/blogging/src/Volo.Blogging.Installer/Volo/Blogging/BloggingInstallerPipelineBuilder.cs

@ -1,17 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Blogging;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class BloggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
return GetBasePipeline(context);
}
}

2
modules/cms-kit/src/Volo.CmsKit.Installer/Volo.CmsKit.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/cms-kit/src/Volo.CmsKit.Installer/Volo/Abp/CmsKit/AbpCmsKitInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.CmsKit;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class VoloCmsKitInstallerModule : AbpModule

23
modules/cms-kit/src/Volo.CmsKit.Installer/Volo/Abp/CmsKit/CmsKitInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.CmsKit;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class BlobStoringDatabaseInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.CmsKit.EntityFrameworkCore",
"ConfigureCmsKit"
)
);
return GetBasePipeline(context);
}
}

2
modules/docs/src/Volo.Docs.Installer/Volo.Docs.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/docs/src/Volo.Docs.Installer/Volo/Docs/DocsInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Docs;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class DocsInstallerModule : AbpModule

17
modules/docs/src/Volo.Docs.Installer/Volo/Docs/DocsInstallerPipelineBuilder.cs

@ -1,17 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Docs;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class DocsInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
return GetBasePipeline(context);
}
}

2
modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/Volo.Abp.FeatureManagement.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/Volo/Abp/FeatureManagement/AbpFeatureManagementInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.FeatureManagement;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpFeatureManagementInstallerModule : AbpModule

23
modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/Volo/Abp/FeatureManagement/FeatureManagementInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.FeatureManagement;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class FeatureManagementInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.FeatureManagement.EntityFrameworkCore",
"ConfigureFeatureManagement"
)
);
return GetBasePipeline(context);
}
}

2
modules/identity/src/Volo.Abp.Identity.Installer/Volo.Abp.Identity.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

4
modules/identity/src/Volo.Abp.Identity.Installer/Volo/Abp/Identity/AbpIdentityInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Studio;
using Volo.Abp.Modularity;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.Identity
{
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpIdentityInstallerModule : AbpModule

24
modules/identity/src/Volo.Abp.Identity.Installer/Volo/Abp/Identity/IdentityInstallerPipelineBuilder.cs

@ -1,24 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.Identity
{
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class IdentityInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.Identity.EntityFrameworkCore",
"ConfigureIdentity"
)
);
return GetBasePipeline(context);
}
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Installer/Volo.Abp.IdentityServer.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/identityserver/src/Volo.Abp.IdentityServer.Installer/Volo/Abp/IdentityServer/AbpIdentityServerInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.IdentityServer;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpIdentityServerInstallerModule : AbpModule

23
modules/identityserver/src/Volo.Abp.IdentityServer.Installer/Volo/Abp/IdentityServer/IdentityServerInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.IdentityServer;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class IdentityServerInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.IdentityServer.EntityFrameworkCore",
"ConfigureIdentityServer"
)
);
return GetBasePipeline(context);
}
}

2
modules/openiddict/src/Volo.Abp.OpenIddict.Installer/Volo.Abp.OpenIddict.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/openiddict/src/Volo.Abp.OpenIddict.Installer/Volo/Abp/OpenIddict/AbpOpenIddictInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.OpenIddict;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpOpenIddictInstallerModule : AbpModule

16
modules/openiddict/src/Volo.Abp.OpenIddict.Installer/Volo/Abp/OpenIddict/OpenIddictInstallerPipelineBuilder.cs

@ -1,16 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.OpenIddict;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class OpenIddictInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
return GetBasePipeline(context);
}
}

2
modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/Volo.Abp.PermissionManagement.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/Volo/Abp/PermissionManagement/AbpPermissionManagementInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.PermissionManagement;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpPermissionManagementInstallerModule : AbpModule

23
modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/Volo/Abp/PermissionManagement/PermissionManagementInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.PermissionManagement;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class PermissionManagementInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.PermissionManagement.EntityFrameworkCore",
"ConfigurePermissionManagement"
)
);
return GetBasePipeline(context);
}
}

2
modules/setting-management/src/Volo.Abp.SettingManagement.Installer/Volo.Abp.SettingManagement.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/setting-management/src/Volo.Abp.SettingManagement.Installer/Volo/Abp/SettingManagement/AbpSettingManagementInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.SettingManagement;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpSettingManagementInstallerModule : AbpModule

23
modules/setting-management/src/Volo.Abp.SettingManagement.Installer/Volo/Abp/SettingManagement/SettingManagementInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.SettingManagement;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class SettingManagementInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.SettingManagement.EntityFrameworkCore",
"ConfigureSettingManagement"
)
);
return GetBasePipeline(context);
}
}

2
modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/Volo.Abp.TenantManagement.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/Volo/Abp/TenantManagement/AbpTenantManagementInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.TenantManagement;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpTenantManagementInstallerModule : AbpModule

23
modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/Volo/Abp/TenantManagement/TenantManagementInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.TenantManagement;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class AuditLoggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.TenantManagement.EntityFrameworkCore",
"ConfigureTenantManagement"
)
);
return GetBasePipeline(context);
}
}

2
modules/users/src/Volo.Abp.Users.Installer/Volo.Abp.Users.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/users/src/Volo.Abp.Users.Installer/Volo/Abp/Users/AbpUsersInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.Users;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpUsersInstallerModule : AbpModule

23
modules/users/src/Volo.Abp.Users.Installer/Volo/Abp/Users/UsersInstallerPipelineBuilder.cs

@ -1,23 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.Users;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class UsersInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
context.AddEfCoreConfigurationMethodDeclaration(
new EfCoreConfigurationMethodDeclaration(
"Volo.Abp.Users.EntityFrameworkCore",
"ConfigureAbpUser"
)
);
return GetBasePipeline(context);
}
}

2
modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/Volo.Abp.VirtualFileExplorer.Installer.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\abp-studio\src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>

2
modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerInstallerModule.cs

@ -1,11 +1,9 @@
using Volo.Abp.Modularity;
using Volo.Abp.Studio;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.VirtualFileExplorer;
[DependsOn(
typeof(AbpStudioModuleInstallerModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpVirtualFileExplorerInstallerModule : AbpModule

16
modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/Volo/Abp/VirtualFileExplorer/VirtualFileExplorerInstallerPipelineBuilder.cs

@ -1,16 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.ModuleInstalling;
namespace Volo.Abp.VirtualFileExplorer;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))]
public class VirtualFileExplorerInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency
{
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context)
{
return GetBasePipeline(context);
}
}

8
nupkg/common.ps1

@ -69,7 +69,6 @@ function Read-File {
# List of solutions
$solutions = (
"framework",
"../abp-studio",
"modules/account",
"modules/audit-logging",
"modules/background-jobs",
@ -232,13 +231,6 @@ $projects = (
"framework/src/Volo.Abp.Kafka",
"framework/src/Volo.Abp.Swashbuckle",
# studio
"../abp-studio/src/Volo.Abp.Studio.Domain.Shared",
"../abp-studio/src/Volo.Abp.Studio.Domain.CommonServices",
"../abp-studio/src/Volo.Abp.Studio.ModuleInstaller.Abstractions",
"../abp-studio/src/Volo.Abp.Studio.ModuleInstaller",
"../abp-studio/src/Volo.Abp.Studio.Analyzing.Abstractions",
# modules/account
"modules/account/src/Volo.Abp.Account.Application.Contracts",
"modules/account/src/Volo.Abp.Account.Application",

29
studio/Volo.Abp.Studio.Open.abpmdl.json

@ -1,29 +0,0 @@
{
"folders": {
"items": {
"src": {}
}
},
"packages": {
"Volo.Abp.Studio.Analyzing.Abstractions": {
"path": "src/Volo.Abp.Studio.Analyzing.Abstractions/Volo.Abp.Studio.Analyzing.Abstractions.abppkg.json",
"folder": "src"
},
"Volo.Abp.Studio.Domain.CommonServices": {
"path": "src/Volo.Abp.Studio.Domain.CommonServices/Volo.Abp.Studio.Domain.CommonServices.abppkg.json",
"folder": "src"
},
"Volo.Abp.Studio.Domain.Shared": {
"path": "src/Volo.Abp.Studio.Domain.Shared/Volo.Abp.Studio.Domain.Shared.abppkg.json",
"folder": "src"
},
"Volo.Abp.Studio.ModuleInstaller": {
"path": "src/Volo.Abp.Studio.ModuleInstaller/Volo.Abp.Studio.ModuleInstaller.abppkg.json",
"folder": "src"
},
"Volo.Abp.Studio.ModuleInstaller.Abstractions": {
"path": "src/Volo.Abp.Studio.ModuleInstaller.Abstractions/Volo.Abp.Studio.ModuleInstaller.Abstractions.abppkg.json",
"folder": "src"
}
}
}

7
studio/Volo.Abp.Studio.Open.abpsln.json

@ -1,7 +0,0 @@
{
"modules": {
"Volo.Abp.Studio.Open": {
"path": "Volo.Abp.Studio.Open.abpmdl.json"
}
}
}

49
studio/Volo.Abp.Studio.Open.sln

@ -1,49 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{344A1096-CC05-42D1-BDDB-E254C27508A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.Analyzing.Abstractions", "src\Volo.Abp.Studio.Analyzing.Abstractions\Volo.Abp.Studio.Analyzing.Abstractions.csproj", "{2271296E-33FD-46BE-97FD-9938193CB7D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.Domain.CommonServices", "src\Volo.Abp.Studio.Domain.CommonServices\Volo.Abp.Studio.Domain.CommonServices.csproj", "{1C86021F-E522-41A1-AC3F-01B0E474D75E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.Domain.Shared", "src\Volo.Abp.Studio.Domain.Shared\Volo.Abp.Studio.Domain.Shared.csproj", "{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.ModuleInstaller", "src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj", "{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.ModuleInstaller.Abstractions", "src\Volo.Abp.Studio.ModuleInstaller.Abstractions\Volo.Abp.Studio.ModuleInstaller.Abstractions.csproj", "{99679BF9-B888-4814-8E85-F751984CAFF8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Release|Any CPU.Build.0 = Release|Any CPU
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Release|Any CPU.Build.0 = Release|Any CPU
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Release|Any CPU.Build.0 = Release|Any CPU
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Release|Any CPU.Build.0 = Release|Any CPU
{99679BF9-B888-4814-8E85-F751984CAFF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99679BF9-B888-4814-8E85-F751984CAFF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99679BF9-B888-4814-8E85-F751984CAFF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99679BF9-B888-4814-8E85-F751984CAFF8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2271296E-33FD-46BE-97FD-9938193CB7D1} = {344A1096-CC05-42D1-BDDB-E254C27508A9}
{1C86021F-E522-41A1-AC3F-01B0E474D75E} = {344A1096-CC05-42D1-BDDB-E254C27508A9}
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597} = {344A1096-CC05-42D1-BDDB-E254C27508A9}
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C} = {344A1096-CC05-42D1-BDDB-E254C27508A9}
{99679BF9-B888-4814-8E85-F751984CAFF8} = {344A1096-CC05-42D1-BDDB-E254C27508A9}
EndGlobalSection
EndGlobal

1
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo.Abp.Studio.Analyzing.Abstractions.abppkg.json

@ -1 +0,0 @@
{}

14
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo.Abp.Studio.Analyzing.Abstractions.csproj

@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.Core\Volo.Abp.Core.csproj" />
</ItemGroup>
</Project>

8
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/AbpStudioAnalyzingAbstractionsModule.cs

@ -1,8 +0,0 @@
using Volo.Abp.Modularity;
namespace Volo.Abp.Studio.Analyzing;
public class AbpStudioAnalyzingAbstractionsModule : AbpModule
{
}

20
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Application/ApplicationServiceModel.cs

@ -1,20 +0,0 @@
using System.Collections.Generic;
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Application;
[PackageContentItemName(ContentTypeName)]
public class ApplicationServiceModel : PackageContentItemModel
{
public const string ContentTypeName = "applicationService";
public string Namespace { get; set; }
public string Summary { get; set; }
public List<string> ImplementingInterfaces { get; set; }
public ApplicationServiceModel([NotNull] string name) : base(name)
{
}
}

23
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Authorization/PermissionModel.cs

@ -1,23 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Authorization;
[PackageContentItemName(ContentTypeName)]
public class PermissionModel : PackageContentItemModel
{
public const string ContentTypeName = "permission";
public string DisplayName { get; }
public bool IsEnabled { get; }
public PermissionModel(
[NotNull] string name,
string displayName,
bool isEnabled)
: base(name)
{
DisplayName = displayName;
IsEnabled = isEnabled;
}
}

16
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/DatabaseCollectionModel.cs

@ -1,16 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Database;
[PackageContentItemName(ContentTypeName)]
public class DatabaseCollectionModel : PackageContentItemModel
{
public const string ContentTypeName = "databaseCollection";
public string EntityFullName { get; private set; }
public DatabaseCollectionModel([NotNull] string name, string entityFullName) : base(name)
{
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName));
}
}

16
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/DatabaseTableModel.cs

@ -1,16 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Database;
[PackageContentItemName(ContentTypeName)]
public class DatabaseTableModel : PackageContentItemModel
{
public const string ContentTypeName = "databaseTable";
public string EntityFullName { get; private set; }
public DatabaseTableModel([NotNull] string name, string entityFullName) : base(name)
{
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName));
}
}

24
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/EfCoreDbContextModel.cs

@ -1,24 +0,0 @@
using System.Collections.Generic;
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Database;
[PackageContentItemName(ContentTypeName)]
public class EfCoreDbContextModel : PackageContentItemModel, IDbContextModel
{
public const string ContentTypeName = "efCoreDbContext";
public string Namespace { get; private set; }
public string ConnectionStringName { get; set; }
public List<DatabaseTableModel> DatabaseTables { get; set; }
public EfCoreDbContextModel(
[NotNull] string name,
[NotNull] string @namespace
) : base(name)
{
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace));
}
}

6
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/IDbContextModel.cs

@ -1,6 +0,0 @@
namespace Volo.Abp.Studio.Analyzing.Models.Database;
public interface IDbContextModel
{
string ConnectionStringName { get; set; }
}

24
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Database/MongoDbContextModel.cs

@ -1,24 +0,0 @@
using System.Collections.Generic;
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Database;
[PackageContentItemName(ContentTypeName)]
public class MongoDbContextModel : PackageContentItemModel, IDbContextModel
{
public const string ContentTypeName = "mongoDbContext";
public string Namespace { get; private set; }
public string ConnectionStringName { get; set; }
public List<DatabaseCollectionModel> DatabaseCollections { get; set; }
public MongoDbContextModel(
[NotNull] string name,
[NotNull] string @namespace
) : base(name)
{
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace));
}
}

11
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/AggregateRootModel.cs

@ -1,11 +0,0 @@
namespace Volo.Abp.Studio.Analyzing.Models.Domain;
[PackageContentItemName(ContentTypeName)]
public class AggregateRootModel : EntityModel
{
public new const string ContentTypeName = "aggregateRoot";
public AggregateRootModel(string name) : base(name)
{
}
}

17
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/DomainServiceModel.cs

@ -1,17 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Domain;
[PackageContentItemName(ContentTypeName)]
public class DomainServiceModel : PackageContentItemModel
{
public const string ContentTypeName = "domainService";
public string Namespace { get; set; }
public string Summary { get; set; }
public DomainServiceModel([NotNull] string name) : base(name)
{
}
}

24
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/EntityModel.cs

@ -1,24 +0,0 @@
using System.Collections.Generic;
namespace Volo.Abp.Studio.Analyzing.Models.Domain;
[PackageContentItemName(ContentTypeName)]
public class EntityModel : PackageContentItemModel
{
public const string ContentTypeName = "entity";
public string Namespace { get; set; }
public string PrimaryKeyType { get; set; }
public string Summary { get; set; }
public List<string> CollectionProperties { get; set; }
public List<string> NavigationProperties { get; set; }
public EntityModel(string name) : base(name)
{
CollectionProperties = new List<string>();
NavigationProperties = new List<string>();
}
}

19
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Domain/RepositoryInterfaceModel.cs

@ -1,19 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Domain;
[PackageContentItemName(ContentTypeName)]
public class RepositoryInterfaceModel : PackageContentItemModel
{
public const string ContentTypeName = "repositoryInterface";
public string Namespace { get; set; }
public string Summary { get; set; }
public EntityModel EntityModel { get; set; }
public RepositoryInterfaceModel([NotNull] string name) : base(name)
{
}
}

39
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Feature/FeatureModel.cs

@ -1,39 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Feature;
[PackageContentItemName(ContentTypeName)]
public class FeatureModel : PackageContentItemModel
{
public const string ContentTypeName = "feature";
public string ValueType { get; }
public string DefaultValue { get; }
public string DisplayName { get; }
public string Description { get; }
public bool IsAvailableToHost { get; }
public bool IsVisibleToClients { get; }
public FeatureModel(
[NotNull] string name,
[NotNull] string valueType,
string defaultValue,
string displayName,
string description,
bool isAvailableToHost,
bool isVisibleToClients
) : base(name)
{
ValueType = valueType;
DefaultValue = defaultValue;
DisplayName = displayName;
Description = description;
IsAvailableToHost = isAvailableToHost;
IsVisibleToClients = isVisibleToClients;
}
}

15
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Module/AbpModuleModel.cs

@ -1,15 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Module;
[PackageContentItemName(ContentTypeName)]
public class AbpModuleModel : PackageContentItemModel
{
public const string ContentTypeName = "abpModule";
public string Namespace { get; set; }
public AbpModuleModel([NotNull] string name) : base(name)
{
}
}

15
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageContentItemModel.cs

@ -1,15 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models;
public abstract class PackageContentItemModel
{
public string ContentType { get; }
public string Name { get; }
public PackageContentItemModel([NotNull] string name)
{
Name = Check.NotNullOrWhiteSpace(name, nameof(name));
ContentType = PackageContentItemNameAttribute.GetName(GetType());
}
}

25
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageContentItemNameAttribute.cs

@ -1,25 +0,0 @@
using System;
using Volo.Abp.Reflection;
namespace Volo.Abp.Studio.Analyzing.Models;
public class PackageContentItemNameAttribute : Attribute
{
public string Name { get; }
public PackageContentItemNameAttribute(string name)
{
Name = name;
}
public static string GetName(Type type)
{
var attribute = ReflectionHelper.GetSingleAttributeOrDefault<PackageContentItemNameAttribute>(type);
if (attribute == null)
{
throw new ApplicationException($"Given type {type.FullName} must have an {nameof(PackageContentItemNameAttribute)}, but not defined!");
}
return attribute.Name;
}
}

8
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageContentList.cs

@ -1,8 +0,0 @@
using System.Collections.Generic;
namespace Volo.Abp.Studio.Analyzing.Models;
public class PackageContentList : List<PackageContentItemModel>
{
}

19
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/PackageModel.cs

@ -1,19 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models;
public class PackageModel
{
public string Name { get; }
public string Hash { get; }
public PackageContentList Contents { get; }
public PackageModel([NotNull] string name, [NotNull] string hash)
{
Name = Check.NotNullOrWhiteSpace(name, nameof(name));
Contents = new PackageContentList();
Hash = hash;
}
}

25
studio/src/Volo.Abp.Studio.Analyzing.Abstractions/Volo/Abp/Studio/Analyzing/Models/Setting/SettingModel.cs

@ -1,25 +0,0 @@
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Analyzing.Models.Setting;
[PackageContentItemName(ContentTypeName)]
public class SettingModel : PackageContentItemModel
{
public const string ContentTypeName = "setting";
public string DefaultValue { get; set; }
public string DisplayName { get; set; }
public string Description { get; set; }
public bool IsVisibleToClient { get; set; }
public bool IsInherited { get; set; }
public bool IsEncrypted { get; set; }
public SettingModel([NotNull] string name) : base(name)
{
}
}

1
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo.Abp.Studio.Domain.CommonServices.abppkg.json

@ -1 +0,0 @@
{}

21
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo.Abp.Studio.Domain.CommonServices.csproj

@ -1,21 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.IO.Abstractions" Version="13.2.28" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.Studio.Domain.Shared\Volo.Abp.Studio.Domain.Shared.csproj" />
</ItemGroup>
</Project>

16
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/AbpStudioDomainCommonServicesModule.cs

@ -1,16 +0,0 @@
using System.IO.Abstractions;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace Volo.Abp.Studio;
[DependsOn(
typeof(AbpStudioDomainSharedModule)
)]
public class AbpStudioDomainCommonServicesModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<IFileSystem>(new FileSystem());
}
}

27
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/AbpStudioException.cs

@ -1,27 +0,0 @@
using System;
using System.Runtime.Serialization;
using Microsoft.Extensions.Logging;
namespace Volo.Abp.Studio;
public class AbpStudioException : BusinessException
{
public AbpStudioException(
string code = null,
string message = null,
string details = null,
Exception innerException = null,
LogLevel logLevel = LogLevel.Warning)
: base(code, message, details, innerException, logLevel)
{
Code = code;
Details = details;
LogLevel = logLevel;
}
public AbpStudioException(SerializationInfo serializationInfo, StreamingContext context)
: base(serializationInfo, context)
{
}
}

36
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Helpers/PathHelper.cs

@ -1,36 +0,0 @@
using System;
using System.Runtime.InteropServices;
using JetBrains.Annotations;
namespace Volo.Abp.Studio.Helpers;
public static class PathHelper
{
public static string GetRelativePath([NotNull] string basePath, [NotNull] string targetPath)
{
Check.NotNull(basePath, nameof(basePath));
Check.NotNull(targetPath, nameof(targetPath));
return new Uri(basePath).MakeRelativeUri(new Uri(targetPath)).ToString();
}
public static string EnsureForwardSlash(string path)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return path.Replace("\\", "/");
}
return path;
}
public static string Normalize(string path)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return path.Replace("/", "\\");
}
return path;
}
}

76
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/AbpModuleFileManager.cs

@ -1,76 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO.Abstractions;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Studio.Packages.Modifying;
public class AbpModuleFileManager : IAbpModuleFileManager, ITransientDependency
{
public IFileSystem FileSystem { get; }
public AbpModuleFileManager(IFileSystem fileSystem)
{
FileSystem = fileSystem;
}
public async Task AddDependency(string filePath, string moduleToAdd)
{
var fileContent = await FileSystem.File.ReadAllTextAsync(filePath);
var moduleName = moduleToAdd.Split(".").Last();
var moduleNamespace = moduleToAdd.RemovePostFix("." + moduleName);
var usingStatement = $"using {moduleNamespace};";
var dependsOnStart = $"DependsOn(";
if (fileContent.Contains($"typeof({moduleName})"))
{
// module already added
return;
}
if (!fileContent.NormalizeLineEndings().SplitToLines().Any(l => l.Trim().StartsWith("namespace ") && l.Contains(moduleNamespace)) &&
!fileContent.Contains(usingStatement)
)
{
fileContent = usingStatement + Environment.NewLine + fileContent;
}
if (!fileContent.Contains(dependsOnStart))
{
var fileLines = fileContent.NormalizeLineEndings().SplitToLines().ToList();
fileLines.InsertBefore(l => l.Contains("public") && l.Contains("class"), $" [DependsOn(typeof({moduleName}))]");
fileContent = fileLines.JoinAsString(Environment.NewLine);
}
else
{
var fileLines = fileContent.NormalizeLineEndings().SplitToLines().ToList();
var dependsOnStartLine = fileLines.First(l => l.Contains(dependsOnStart));
var dependsOnStartLineModified = dependsOnStartLine.Replace(dependsOnStart,
dependsOnStart + Environment.NewLine +
$" typeof({moduleName}),"
);
fileContent = fileContent.Replace(dependsOnStartLine, dependsOnStartLineModified);
}
FileSystem.File.WriteAllTextAsync(filePath, fileContent);
}
public async Task<string> ExtractModuleNameWithNamespace(string filePath)
{
var fileContent = await FileSystem.File.ReadAllTextAsync(filePath);
var fileLines = fileContent.NormalizeLineEndings().SplitToLines();
var lineOfClassName = fileLines.First(l => l.Contains("public") && l.Contains("class"));
var moduleName = lineOfClassName.Split(":")[0].Trim().Split(" ").Last();
var lineOfNamespace = fileLines.First(l => l.Trim().StartsWith("namespace"));
var moduleNamespace = lineOfNamespace.Split(" ").Skip(1).First();
return moduleNamespace + "." + moduleName;
}
}

261
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/CsprojFileManager.cs

@ -1,261 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Xml;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.Helpers;
using Volo.Abp.Studio.Package;
using Volo.Abp.Studio.Xml;
namespace Volo.Abp.Studio.Packages.Modifying;
public class CsprojFileManager : XmlFileManagerBase, ICsprojFileManager, ITransientDependency
{
public async Task AddProjectReferenceAsync(string filePath, string projectToReference)
{
var document = await GetXmlDocumentAsync(filePath);
/*if (document.SelectNodes($"/Project/ItemGroup/ProjectReference[ends-with(@Include, '{Path.GetFileName(projectToReference)}')]").Count > 0)
{
return;
}*/
var packageReferenceToSameProject =
document.SelectNodes(
$"/Project/ItemGroup/PackageReference[starts-with(@Include, '{Path.GetFileName(projectToReference).RemovePostFix(".csproj")}')]"
);
if (packageReferenceToSameProject.Count > 0)
{
packageReferenceToSameProject[0].ParentNode.RemoveChild(packageReferenceToSameProject[0]);
}
var relativePath = PathHelper.GetRelativePath(filePath, projectToReference);
var itemGroupNode = GetOrCreateItemGroupNode(document);
var newNode = document.CreateElement("ProjectReference");
var includeAttr = document.CreateAttribute("Include");
includeAttr.Value = relativePath;
newNode.Attributes.Append(includeAttr);
itemGroupNode.AppendChild(newNode);
await SaveXmlDocumentAsync(filePath, document);
}
public async Task AddPackageReferenceAsync(string filePath, string packageName, string version)
{
var document = await GetXmlDocumentAsync(filePath);
if (document.SelectNodes($"/Project/ItemGroup/PackageReference[starts-with(@Include, '{packageName}')]").Count > 0)
{
// Package reference is already added.
return;
}
var itemGroupNode = GetOrCreateItemGroupNode(document);
var newNode = document.CreateElement("PackageReference");
var includeAttr = document.CreateAttribute("Include");
includeAttr.Value = packageName;
newNode.Attributes.Append(includeAttr);
var versionAttr = document.CreateAttribute("Version");
versionAttr.Value = version;
newNode.Attributes.Append(versionAttr);
itemGroupNode.AppendChild(newNode);
itemGroupNode.AppendChild(document.CreateWhitespace(Environment.NewLine + " "));
await SaveXmlDocumentAsync(filePath, document);
}
public async Task AddImportAsync(string filePath, string importFilePath)
{
var document = await GetXmlDocumentAsync(filePath);
var relativeImportFilePath = PathHelper.GetRelativePath(filePath, importFilePath);
var importNode = document.CreateElement("Import");
var projectAttr = document.CreateAttribute("Project");
projectAttr.Value = relativeImportFilePath;
importNode.Attributes.Append(projectAttr);
document["Project"].AppendChild(importNode);
document["Project"].AppendChild(document.CreateWhitespace(Environment.NewLine + " "));
await SaveXmlDocumentAsync(filePath, document);
}
public async Task AddAssemblyVersionAsync(string filePath, string version)
{
var document = await GetXmlDocumentAsync(filePath);
var matchedNodes = document.SelectNodes($"/Project/PropertyGroup");
if (matchedNodes.Count == 0)
{
return;
}
var versionNode = document.CreateElement("Version");
versionNode.InnerText = version;
matchedNodes[0].AppendChild(versionNode);
await SaveXmlDocumentAsync(filePath, document);
}
public async Task AddCopyLocalLockFileAssembliesAsync(string filePath)
{
var document = await GetXmlDocumentAsync(filePath);
var matchedNodes = document.SelectNodes($"/Project/PropertyGroup");
if (matchedNodes.Count == 0)
{
return;
}
var versionNode = document.CreateElement("CopyLocalLockFileAssemblies");
versionNode.InnerText = "True";
matchedNodes[0].AppendChild(versionNode);
await SaveXmlDocumentAsync(filePath, document);
}
public async Task ConvertPackageReferenceToProjectReferenceAsync(string filePath, string projectToReference)
{
var document = await GetXmlDocumentAsync(filePath);
var packageName = Path.GetFileName(projectToReference).RemovePostFix(".csproj");
var matchedNodes = document.SelectNodes($"/Project/ItemGroup/PackageReference[starts-with(@Include, '{packageName}')]");
if (matchedNodes.Count == 0)
{
return;
}
XmlNode targetNode = null;
foreach (XmlNode matchedNode in matchedNodes)
{
if (matchedNode.Attributes["Include"].Value == packageName)
{
targetNode = matchedNode;
break;
}
}
if (targetNode == null)
{
return;
}
var targetNodeParent = targetNode.ParentNode;
targetNodeParent.RemoveChild(targetNode);
var relativePath = PathHelper.GetRelativePath(filePath, projectToReference);
var newNode = document.CreateElement("ProjectReference");
var includeAttr = document.CreateAttribute("Include");
includeAttr.Value = relativePath;
newNode.Attributes.Append(includeAttr);
targetNodeParent.AppendChild(newNode);
await SaveXmlDocumentAsync(filePath, document);
}
public async Task<string> GetTargetFrameworkAsync(string filePath)
{
var document = await GetXmlDocumentAsync(filePath);
var nodes = document["Project"]?["PropertyGroup"]?.SelectNodes("TargetFramework");
if (nodes == null || nodes.Count == 0)
{
return null;
}
return nodes[0].InnerText.Trim();
}
public async Task<List<PackageDependency>> GetDependencyListAsync(string filePath)
{
var result = new List<PackageDependency>();
var document = await GetXmlDocumentAsync(filePath);
var packageReferenceNodes = document.SelectNodes($"/Project/ItemGroup/PackageReference");
var projectReferenceNodes = document.SelectNodes($"/Project/ItemGroup/ProjectReference");
if (packageReferenceNodes != null && packageReferenceNodes.Count > 0)
{
foreach (XmlNode packageReferenceNode in packageReferenceNodes)
{
result.Add(
new PackageDependency(
packageReferenceNode.Attributes["Include"].Value,
packageReferenceNode.Attributes["Version"].Value
)
);
}
}
if (projectReferenceNodes != null && projectReferenceNodes.Count > 0)
{
foreach (XmlNode projectReferenceNode in projectReferenceNodes)
{
result.Add(
new PackageDependency(
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(filePath), projectReferenceNode.Attributes["Include"].Value))
)
);
}
}
return result;
}
private XmlNode GetOrCreateItemGroupNode(XmlDocument document)
{
var nodes = document["Project"].SelectNodes("ItemGroup");
if (nodes == null || nodes.Count < 1)
{
var newNode = document.CreateElement("ItemGroup");
document["Project"].AppendChild(newNode);
return newNode;
}
foreach (XmlNode node in nodes)
{
if (node.SelectNodes("ProjectReference").Count > 0)
{
return node;
}
}
foreach (XmlNode node in nodes)
{
if (node.SelectNodes("PackageReference").Count > 0)
{
return node;
}
}
return nodes[0];
}
}

10
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/IAbpModuleFileManager.cs

@ -1,10 +0,0 @@
using System.Threading.Tasks;
namespace Volo.Abp.Studio.Packages.Modifying;
public interface IAbpModuleFileManager
{
Task AddDependency(string filePath, string moduleToAdd);
Task<string> ExtractModuleNameWithNamespace(string filePath);
}

25
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Modifying/ICsprojFileManager.cs

@ -1,25 +0,0 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Studio.Package;
namespace Volo.Abp.Studio.Packages.Modifying;
public interface ICsprojFileManager
{
Task AddProjectReferenceAsync(string filePath, string projectToReference);
Task AddPackageReferenceAsync(string filePath, string packageName, string version);
Task AddImportAsync(string filePath, string importFilePath);
Task AddAssemblyVersionAsync(string filePath, string version);
Task AddCopyLocalLockFileAssembliesAsync(string filePath);
Task ConvertPackageReferenceToProjectReferenceAsync(string filePath, string projectToReference);
Task<string> GetTargetFrameworkAsync(string filePath);
Task<List<PackageDependency>> GetDependencyListAsync(string filePath);
}

17
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/INugetSourceCodeStore.cs

@ -1,17 +0,0 @@
using System.Threading.Tasks;
namespace Volo.Abp.Studio.Nuget;
public interface INugetSourceCodeStore
{
Task<string> GetCachedSourceCodeFilePathAsync(string name,
string type,
string version = null,
bool includePreReleases = false);
Task<string> GetCachedDllFilePathAsync(string name,
string type,
string version = null,
bool includePreReleases = false,
bool includeDependencies = false);
}

35
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/NugetPackageCacheManager.cs

@ -1,35 +0,0 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.Helpers;
namespace Volo.Abp.Studio.Nuget;
public class NugetPackageCacheManager : ITransientDependency
{
private readonly ICmdHelper _cmdHelper;
public NugetPackageCacheManager(ICmdHelper cmdHelper)
{
_cmdHelper = cmdHelper;
}
public async Task<string> CachePackageAsync(string packageName, string version, bool deleteAfter = true)
{
var temporaryFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(temporaryFolder);
_cmdHelper.RunCmdAndGetOutput("dotnet new console -lang c#", temporaryFolder);
_cmdHelper.RunCmdAndGetOutput($"dotnet add package {packageName} --version {version}", temporaryFolder);
if (deleteAfter)
{
Directory.Delete(temporaryFolder, true);
}
return temporaryFolder;
}
}

162
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/NugetSourceCodeStore.cs

@ -1,162 +0,0 @@
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Cli.NuGet;
using Volo.Abp.Cli.ProjectBuilding;
using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.Helpers;
using Volo.Abp.Studio.Modules;
namespace Volo.Abp.Studio.Nuget;
[Dependency(ReplaceServices = true)]
public class NugetSourceCodeStore : ISourceCodeStore, INugetSourceCodeStore, ITransientDependency
{
private readonly NuGetService _nuGetService;
private readonly NugetPackageCacheManager _nugetPackageCacheManager;
private readonly ICmdHelper _cmdHelper;
public NugetSourceCodeStore(
NuGetService nuGetService,
NugetPackageCacheManager nugetPackageCacheManager,
ICmdHelper cmdHelper)
{
_nuGetService = nuGetService;
_nugetPackageCacheManager = nugetPackageCacheManager;
_cmdHelper = cmdHelper;
}
public async Task<TemplateFile> GetAsync(
string name,
string type,
string version = null,
string templateSource = null,
bool includePreReleases = false)
{
name = GetNugetPackageName(name, type);
var latestVersion = await GetLatestVersionAsync(name, includePreReleases);
version ??= latestVersion;
var localCachedFilePath = await GetLocalCacheSourceCodeFilePathInternal(name, version);
if (localCachedFilePath == null)
{
return null;
}
return new TemplateFile(await File.ReadAllBytesAsync(localCachedFilePath), version, latestVersion, version);
}
public async Task<string> GetCachedSourceCodeFilePathAsync(string name, string type, string version = null,
bool includePreReleases = false)
{
name = GetNugetPackageName(name, type);
version ??= await GetLatestVersionAsync(name, includePreReleases);
return await GetLocalCacheSourceCodeFilePathInternal(name, version);
}
public async Task<string> GetCachedDllFilePathAsync(string name, string type, string version = null, bool includePreReleases = false, bool includeDependencies = false)
{
if (type == SourceCodeTypes.Template)
{
name = TemplateNugetPackageInfoProvider.GetNugetPackageName(name);
}
version ??= await GetLatestVersionAsync(name, includePreReleases);
var localDllFolder = Path.Combine(
GetLocalNugetCachePath(),
name,
version,
"lib");
if (!Directory.Exists(localDllFolder) ||
(includeDependencies && !Directory.GetFiles(localDllFolder, $"*Volo.Abp.Studio.ModuleInstaller.dll", SearchOption.AllDirectories).Any()))
{
if (includeDependencies)
{
var temporaryFolder = await _nugetPackageCacheManager.CachePackageAsync(name, version, false);
var outputFolder = Path.GetDirectoryName(
Directory
.GetFiles(localDllFolder, $"*{name}.dll", SearchOption.AllDirectories)
.First()
);
_cmdHelper.RunCmdAndGetOutput($"dotnet build -o {outputFolder}", temporaryFolder);
Directory.Delete(temporaryFolder, true);
}
else
{
await _nugetPackageCacheManager.CachePackageAsync(name, version);
}
}
if (!Directory.Exists(localDllFolder))
{
return null;
}
return Directory.GetFiles(localDllFolder, $"{name}.dll", SearchOption.AllDirectories).FirstOrDefault();
}
private async Task<string> GetLatestVersionAsync(string nugetPackage, bool includePreReleases)
{
var v = await _nuGetService.GetLatestVersionOrNullAsync(nugetPackage, includePreReleases);
return v.ToString();
}
private async Task<string> GetLocalCacheSourceCodeFilePathInternal(string name, string version)
{
var localCacheFile = Path.Combine(
GetLocalNugetCachePath(),
name,
version,
"content",
$"{name}.zip");
if (!File.Exists(localCacheFile))
{
await _nugetPackageCacheManager.CachePackageAsync(name, version);
if (!File.Exists(localCacheFile))
{
return null;
}
}
return localCacheFile;
}
private string GetLocalNugetCachePath()
{
return Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".nuget",
"packages");
}
private string GetNugetPackageName(string name, string type)
{
if (type == SourceCodeTypes.Template)
{
return TemplateNugetPackageInfoProvider.GetNugetPackageName(name);
}
if (type == SourceCodeTypes.Module)
{
return name + ModuleConsts.SourceCorePackagePostfix;
}
return name;
}
}

17
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Nuget/TemplateNugetPackageInfoProvider.cs

@ -1,17 +0,0 @@
using System.Threading.Tasks;
namespace Volo.Abp.Studio.Nuget;
public static class TemplateNugetPackageInfoProvider
{
public static string GetNugetPackageName(string template)
{
switch (template)
{
case "app":
return "Cotur.Abp.Basic.Template"; // todo: replace with real template!
default:
return null;
}
}
}

29
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Package/PackageDependency.cs

@ -1,29 +0,0 @@
using System;
using System.IO;
namespace Volo.Abp.Studio.Package;
public class PackageDependency
{
public ReferenceType Type { get; }
public string Name { get; }
public string Version { get; }
public string Path { get; }
public PackageDependency(string name, string version)
{
Type = ReferenceType.Package;
Name = name;
Version = version;
}
public PackageDependency(string path)
{
Type = ReferenceType.Project;
Path = path;
Name = System.IO.Path.GetFileName(path).RemovePostFix(".csproj");
}
}

243
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Package/PackageTypes.cs

@ -1,243 +0,0 @@
using System.Collections.Generic;
namespace Volo.Abp.Studio.Packages;
public static class PackageTypes
{
public const string Domain = "lib.domain";
public const string DomainShared = "lib.domain-shared";
public const string Application = "lib.application";
public const string ApplicationContracts = "lib.application-contracts";
public const string EntityFrameworkCore = "lib.ef";
public const string MongoDB = "lib.mongodb";
public const string HttpApi = "lib.http-api";
public const string HttpApiClient = "lib.http-api-client";
public const string Mvc = "lib.mvc";
public const string Blazor = "lib.blazor";
public const string BlazorWebAssembly = "lib.blazor-wasm";
public const string BlazorServer = "lib.blazor-server";
public const string Test = "lib.test";
public const string HostHttpApi = "host.http-api";
public const string HostMvc = "host.mvc";
public const string HostBlazorWebAssembly = "host.blazor-wasm";
public const string HostBlazorServer = "host.blazor-server";
public const string HostApiGatewayOcelot = "host.api-gateway-ocelot";
public static string CalculateDefaultPackageNameForModule(
string moduleName,
string packageType)
{
switch (packageType)
{
case Domain:
return moduleName + ".Domain";
case DomainShared:
return moduleName + ".Domain.Shared";
case Application:
return moduleName + ".Application";
case ApplicationContracts:
return moduleName + ".Application.Contracts";
case EntityFrameworkCore:
return moduleName + ".EntityFrameworkCore";
case HttpApi:
return moduleName + ".HttpApi";
case HttpApiClient:
return moduleName + ".HttpApi.Client";
case MongoDB:
return moduleName + ".MongoDB";
case Mvc:
return moduleName + ".Web";
case Blazor:
return moduleName + ".Blazor";
case BlazorWebAssembly:
return moduleName + ".Blazor.WebAssembly";
case BlazorServer:
return moduleName + ".Blazor.Server";
case HostHttpApi:
return moduleName + ".HttpApi.Host";
case HostMvc:
return moduleName + ".Web.Host";
case HostBlazorWebAssembly:
return moduleName + ".Blazor.Client";
case HostBlazorServer:
return moduleName + ".Blazor.Host";
case HostApiGatewayOcelot:
return moduleName + ".Gateway";
default:
throw new AbpStudioException(AbpStudioErrorCodes.PackageNameMustBeSpecified);
}
}
public static bool IsHostProject(string packageType)
{
return
packageType == HostMvc ||
packageType == HostHttpApi ||
packageType == HostBlazorWebAssembly ||
packageType == HostBlazorServer ||
packageType == HostApiGatewayOcelot;
}
public static bool IsUiProject(string packageType)
{
return
packageType == Mvc ||
packageType == BlazorWebAssembly ||
packageType == BlazorServer;
}
public static string GetHostTypeOfUi(string packageType, bool useHostBlazorServerForMvcPackages = false)
{
return packageType switch
{
Mvc => !useHostBlazorServerForMvcPackages ? HostMvc : HostBlazorServer,
BlazorWebAssembly => HostBlazorWebAssembly,
BlazorServer => HostBlazorServer,
_ => null
};
}
public static List<string> GetSuggestedInstallationType(string packageType)
{
if (packageType == DomainShared)
{
return new List<string>()
{
Domain,
DomainShared,
ApplicationContracts
};
}
if (packageType == Domain)
{
return new List<string>()
{
Domain,
Application
};
}
if (packageType == ApplicationContracts)
{
return new List<string>()
{
Application,
ApplicationContracts,
Mvc,
Blazor,
BlazorServer,
BlazorWebAssembly,
HttpApi
};
}
if (packageType == Application)
{
return new List<string>()
{
Application,
HostMvc,
HostBlazorServer,
HostBlazorWebAssembly,
HostHttpApi
};
}
if (packageType == EntityFrameworkCore)
{
return new List<string>()
{
EntityFrameworkCore,
HostMvc,
HostBlazorServer,
HostBlazorWebAssembly,
HostHttpApi
};
}
if (packageType == MongoDB)
{
return new List<string>()
{
MongoDB,
HostMvc,
HostBlazorServer,
HostBlazorWebAssembly,
HostHttpApi
};
}
if (packageType == HttpApi)
{
return new List<string>()
{
HttpApi,
HostMvc,
HostBlazorServer,
HostBlazorWebAssembly,
HostHttpApi
};
}
if (packageType == HttpApiClient)
{
return new List<string>()
{
HttpApiClient,
HostMvc,
HostBlazorServer,
HostBlazorWebAssembly,
HostHttpApi
};
}
if (packageType == Mvc)
{
return new List<string>()
{
Mvc,
HostMvc
};
}
if (packageType == Blazor)
{
return new List<string>()
{
Blazor,
BlazorServer,
BlazorWebAssembly
};
}
if (packageType == BlazorServer)
{
return new List<string>()
{
BlazorServer,
HostBlazorServer
};
}
if (packageType == BlazorWebAssembly)
{
return new List<string>()
{
BlazorWebAssembly,
HostBlazorWebAssembly
};
}
if (packageType == Test)
{
return new List<string>()
{
Test
};
}
return new List<string>();
}
}

7
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Package/ReferenceType.cs

@ -1,7 +0,0 @@
namespace Volo.Abp.Studio.Package;
public enum ReferenceType
{
Project = 1,
Package = 2
}

125
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/DotnetSlnFileModifierService.cs

@ -1,125 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.Helpers;
namespace Volo.Abp.Studio.Solution;
public class DotnetSlnFileModifierService : IDotnetSlnFileModifierService, ITransientDependency
{
public IFileSystem FileSystem { get; }
public DotnetSlnFileModifierService(IFileSystem fileSystem)
{
FileSystem = fileSystem;
}
public async Task AddProjectAsync(string slnFilePath, string projectPath, string slnTargetFolder = "src")
{
var projectName = FileSystem.Path.GetFileName(projectPath).RemovePostFix(".csproj");
var folderId = await GetOrAddFolderIdAsync(slnFilePath, slnTargetFolder);
var slnFileLines = (await FileSystem.File.ReadAllTextAsync(slnFilePath))
.Split(Environment.NewLine).ToList();
if (slnFileLines.Any(l => l.Contains($"\"{projectName}\"") && l.Contains("9A19103F-16F7-4668-BE54-9A1E7A4F7556")))
{
throw new AbpStudioException(AbpStudioErrorCodes.ProjectWithSameNameAlreadyExistInTheSolutionFile)
.WithData("Solution Path", slnFilePath)
.WithData("Project Name", projectName);
}
var projectId = Guid.NewGuid().ToString();
var relativeProjectPath = PathHelper.GetRelativePath(slnFilePath, projectPath).Replace("/", "\\");
var newProjectLine = "Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"" + projectName + "\"," +
" \"" + relativeProjectPath + "\", \"{" + projectId + "}\""
+ Environment.NewLine + "EndProject";
slnFileLines.InsertAfter(l => l.Trim().Equals("EndProject"), newProjectLine);
var newPostSolutionLine =
" {" + projectId + "}.Debug|Any CPU.ActiveCfg = Debug|Any CPU" + Environment.NewLine +
" {" + projectId + "}.Debug|Any CPU.Build.0 = Debug|Any CPU" + Environment.NewLine +
" {" + projectId + "}.Release|Any CPU.ActiveCfg = Release|Any CPU" + Environment.NewLine +
" {" + projectId + "}.Release|Any CPU.Build.0 = Release|Any CPU";
if (!slnFileLines.Any(l => l.Contains("GlobalSection") && l.Contains("ProjectConfigurationPlatforms")))
{
slnFileLines.InsertBefore(l => l.Trim().Equals("EndGlobal"), " GlobalSection(ProjectConfigurationPlatforms) = postSolution");
slnFileLines.InsertBefore(l => l.Trim().Equals("EndGlobal"), " EndGlobalSection");
}
slnFileLines.InsertAfter(l => l.Contains("GlobalSection") && l.Contains("ProjectConfigurationPlatforms"),
newPostSolutionLine);
var newPreSolutionLine =
" {" + projectId + "} = {" + folderId + "}";
if (!slnFileLines.Any(l => l.Contains("GlobalSection") && l.Contains("NestedProjects")))
{
slnFileLines.InsertBefore(l => l.Trim().Equals("EndGlobal"), " GlobalSection(NestedProjects) = preSolution");
slnFileLines.InsertBefore(l => l.Trim().Equals("EndGlobal"), " EndGlobalSection");
}
slnFileLines.InsertAfter(l => l.Contains("GlobalSection") && l.Contains("NestedProjects"), newPreSolutionLine);
await FileSystem.File.WriteAllTextAsync(slnFilePath, string.Join(Environment.NewLine, slnFileLines));
}
private async Task<string> GetOrAddFolderIdAsync(string solutionFile, string folderName, string parentFolderId = null)
{
if (folderName.Contains("/") && parentFolderId == null)
{
var parents = folderName.Split("/").SkipLast(1).JoinAsString("/");
folderName = folderName.Split("/").Last();
parentFolderId = await GetOrAddFolderIdAsync(solutionFile, parents);
}
var file = await FileSystem.File.ReadAllTextAsync(solutionFile);
var lines = file.Split(Environment.NewLine).ToList();
string folderId;
var folderLineIndex = lines.FindIndex(l =>
l.Contains("2150E333-8FDC-42A3-9474-1A3956D46DE8") && l.Contains("\"" + folderName + "\""));
if (folderLineIndex < 0)
{
folderId = Guid.NewGuid().ToString();
var newFolderLine = "Project(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"" + folderName + "\", \"" +
folderName + "\", \"{" + folderId + "}\""
+ Environment.NewLine + "EndProject";
if (lines.Any(l => l.Trim().Equals("EndProject")))
{
lines.InsertAfter(l => l.Trim().Equals("EndProject"), newFolderLine);
}
else
{
lines.InsertAfter(l => l.StartsWith("Microsoft Visual Studio Solution File"), newFolderLine);
}
if (parentFolderId != null && lines.Any(l => l.Contains("GlobalSection") && l.Contains("NestedProjects")))
{
var newPreSolutionLine =
" {" + folderId + "} = {" + parentFolderId + "}";
lines.InsertAfter(l => l.Contains("GlobalSection") && l.Contains("NestedProjects"),
newPreSolutionLine);
}
await FileSystem.File.WriteAllTextAsync(solutionFile, string.Join(Environment.NewLine, lines));
}
else
{
folderId = lines[folderLineIndex].Replace("\"", " ").Replace("{", " ").Replace("}", " ").TrimEnd()
.Split(" ").Last();
}
return folderId;
}
}

8
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/IDotnetSlnFileModifierService.cs

@ -1,8 +0,0 @@
using System.Threading.Tasks;
namespace Volo.Abp.Studio.Solution;
public interface IDotnetSlnFileModifierService
{
Task AddProjectAsync(string slnFile, string projectPath, string slnTargetFolder = "src");
}

8
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/ISolutionFileModuleAdder.cs

@ -1,8 +0,0 @@
using System.Threading.Tasks;
namespace Volo.Abp.Studio.Solution;
public interface ISolutionFileModuleAdder
{
Task AddAsync(string TargetModule, string ModuleName);
}

46
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Solution/SolutionFileModuleAdder.cs

@ -1,46 +0,0 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Studio.Modules;
namespace Volo.Abp.Studio.Solution;
public class SolutionFileModuleAdder : ISolutionFileModuleAdder, ITransientDependency
{
private readonly IDotnetSlnFileModifierService _dotnetSlnFileModifierService;
public SolutionFileModuleAdder(IDotnetSlnFileModifierService dotnetSlnFileModifierService)
{
_dotnetSlnFileModifierService = dotnetSlnFileModifierService;
}
public async Task AddAsync(string TargetModule, string ModuleName)
{
var targetFolder = Path.Combine(Path.GetDirectoryName(TargetModule), "modules", ModuleName); ;
var slnFile = TargetModule.RemovePostFix(ModuleConsts.FileExtension) + ".sln";
var moduleSrcFolder = Path.Combine(targetFolder, "src");
var moduleTestFolder = Path.Combine(targetFolder, "test");
await AddProjectsUnderDirectoryToSolutionFile(slnFile, moduleSrcFolder, $"modules/{ModuleName}");
await AddProjectsUnderDirectoryToSolutionFile(slnFile, moduleTestFolder, $"test/{ModuleName}.Tests");
}
private async Task AddProjectsUnderDirectoryToSolutionFile(
string slnFile,
string directory,
string slnTargetFolder)
{
if (!Directory.Exists(directory))
{
return;
}
var projects = Directory.GetFiles(directory, "*.csproj", SearchOption.AllDirectories);
foreach (var project in projects)
{
await _dotnetSlnFileModifierService.AddProjectAsync(slnFile, project, slnTargetFolder);
}
}
}

50
studio/src/Volo.Abp.Studio.Domain.CommonServices/Volo/Abp/Studio/Xml/XmlFileManagerBase.cs

@ -1,50 +0,0 @@
using System;
using System.IO;
using System.IO.Abstractions;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using Volo.Abp.Threading;
namespace Volo.Abp.Studio.Xml;
public abstract class XmlFileManagerBase
{
public IFileSystem FileSystem { get; set; }
public ICancellationTokenProvider CancellationTokenProvider { get; set; }
protected async Task<XmlDocument> GetXmlDocumentAsync(string filePath)
{
try
{
var doc = new XmlDocument() { PreserveWhitespace = true };
doc.Load(GenerateStreamFromString(await FileSystem.File.ReadAllTextAsync(filePath)));
return doc;
}
catch (Exception ex)
{
throw new AbpException($"Error while reading {filePath} as XML document.", innerException: ex);
}
}
protected async Task SaveXmlDocumentAsync(string filePath, XmlDocument rootNode)
{
await SaveFileContentAsync(filePath, XDocument.Parse(rootNode.OuterXml).ToString());
}
protected async Task SaveFileContentAsync(string filePath, string content)
{
await FileSystem.File.WriteAllTextAsync(filePath, content, CancellationTokenProvider.Token);
}
private MemoryStream GenerateStreamFromString(string s)
{
var stream = new MemoryStream();
var writer = new StreamWriter(stream);
writer.Write(s);
writer.Flush();
stream.Position = 0;
return stream;
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save