Browse Source

Merge branch 'dev' into pr/14453

pull/14453/head
maliming 4 years ago
parent
commit
46c1e78b0e
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 148
      .github/ISSUE_TEMPLATE/01_bug_report.yml
  2. 34
      .github/ISSUE_TEMPLATE/02_feature_request.yml
  3. 20
      .github/ISSUE_TEMPLATE/03_article_request.yml
  4. 49
      .github/ISSUE_TEMPLATE/04_performance_issue.md
  5. 15
      .github/ISSUE_TEMPLATE/05_blank_issue.md
  6. 8
      .github/ISSUE_TEMPLATE/config.yml
  7. 3
      .github/ISSUE_TEMPLATES/community-post-request.md
  8. 1
      .github/ISSUE_TEMPLATES/feature.md
  9. 2
      .github/workflows/build-and-test.yml
  10. 2
      .github/workflows/spellcheck.yml
  11. 6
      Directory.Build.props
  12. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/de.json
  13. 5
      abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json
  14. 12
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/de.json
  15. 5
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
  16. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/de.json
  17. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ar.json
  18. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/cs.json
  19. 9
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/de.json
  20. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en-GB.json
  21. 11
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json
  22. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/es.json
  23. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/fi.json
  24. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/fr.json
  25. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/hi.json
  26. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/hu.json
  27. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/is.json
  28. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json
  29. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/nl.json
  30. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/pl-PL.json
  31. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/pt-BR.json
  32. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ro-RO.json
  33. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ru.json
  34. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/sk.json
  35. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/sl.json
  36. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/tr.json
  37. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/vi.json
  38. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json
  39. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hant.json
  40. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/de.json
  41. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de.json
  42. 15
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
  43. 50
      docs/en/API/Static-CSharp-API-Clients.md
  44. 4
      docs/en/Background-Jobs-Hangfire.md
  45. 5
      docs/en/CLI.md
  46. 265
      docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/Upgrade-Your-Existing-Projects-to-Dotnet7.md
  47. BIN
      docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/as-single-query.jpg
  48. BIN
      docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/cover-image.jpg
  49. 8
      docs/en/Dapr/Index.md
  50. 12
      docs/en/Data-Seeding.md
  51. 21
      docs/en/Getting-Started-React-Native.md
  52. 2
      docs/en/JSON.md
  53. 36
      docs/en/Migration-Guides/Abp-7_0.md
  54. 30
      docs/en/Themes/Index.md
  55. 186
      docs/en/Themes/LeptonXLite/Angular.md
  56. 2
      docs/en/UI/Angular/Localization.md
  57. 4
      docs/en/docs-nav.json
  58. BIN
      docs/en/images/angular-footer.png
  59. BIN
      docs/en/images/generated-static-client-proxies-with-contracts.png
  60. BIN
      docs/en/images/generated-static-client-proxies-without-contracts.png
  61. BIN
      docs/en/images/generated-static-client-proxies.png
  62. BIN
      docs/en/images/leptonxlite-theme-application-layout.jpeg
  63. 2
      docs/zh-Hans/CLI.md
  64. 8
      docs/zh-Hans/Dapr/Index.md
  65. 296
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/DaprAspNetCore/AbpDaprEndpointRouteBuilderExtensions.cs
  66. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.csproj
  67. 61
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprEventBusModule.cs
  68. 11
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprEventBusOptions.cs
  69. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprPubSubConsts.cs
  70. 63
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprPubSubProvider.cs
  71. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprPubSubProviderContributorContext.cs
  72. 38
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Controllers/AbpAspNetCoreMvcDaprEventsController.cs
  73. 38
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Controllers/AbpAspNetCoreMvcDaprPubSubController.cs
  74. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/IAbpAspNetCoreMvcDaprPubSubProviderContributor.cs
  75. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Models/AbpAspNetCoreMvcDaprSubscriptionDefinition.cs
  76. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Models/AbpAspNetCoreMvcDaprSubscriptionRequest.cs
  77. 11
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/SystemTextJson/AbpAspNetCoreMvcDaprPubSubJsonNamingPolicy.cs
  78. 25
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/SystemTextJson/AbpAspNetCoreMvcDaprSubscriptionDefinitionConverter.cs
  79. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo.Abp.AspNetCore.Mvc.Dapr.csproj
  80. 21
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo/Abp/AspNetCore/Mvc/Dapr/DaprAppApiTokenValidator.cs
  81. 11
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo/Abp/AspNetCore/Mvc/Dapr/DaprHttpContextExtensions.cs
  82. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo/Abp/AspNetCore/Mvc/Dapr/IDaprAppApiTokenValidator.cs
  83. 13
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/de-DE.json
  84. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiforgeryTokenAuthorizationFilter.cs
  85. 17
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiDescriptionExtensions.cs
  86. 1
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs
  87. 2
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs
  88. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/de-DE.json
  89. 77
      framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor
  90. 8
      framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj
  91. 14
      framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainer.cs
  92. 19
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AngularThemeConfigurationArgs.cs
  93. 5
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs
  94. 15
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  95. 39
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  96. 29
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs
  97. 143
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs
  98. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs
  99. 30
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularThemeConfigurer.cs
  100. 13
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs

148
.github/ISSUE_TEMPLATE/01_bug_report.yml

@ -0,0 +1,148 @@
name: 🐞 Bug Report
description: Create a report to help us improve
labels: [bug]
body:
- type: markdown
attributes:
value: |
We welcome bug reports! This template will help us gather the information we need to start the triage process.
Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting **non-security** bugs and feature requests.
If you believe you have an issue that affects the SECURITY of the platform, please do NOT create an issue and instead email your issue details to info@abp.io.
For other types of questions, consider using [StackOverflow](https://stackoverflow.com/questions/tagged/abp).
- type: checkboxes
id: searched
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered ([abp/issues](https://github.com/abpframework/abp/issues)).
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: background
attributes:
label: Description
description: Please share a clear and concise description of the problem.
placeholder: Description
validations:
required: true
- type: textarea
id: repro-steps
attributes:
label: Reproduction Steps
description: |
Please include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small project, with steps to run it. If possible include text as text rather than screenshots (so it shows up in searches).
placeholder: Minimal Reproduction
validations:
required: false
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: |
Provide a description of the expected behavior.
placeholder: Expected behavior
validations:
required: false
- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
description: |
Provide a description of the actual behavior observed. If applicable please include any error messages, exception stacktraces or memory dumps.
placeholder: Actual behavior
validations:
required: false
- type: textarea
id: regression
attributes:
label: Regression?
description: |
Did this work in a previous build or release of ABP framework? If you can try a previous release or build to find out, that can help us narrow down the problem. If you don't know, that's OK.
placeholder: Regression?
validations:
required: false
- type: textarea
id: known-workarounds
attributes:
label: Known Workarounds
description: |
Please provide a description of any known workarounds.
placeholder: Known Workarounds
validations:
required: false
- type: markdown
attributes:
value: |
## Configuration
Please provide more information on your ABP configuration.
- type: input
id: version
attributes:
label: Version
description: Which version of ABP is the code running on?
placeholder: Version
validations:
required: true
- type: dropdown
id: user-interface
attributes:
label: User Interface
description: Which user interface of ABP is related to the problem?
options:
- Common (Default)
- MVC
- Angular
- Blazor
- Blazor Server
- React Native
- MAUI
validations:
required: true
- type: dropdown
id: database-provider
attributes:
label: Database Provider
description: Which database provider of ABP is used?
options:
- EF Core (Default)
- MongoDB
- None/Others
validations:
required: true
- type: dropdown
id: structure
attributes:
label: Tiered or separate authentication server
description: Which structure of ABP is specified?
options:
- None (Default)
- Tiered
- Separate Auth Server
validations:
required: true
- type: dropdown
id: Operation-System
attributes:
label: Operation System
description: What is the operation system of the server?
options:
- Windows (Default)
- Linux
- macOS
- Others
validations:
required: true
- type: markdown
attributes:
value: |
---
- type: textarea
id: other-info
attributes:
label: Other information
description: |
If you have an idea where the problem might lie, let us know that here. Please include any pointers to code, relevant changes, or related issues you know of.
placeholder: Other information
validations:
required: false

34
.github/ISSUE_TEMPLATE/02_feature_request.yml

@ -0,0 +1,34 @@
name: 💡 Feature request
description: Suggest an idea for this project
labels: [feature]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the feature you are requesting. (https://github.com/abpframework/abp/issues).
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe the problem.
description: A clear and concise description of what the problem is.
placeholder: I am trying to do [...] but [...]
validations:
required: false
- type: textarea
attributes:
label: Describe the solution you'd like
description: |
A clear and concise description of what you want to happen. Include any alternative solutions you've considered.
placeholder: I would like to see [...]
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: |
Add any other context or screenshots about the feature request here.
placeholder: Add any other context or screenshots about the feature request here.
validations:
required: false

20
.github/ISSUE_TEMPLATE/03_article_request.yml

@ -0,0 +1,20 @@
name: 💎 Article request
description: Article suggestion you want to be published on community.abp.io
labels: [community-article-request]
body:
- type: checkboxes
id: searched
attributes:
label: Is there an existing article or article request for this?
description: Please search to see if there is an article or article request related to your article request ([community.abp.io](https://community.abp.io/posts), [abp/issues](https://github.com/abpframework/abp/issues?q=is%3Aopen+is%3Aissue+label%3Acommunity-article-request))
options:
- label: I have searched the existing resources
required: true
- type: textarea
attributes:
label: Describe the article you'd like
description: |
Please describe the article you'd like to be published on community.abp.io.
If you have any reference article, please share it here.
validations:
required: true

49
.github/ISSUE_TEMPLATE/04_performance_issue.md

@ -0,0 +1,49 @@
---
name: Performance issue
about: Report a performance problem or regression
title: ''
labels: 'problem'
assignees: ''
---
<!--This is just a template - feel free to delete any and all of it and replace as appropriate.-->
### Description
<!--
* Please share a clear and concise description of the performance problem.
* Include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small repo to clone, with steps to run it.
-->
### Configuration
<!--
(If you are posting Benchmark.NET results, this info will be included.)
* Which version of .NET is the code running on?
* What OS version, and what distro if applicable?
* What is the architecture (x64, x86, ARM, ARM64)?
* If relevant, what are the specs of the machine?
-->
### Regression?
<!--
* Did this work in a previous build or release of ABP framework? If you can try a previous release or build to find out, that can help us narrow down the problem. If you don't know, that's OK.
-->
### Data
<!--
* Please include any benchmark results, images of graphs, timings or measurements, or callstacks that are relevant.
* If possible please include text as text rather than images (so it shows up in searches).
* If applicable please include before and after measurements.
-->
### Analysis
<!--
* If you have an idea where the problem might lie, let us know that here.
* Please include any pointers to code, relevant changes, or related issues you know of.
* If you don't know, you can delete this section.
-->

15
.github/ISSUE_TEMPLATE → .github/ISSUE_TEMPLATE/05_blank_issue.md

@ -1,12 +1,21 @@
---
name: Blank issue
about: Something that doesn't fit the other categories
title: ''
labels: ''
assignees: ''
---
### Documentation
Please check the official documentation before asking questions: https://docs.abp.io
### GitHub Issues
GitHub issues are for bug reports, feature requests and other discussions about the framework.
GitHub issues are for bug reports, feature requests, and other discussions about the framework.
If you're creating a bug/problem report, please include followings:
If you're creating a bug/problem report, please include the followings:
* Your **ABP Framework version**.
* Your **User Interface** type (Angular/MVC/React... etc.) if the issue is related to a specific UI
@ -18,7 +27,7 @@ Please **write in English**.
### Stack Overflow
Please use Stack Overflow for your questions about using the framework, templates and samples:
Please use Stack Overflow for your questions about using the framework, templates, and samples:
https://stackoverflow.com/questions/tagged/abp

8
.github/ISSUE_TEMPLATE/config.yml

@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Issue with ABP Commercial
url: https://support.abp.io/QA/Questions
about: Please open issues relating to ABP Commercial in support.abp.io.
- name: Ask a question (community support)
url: https://stackoverflow.com/questions/tagged/abp
about: Ask a question that will be answered by the ABP community

3
.github/ISSUE_TEMPLATES/community-post-request.md

@ -1,3 +0,0 @@
Please explain the content (an article or a video tutorial) that you would like to see on the ABP Community website, https://community.abp.io.
Before creating your own request, please check existing requests: https://github.com/abpframework/abp/labels/community-article-request

1
.github/ISSUE_TEMPLATES/feature.md

@ -1 +0,0 @@
Please describe the feature need!

2
.github/workflows/build-and-test.yml

@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@master
with:
dotnet-version: 7.0.100-rc.2.22477.23
dotnet-version: 7.0.100
- name: Build All
run: .\build-all.ps1 -f

2
.github/workflows/spellcheck.yml

@ -12,6 +12,8 @@ on:
- dev
paths:
- "docs/en/**/*"
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
spellcheck:
name: "Docs: Spellcheck (En)"

6
Directory.Build.props

@ -2,13 +2,13 @@
<PropertyGroup>
<!-- All Microsoft AspNetCore packages -->
<MicrosoftAspNetCorePackageVersion>7.0.0-rc.2.*</MicrosoftAspNetCorePackageVersion>
<MicrosoftAspNetCorePackageVersion>7.0.0</MicrosoftAspNetCorePackageVersion>
<!-- All Microsoft EntityFrameworkCore packages -->
<MicrosoftEntityFrameworkCorePackageVersion>7.0.0-rc.2.*</MicrosoftEntityFrameworkCorePackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>7.0.0</MicrosoftEntityFrameworkCorePackageVersion>
<!-- All Microsoft packages -->
<MicrosoftPackageVersion>7.0.0-rc.2.*</MicrosoftPackageVersion>
<MicrosoftPackageVersion>7.0.0</MicrosoftPackageVersion>
<!-- Microsoft.NET.Test.Sdk https://www.nuget.org/packages/Microsoft.NET.Test.Sdk -->
<MicrosoftNETTestSdkPackageVersion>17.2.0</MicrosoftNETTestSdkPackageVersion>

2
abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/de-DE.json → abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/de.json

@ -1,5 +1,5 @@
{
"culture": "de-DE",
"culture": "de",
"texts": {
"Account": "ABP Benutzerkonto - Anmeldung & Registrierung | ABP.IO",
"Welcome": "Willkommen",

5
abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json

@ -11,6 +11,7 @@
"CommercialSupportWebSite": "Commercial support web site",
"CommunityWebSite": "ABP community web site",
"ManageAccount": "My Account | ABP.IO",
"ManageYourProfile": "Manage your profile"
"ManageYourProfile": "Manage your profile",
"ReturnToApplication": "Return to application"
}
}
}

12
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/de-DE.json → abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/de.json

@ -1,5 +1,5 @@
{
"culture": "de-DE",
"culture": "de",
"texts": {
"Permission:Organizations": "Organisationen",
"Permission:Manage": "Organisationen verwalten",
@ -26,9 +26,9 @@
"Menu:Accounting": "Abrechnung",
"Menu:Packages": "Pakete",
"Menu:DiscountRequests": "Rabattanfragen",
"NpmPackageDeletionWarningMessage": "Dieses NPM-Paket wird entfernt. Bestätigen Sie das?",
"NugetPackageDeletionWarningMessage": "Dieses Nuget-Paket wird entfernt. Bestägiten Sie das?",
"ModuleDeletionWarningMessage": "Dieses Modul wird entfernt. Bestätigen Sie das?",
"NpmPackageDeletionWarningMessage": "Dieses NPM-Paket wird entfernt. Einverstanden?",
"NugetPackageDeletionWarningMessage": "Dieses Nuget-Paket wird entfernt. Einverstanden?",
"ModuleDeletionWarningMessage": "Dieses Modul wird entfernt. Einverstanden?",
"Name": "Name",
"DisplayName": "Anzeigename",
"ShortDescription": "Kurzbeschreibung",
@ -98,7 +98,7 @@
"{0}Computer{1}WillBeRemovedFromRecords": "Computer von {0} ({1}) wird aus den Datensätzen entfernt",
"OrganizationDeletionWarningMessage": "Organisation wird gelöscht",
"DeletingLastOwnerWarningMessage": "Eine Organisation muss zumindest einen Besitzer aufweisen! Daher können Sie diesen Besitzer nicht entfernen",
"This{0}AlreadyExistInThisOrganization": "Dies {0} existiert bereits in dieser Organisation",
"This{0}AlreadyExistInThisOrganization": "{0} existiert bereits in dieser Organisation",
"AreYouSureYouWantToDeleteAllComputers": "Sind Sie sicher, dass Sie alle Computer löschen möchten?",
"DeleteAll": "Alles Löschen",
"DoYouWantToCreateNewUser": "Möchten Sie einen neuen Benutzer erstellen?",
@ -180,7 +180,7 @@
"ContentSource": "Inhaltsquelle",
"Status": "Status",
"ReadPost": "Beitrag lesen",
"PostHasBeenWaiting": "Beitrag hat gewartet",
"PostHasBeenWaiting": "Beitrag wartet auf Genehmigung",
"PostHasBeenApproved": "Beitrag wurde genehmigt",
"PostHasBeenRejected": "Beitrag wurde abgelehnt",
"Permission:Community": "Community",

5
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json

@ -404,6 +404,9 @@
"Tags": "Tags",
"SetTagsInfo": "Tags should be comma-separated. Eg: CSharp, Entity Framework",
"RejectTrialLicenseWarningMessage": "Are you sure you want to reject this trial license request?",
"ExportToExcel": "Export to Excel"
"ExportToExcel": "Export to Excel",
"OverallTotalPrice": "Overall Total Price",
"OverallDiscountPrice": "Overall Discount Price",
"OverallDiscountText": "Overall Discount Text"
}
}

4
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/de-DE.json → abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/de.json

@ -1,8 +1,8 @@
{
"culture": "de-DE",
"culture": "de",
"texts": {
"Volo.AbpIo.Domain:010004": "Maximale Mitgliederanzahl erreicht!",
"Volo.AbpIo.Domain:010005": "Miximale Besizeranzahl erreicht!",
"Volo.AbpIo.Domain:010005": "Maximale Besitzeranzahl erreicht!",
"Volo.AbpIo.Domain:010006": "Dieser Benutzer ist bereits ein Besitzer in dieser Organisation!",
"Volo.AbpIo.Domain:010007": "Dieser Benutzer ist bereits ein Entwickler in dieser Organisation!",
"Volo.AbpIo.Domain:010008": "Die zulässige Entwickleranzahl darf nicht geringer sein als die aktuelle Entwickleranzahl!",

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ar.json

@ -381,6 +381,7 @@
"CommercialNewsletterConfirmationMessage": "أوافق على <a href=\"https://commercial.abp.io/TermsConditions\"> البنود والشروط </a> و <a href=\"https://commercial.abp.io/Privacy\"> سياسة الخصوصية </a>.",
"RenewLicenseEarly": "إذا قمت بتجديد رخصتي في وقت مبكر ، هل سأحصل على السنة كاملة؟",
"RenewLicenseEarylExplanation": "عند تجديد الترخيص الخاص بك قبل تاريخ انتهاء الترخيص الخاص بك ، ستتم إضافة سنة واحدة إلى تاريخ انتهاء الترخيص الخاص بك. على سبيل المثال ، إذا انتهت صلاحية ترخيصك في {0} -06-06 وقمت بتجديده في {0} -01-01 ، فسيكون تاريخ انتهاء صلاحية الترخيص الجديد {1} -06-06.",
"discountForYears": "{0}٪ خصم لمدة {1} سنة (سنوات)"
"discountForYears": "{0}٪ خصم لمدة {1} سنة (سنوات)",
"BlackFridayDiscount": "خصم الجمعة السوداء"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/cs.json

@ -382,6 +382,7 @@
"ContinueWithNewOrganization": "Pokračujte s novou organizací",
"RenewLicenseEarly": "Pokud si předčasně obnovím licenci, dostanu celý rok?",
"RenewLicenseEarylExplanation": "Když obnovíte licenci před datem vypršení platnosti licence, bude k datu vypršení platnosti licence přidán 1 rok. Pokud například platnost vaší licence vyprší dne {0}-06-06 a obnovíte ji dne {0}-01-01, bude vaše nové datum vypršení platnosti licence {1}-06-06.",
"discountForYears": "{0}% sleva po dobu {1} let"
"discountForYears": "{0}% sleva po dobu {1} let",
"BlackFridayDiscount": "Black Friday sleva"
}
}

9
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/de-DE.json → abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/de.json

@ -1,5 +1,5 @@
{
"culture": "de-DE",
"culture": "de",
"texts": {
"OrganizationManagement": "Organisationsverwaltung",
"OrganizationList": "Organisationsauflistung",
@ -14,7 +14,7 @@
"AddDeveloper": "Entwickler hinzufügen",
"UserName": "Benutzername",
"Name": "Name",
"EmailAddress": "E-Mail-Adress",
"EmailAddress": "E-Mail Adresse",
"Developers": "Entwickler",
"LicenseType": "Lizenztyp",
"Manage": "Verwalten",
@ -61,7 +61,7 @@
"JoinOurNewsletter": "Abonnieren Sie unseren Newsletter",
"Send": "Senden",
"Learn": "Lernen",
"AdditionalServices": "Zusatzleitungen",
"AdditionalServices": "Zusatzleistungen",
"WhatIsABPFramework": "WAS IST DER ABP-RAHMEN?",
"OpenSourceBaseFramework": "Open-Source-Basis-Framework",
"ABPFrameworkExplanation": "<p class=\"lead\">ABP Commercial basiert auf dem ABP Framework, einem Open-Source- und Community-gesteuerten Webanwendungs-Framework für ASP.NET Core.</p><p>ABP Framework bietet eine hervorragende Infrastruktur zum Schreiben von wartbaren, erweiterbaren und testbarer Code mit Best Practices.</p><p>Aufgebaut und integriert in beliebte Tools, die Sie bereits kennen. Niedrige Lernkurve, einfache Anpassung, komfortable Entwicklung.</p>",
@ -381,6 +381,7 @@
"CommercialNewsletterConfirmationMessage": "Ich stimme den <a href=\"https://commercial.abp.io/TermsConditions\">Allgemeinen Geschäftsbedingungen</a> und der <a href=\"https://commercial.abp.io/Privacy\">Datenschutzerklärung . zu </a>.",
"ContinueWithNewOrganization": "Weiter mit einer neuen Organisation",
"RenewLicenseEarly": "Erhalte ich das ganze Jahr, wenn ich meine Lizenz vorzeitig erneuere?",
"RenewLicenseEarylExplanation": "Wenn Sie Ihre Lizenz vor dem Ablaufdatum Ihrer Lizenz erneuern, wird Ihr Lizenzablaufdatum um 1 Jahr verlängert. Wenn Ihre Lizenz beispielsweise am {0}-06-06 abläuft und Sie sie am {0}-01-01 erneuern, ist das neue Ablaufdatum der Lizenz der {1}-06-06."
"RenewLicenseEarylExplanation": "Wenn Sie Ihre Lizenz vor dem Ablaufdatum Ihrer Lizenz erneuern, wird Ihr Lizenzablaufdatum um 1 Jahr verlängert. Wenn Ihre Lizenz beispielsweise am {0}-06-06 abläuft und Sie sie am {0}-01-01 erneuern, ist das neue Ablaufdatum der Lizenz der {1}-06-06.",
"BlackFridayDiscount": "Black Friday Rabatt"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en-GB.json

@ -109,6 +109,7 @@
"ContinueWithNewOrganization": "Continue with a new organization",
"RenewLicenseEarly": "If I renew my license early, will I get the full year?",
"RenewLicenseEarylExplanation": "When you renew your license before your license expiry date, 1 year will be added to your license expiry date. For example, if your license expires on {0}-06-06 and you renew it on {0}-01-01, your new license expiry date will be {1}-06-06.",
"LicenseTypeNotCorrect": "The license type is not correct!"
"LicenseTypeNotCorrect": "The license type is not correct!",
"BlackFridayDiscount": "Black Friday Discount"
}
}

11
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json

@ -795,6 +795,15 @@
"CreateAndCustomizeDescription": "By using LeptonX Theme you also have access to many pre-made html pages. These include many pages such as login page, blog, FAQ, subscription list, invoice, pricing, file management.",
"LeptonThemeForAdmin": "Lepton Theme for your admin dashboard by",
"LeptonThemeForAdminDescription": "Lepton Theme is still available and will be maintained. If you want to switch to LeptonX Theme as a Lepton Theme user, you can see the documentation to learn how-to.",
"LeptonCompatibleWith": "Lepton Theme is compatible with"
"LeptonCompatibleWith": "Lepton Theme is compatible with",
"BlackFridayDiscount": "Black Friday Discount",
"UpgradePaymentInfoSection_DeveloperPrice": "{0} for {1} additional developer(s)",
"Upgrade": "Upgrade",
"Renewal": "Renewal",
"UpgradePaymentInfoSection_LicensePrice": "{0} license",
"UpgradePaymentInfoSection_LicenseRenewalPrice": "License renewal",
"Total": "Total",
"SupportPolicyFaqTitle": "What is your support policy?",
"SupportPolicyFaqExplanation": "We do support only the active and the previous major version. We do not guarantee a patch release for the 3rd and older major versions. For example, if the active version is 7.0.0, we will release patch releases for both 6.x.x and 7.x.x. Besides, we provide support only for ABP Framework and ABP Commercial related issues. That means no support is given for the 3rd party applications, cloud services and other peripheral libraries used by ABP products. We will use commercially reasonable efforts to provide our customers with technical support during \"Volosoft Bilisim A.S\"s official business hours. On the other hand, we do not commit to a service-level agreement (SLA) response time, but we will try to respond to the technical issues as quickly as possible within our official working hours. Unless a special agreement is made with the customer, we only provide support at https://support.abp.io. We also have private email support, which is only available to Enterprise License holders."
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/es.json

@ -381,6 +381,7 @@
"CommercialNewsletterConfirmationMessage": "Acepto los <a href=\"https://commercial.abp.io/TermsConditions\"> Términos y condiciones </a> y la <a href=\"https://commercial.abp.io/Privacy\"> Política de privacidad </a>.",
"ContinueWithNewOrganization": "Continuar con una nueva organización",
"RenewLicenseEarly": "Si renuevo mi licencia antes, ¿obtendré el año completo?",
"RenewLicenseEarylExplanation": "Cuando renueve su licencia antes de la fecha de vencimiento de su licencia, se agregará 1 año a la fecha de vencimiento de su licencia. Por ejemplo, si su licencia vence el {0} -06-06 y la renueva el {0} -01-01, la fecha de vencimiento de su nueva licencia será {1} -06-06."
"RenewLicenseEarylExplanation": "Cuando renueve su licencia antes de la fecha de vencimiento de su licencia, se agregará 1 año a la fecha de vencimiento de su licencia. Por ejemplo, si su licencia vence el {0} -06-06 y la renueva el {0} -01-01, la fecha de vencimiento de su nueva licencia será {1} -06-06.",
"BlackFridayDiscount": "Descuento de viernes negro"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/fi.json

@ -382,6 +382,7 @@
"ContinueWithNewOrganization": "Jatka uudessa organisaatiossa",
"RenewLicenseEarly": "Jos uusin ajokorttini etuajassa, saanko koko vuoden?",
"RenewLicenseEarylExplanation": "Kun uusit lisenssisi ennen lisenssin vanhenemispäivää, lisenssin voimassaolopäivään lisätään 1 vuosi. Jos lisenssisi vanhenee esimerkiksi {0}-06-06 ja uusit sen {0}-01-01, uusi lisenssisi päättymispäivä on {1}-06-06.",
"discountForYears": "{0}% de remise pendant {1} an(s)"
"discountForYears": "{0}% de remise pendant {1} an(s)",
"BlackFridayDiscount": "Black Friday -alennus"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/fr.json

@ -382,6 +382,7 @@
"ContinueWithNewOrganization": "Continuer avec une nouvelle organisation",
"RenewLicenseEarly": "Si je renouvelle ma licence plus tôt, obtiendrai-je l'année complète ?",
"RenewLicenseEarylExplanation": "Lorsque vous renouvelez votre licence avant la date d'expiration de votre licence, 1 an sera ajouté à la date d'expiration de votre licence. Par exemple, si votre licence expire le {0}-06-06 et que vous la renouvelez le {0}-01-01, la nouvelle date d'expiration de votre licence sera le {1}-06-06.",
"discountForYears": "{0} % de remise pendentif {1} an(s)"
"discountForYears": "{0} % de remise pendentif {1} an(s)",
"BlackFridayDiscount": "Remise Black Friday"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/hi.json

@ -379,6 +379,7 @@
"TryForFree": "मुफ्त में आजमाइये",
"TrialLicenseExpiredInfo": "आपके परीक्षण लाइसेंस की अवधि समाप्त हो गई है!",
"CommercialNewsletterConfirmationMessage": "मैं <a href=\"https://commercial.abp.io/TermsConditions\">नियम और शर्तों</a> और <a href=\"https://commercial.abp.io/Privacy\">गोपनीयता नीति से सहमत हूं </a>.",
"discountForYears": "{1}वर्ष(वर्षों) के लिए {0}% छूट"
"discountForYears": "{1}वर्ष(वर्षों) के लिए {0}% छूट",
"BlackFridayDiscount": "ब्लैक फ्राइडे छूट",
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/hu.json

@ -747,6 +747,7 @@
"SeeWhatToldAboutAbpCommercial": "Tekintse meg, mit mondtak az ABP Commercialról, és írja le gondolatait, ha akarja.",
"ExtendPaymentInfoSection_DeveloperPrice": "{0} x Developer(s) Price",
"ExtendPaymentInfoSection_DiscountRate": "Kedvezmény: {0}%",
"TotalNetPrice": "Total Net Price"
"TotalNetPrice": "Total Net Price",
"BlackFridayDiscount": "Black Friday Kedvezmény"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/is.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "Þú ert að nota prufuleyfið og prufuleyfið rennur út {0}.",
"TryForFree": "Prófaðu ókeypis",
"TrialLicenseExpiredInfo": "Prófunartímabil þitt er útrunnið!",
"CommercialNewsletterConfirmationMessage": "Ég samþykki <a href=\"https://commercial.abp.io/TermsConditions\">skilmálana</a> og <a href=\"https://commercial.abp.io/Privacy\">persónuverndarstefnuna </a>."
"CommercialNewsletterConfirmationMessage": "Ég samþykki <a href=\"https://commercial.abp.io/TermsConditions\">skilmálana</a> og <a href=\"https://commercial.abp.io/Privacy\">persónuverndarstefnuna </a>.",
"BlackFridayDiscount": "Black Friday afsláttur"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json

@ -379,6 +379,7 @@
"TryForFree": "Prova gratis",
"TrialLicenseExpiredInfo": "Il periodo della tua licenza di prova è scaduto!",
"CommercialNewsletterConfirmationMessage": "Accetto i <a href=\"https://commercial.abp.io/TermsConditions\">Termini e condizioni</a> e la <a href=\"https://commercial.abp.io/Privacy\">Informativa sulla privacy </a>.",
"discountForYears": "{0}% di sconto per {1} anno/i"
"discountForYears": "{0}% di sconto per {1} anno/i",
"BlackFridayDiscount": "Sconto Black Friday"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/nl.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "U gebruikt de proeflicentie en uw proeflicentie verloopt op {0}.",
"TryForFree": "Probeer gratis",
"TrialLicenseExpiredInfo": "Uw proeflicentieperiode is verlopen!",
"CommercialNewsletterConfirmationMessage": "Ik ga akkoord met de <a href=\"https://commercial.abp.io/TermsConditions\">Algemene voorwaarden</a> en het <a href=\"https://commercial.abp.io/Privacy\">Privacybeleid </a>."
"CommercialNewsletterConfirmationMessage": "Ik ga akkoord met de <a href=\"https://commercial.abp.io/TermsConditions\">Algemene voorwaarden</a> en het <a href=\"https://commercial.abp.io/Privacy\">Privacybeleid </a>.",
"BlackFridayDiscount": "Black Friday korting"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/pl-PL.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "Korzystasz z licencji próbnej, a Twoja licencja próbna wygaśnie w dniu {0}.",
"TryForFree": "Wypróbuj za darmo",
"TrialLicenseExpiredInfo": "Twoja licencja próbna wygasła!",
"CommercialNewsletterConfirmationMessage": "Wyrażam zgodę na <a href=\"https://commercial.abp.io/TermsConditions\">Warunki</a> i <a href=\"https://commercial.abp.io/Privacy\">Politykę prywatności </a>."
"CommercialNewsletterConfirmationMessage": "Wyrażam zgodę na <a href=\"https://commercial.abp.io/TermsConditions\">Warunki</a> i <a href=\"https://commercial.abp.io/Privacy\">Politykę prywatności </a>.",
"BlackFridayDiscount": "Zniżka Black Friday"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/pt-BR.json

@ -379,6 +379,7 @@
"TryForFree": "Experimentar gratuitamente",
"TrialLicenseExpiredInfo": "Seu período de licença de teste expirou!",
"CommercialNewsletterConfirmationMessage": "Eu concordo com os <a href=\"https://commercial.abp.io/TermsConditions\"> Termos e Condições </a> e a <a href=\"https://commercial.abp.io/Privacy\"> Política de Privacidade </a>",
"discountForYears": "{0}% de desconto por {1} ano(s)"
"discountForYears": "{0}% de desconto por {1} ano(s)",
"BlackFridayDiscount": "Desconto de Black Friday"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ro-RO.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "Utilizați licența de probă și licența de probă va expira pe {0}.",
"TryForFree": "Încearcă pe gratis",
"TrialLicenseExpiredInfo": "Perioada de licență de probă a expirat!",
"CommercialNewsletterConfirmationMessage": "Sunt de acord cu <a href=\"https://commercial.abp.io/TermsConditions\">Termenii și condițiile</a> și cu <a href=\"https://commercial.abp.io/Privacy\">Politica de confidențialitate </a>."
"CommercialNewsletterConfirmationMessage": "Sunt de acord cu <a href=\"https://commercial.abp.io/TermsConditions\">Termenii și condițiile</a> și cu <a href=\"https://commercial.abp.io/Privacy\">Politica de confidențialitate </a>.",
"BlackFridayDiscount": "Black Friday Discount"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ru.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "Вы используете пробную лицензию, и срок ее действия истечет {0}.",
"TryForFree": "Попробуй бесплатно",
"TrialLicenseExpiredInfo": "Срок действия вашей пробной лицензии истек!",
"CommercialNewsletterConfirmationMessage": "Я согласен с <a href=\"https://commercial.abp.io/TermsConditions\"> Положениями и условиями </a> и <a href=\"https://commercial.abp.io/Privacy\"> Политикой конфиденциальности </a>."
"CommercialNewsletterConfirmationMessage": "Я согласен с <a href=\"https://commercial.abp.io/TermsConditions\"> Положениями и условиями </a> и <a href=\"https://commercial.abp.io/Privacy\"> Политикой конфиденциальности </a>.",
"BlackFridayDiscount": "Черная пятница Скидка"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/sk.json

@ -379,6 +379,7 @@
"TryForFree": "Skúste zadarmo",
"TrialLicenseExpiredInfo": "Vaše skúšobné licenčné obdobie vypršalo!",
"CommercialNewsletterConfirmationMessage": "I agree to the <a href=\"https://commercial.abp.io/TermsConditions\">Terms & Conditions</a> and <a href=\"https://commercial.abp.io/Privacy\">Privacy Policy</a>.",
"discountForYears": "{0} % odpusteného prívesku {1} an(ov)"
"discountForYears": "{0} % odpusteného prívesku {1} an(ov)",
"BlackFridayDiscount": "Black Friday zľava"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/sl.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "Uporabljate preizkusno licenco in vaša preizkusna licenca bo potekla {0}.",
"TryForFree": "Poskusite brezplačno",
"TrialLicenseExpiredInfo": "Vaša preizkusna licenca je potekla!",
"CommercialNewsletterConfirmationMessage": "Strinjam se s <a href=\"https://commercial.abp.io/TermsConditions\">pogoji in določili</a> in <a href=\"https://commercial.abp.io/Privacy\">pravilnikom o zasebnosti </a>."
"CommercialNewsletterConfirmationMessage": "Strinjam se s <a href=\"https://commercial.abp.io/TermsConditions\">pogoji in določili</a> in <a href=\"https://commercial.abp.io/Privacy\">pravilnikom o zasebnosti </a>.",
"BlackFridayDiscount": "Popust Black Friday"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/tr.json

@ -745,6 +745,7 @@
"ConfirmedEmailAddressRequiredToStartTrial": "Deneme lisansı başlatmak için onaylanmış bir e -posta adresiniz olmalı.",
"EmailVerificationMailNotSent": "E-posta doğrulama postası gönderilemedi.",
"GetConfirmationEmail": "Daha önce bir onay e-postası almadıysanız <a href=\"javascript:void(0);\" id=\"{0}\"> almak için buraya tıklayın.</a>",
"WhichLicenseTypeYouAreInterestedIn": "Hangi lisans türüyle ilgileniyorsunuz?"
"WhichLicenseTypeYouAreInterestedIn": "Hangi lisans türüyle ilgileniyorsunuz?",
"BlackFridayDiscount": "Kara Cuma İndirimi"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/vi.json

@ -378,6 +378,7 @@
"TrialLicenseExpireMessage": "Bạn đang sử dụng giấy phép dùng thử và giấy phép dùng thử của bạn sẽ hết hạn vào {0}.",
"TryForFree": "Thử miễn phí",
"TrialLicenseExpiredInfo": "Thời gian cấp phép dùng thử của bạn đã hết hạn!",
"CommercialNewsletterConfirmationMessage": "Tôi đồng ý với <a href=\"https://commercial.abp.io/TermsConditions\"> Điều khoản & điều kiện </a> và <a href=\"https://commercial.abp.io/Privacy\"> Chính sách quyền riêng tư </a>."
"CommercialNewsletterConfirmationMessage": "Tôi đồng ý với <a href=\"https://commercial.abp.io/TermsConditions\"> Điều khoản & điều kiện </a> và <a href=\"https://commercial.abp.io/Privacy\"> Chính sách quyền riêng tư </a>.",
"BlackFridayDiscount": "Giảm giá Black Friday"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json

@ -741,6 +741,7 @@
"BlazoriseLicenseExplanation": "我公司Volosoft和公司Megabit之间有合作协议,根据此协议,购买将同时包含了Blazorise许可证与ABP商业产品,因此我们的客户不需要再额外购买Blazorise许可证。",
"ExtendPaymentInfoSection_DeveloperPrice": "{0} x 开发者价格",
"ExtendPaymentInfoSection_DiscountRate": "折扣 {0}%",
"TotalNetPrice": "总净价"
"TotalNetPrice": "总净价",
"BlackFridayDiscount": "黑色星期五折扣"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hant.json

@ -383,6 +383,7 @@
"CommercialNewsletterConfirmationMessage": "我同意<a href=\"https://commercial.abp.io/TermsConditions\">條款和條件</a>和<a href=\"https://commercial.abp.io/Privacy\">隱私政策</a>。",
"BlazoriseLicense": "我们是否需要购买Blazorise许可证?",
"BlazoriseLicenseExplanation": "我公司Volosoft和公司Megabit之间有合作协议,根据此协议,购买将同时包含了Blazorise许可证与ABP商业产品,因此我们的客户不需要再额外购买Blazorise许可证。",
"discountForYears": "{0}% 折扣 {1} 年"
"discountForYears": "{0}% 折扣 {1} 年",
"BlackFridayDiscount": "黑色星期五折扣"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/de-DE.json → abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/de.json

@ -1,5 +1,5 @@
{
"culture": "de-DE",
"culture": "de",
"texts": {
"Permission:CommunityPost": "Community-Beitrag",
"Permission:Edit": "Bearbeiten",
@ -36,7 +36,6 @@
"FeatureRequest": "Featureanfrage",
"CreatePostTitleInfo": "Titel des Beitrags, der in der Beitragsliste angezeigt werden soll.",
"CreatePostSummaryInfo": "Eine kurze Zusammenfassung des Beitrags, der in der Beitragsliste angezeigt werden soll.",
"CreatePostCoverInfo": "Fügen Sie zum Erstellen eines effektiven Beitrags ein Titelbild hinzu. Laden Sie Bilder mit einem Seitenverhältnis von 16: 9 hoch, um die beste Ansicht zu erhalten.",
"ThisExtensionIsNotAllowed": "Diese Erweiterung ist nicht zulässig.",
"TheFileIsTooLarge": "Die Datei ist zu groß.",
"GoToThePost": "Gehe zum Beitrag",

2
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de-DE.json → abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de.json

@ -1,5 +1,5 @@
{
"culture": "de-DE",
"culture": "de",
"texts": {
"GetStarted": "Erste Schritte - Startvorlagen",
"Create": "Erstellen",

15
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json

@ -393,6 +393,19 @@
"BasicThemeInfo": "Minimalist UI theme with plain Bootstrap colors and styles. Ideal if you will build your own UI theme.",
"SeeDocumentation": "See <a href='{0}' target='_blank'>documentation</a>.",
"SeeFullScreen": "<a href='{0}' target='_blank'>🖼️ See the screenshot</a>",
"BuildingMicroserviceSolutionsShortDescription": "This book is a reference guide for developing and managing microservice-based applications using the ABP Framework."
"BuildingMicroserviceSolutionsShortDescription": "This book is a reference guide for developing and managing microservice-based applications using the ABP Framework.",
"InstallAbpCliMessage": "Install the ABP CLI in a command line terminal, if you haven't installed it before:",
"Terminal": "Terminal",
"Copy": "Copy",
"RunTheFollowingCommand": "Run the following command in a command line terminal:",
"ChangeSolutionOptionsBelow": "You can change the solution options below.",
"MultiLayerApplication": "Multi-layer <br>Application",
"MultiLayerApplicationExplanation1": "Creates a fully layered solution based on Domain Driven Design practices.",
"MultiLayerApplicationExplanation2": "Recommended for long-term projects that need a maintainable and extensible codebase.",
"SingleLayerApplication": "Single-layer <br>Application",
"SingleLayerApplicationExplanation1": "Creates a single-layer web application. ",
"SingleLayerApplicationExplanation2": "Recommended for building an application with a simpler and easy to understand architecture.",
"ApplicationModule": "Application <br>Module",
"SeeTheScreenshot": "See the screenshot"
}
}

50
docs/en/API/Static-CSharp-API-Clients.md

@ -36,6 +36,12 @@ public interface IBookAppService : IApplicationService
Implement this class in your service application. You can use [auto API controller system](Auto-API-Controllers.md) to expose the service as a REST API endpoint.
## With Contracts or Without Contracts
`Without Contracts` depending on target service's `application.contracts` package, so they can reuse the DTOs and other related classes. However, that can be a problem when we want to create fully independently developed and deployed microservices. We want to use the static proxy generation even without depending target service's application.contracts package.
`With Contracts` generate all the `classes/enums/other` types in the client side (including application service interfaces) , This is also the default behavior of the `generate-proxy` command.
## Client Proxy Generation
First, add [Volo.Abp.Http.Client](https://www.nuget.org/packages/Volo.Abp.Http.Client) nuget package to your client project:
@ -53,7 +59,27 @@ public class MyClientAppModule : AbpModule
}
````
Now, it's ready to configure the application for the static client proxy generation. Example:
Now, it's ready to configure the application for the static client proxy generation.
### With Contracts Example
````csharp
[DependsOn(
typeof(AbpHttpClientModule) //used to create client proxies
)]
public class MyClientAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Prepare for static client proxy generation
context.Services.AddStaticHttpClientProxies(
typeof(MyClientAppModule).Assembly
);
}
}
````
### Without Contracts Example
````csharp
[DependsOn(
@ -98,6 +124,8 @@ Server side must be up and running while generating the client proxy code. So, r
Open a command-line terminal in the root folder of your client project (`.csproj`) and type the following command:
#### With Contracts
````bash
abp generate-proxy -t csharp -u http://localhost:53929/
````
@ -106,9 +134,25 @@ abp generate-proxy -t csharp -u http://localhost:53929/
This command should generate the following files under the `ClientProxies` folder:
![generated-static-client-proxies](../images/generated-static-client-proxies.png)
![generated-static-client-proxies](../images/generated-static-client-proxies-with-contracts.png)
* `BookClientProxy.Generated.cs` is the actual generated proxy class in this example. `BookClientProxy` is a `partial` class * where you can write your custom code (ABP won't override it).
* `IBookAppService.cs` is the app service.
* `BookDto.cs` is the Dto class which uses by app service.
* `app-generate-proxy.json` contains information about the remote HTTP endpoint, so ABP can properly perform HTTP requests.
#### Without Contracts
````bash
abp generate-proxy -t csharp -u http://localhost:53929/ --without-contracts
````
This command should generate the following files under the `ClientProxies` folder:
![generated-static-client-proxies](../images/generated-static-client-proxies-without-contracts.png)
`BookClientProxy.Generated.cs` is the actual generated proxy class in this example. `BookClientProxy` is a `partial` class where you can write your custom code (ABP won't override it). `app-generate-proxy.json` contains information about the remote HTTP endpoint, so ABP can properly perform HTTP requests.
* `BookClientProxy.Generated.cs` is the actual generated proxy class in this example. `BookClientProxy` is a `partial` class where you can write your custom code (ABP won't override it).
* `app-generate-proxy.json` contains information about the remote HTTP endpoint, so ABP can properly perform HTTP requests.
> `generate-proxy` command generates proxies for only the APIs you've defined in your application. If you are developing a modular application, you can specify the `-m` (or `--module`) parameter to specify the module you want to generate proxies. See the *generate-proxy* section in the [ABP CLI](../CLI.md) documentation for other options.

4
docs/en/Background-Jobs-Hangfire.md

@ -75,8 +75,8 @@ After you have installed these NuGet packages, you need to configure your projec
// ... others
app.UseHangfireDashboard();
app.UseHangfireDashboard(); //should add to the request pipeline before the app.UseConfiguredEndpoints()
app.UseConfiguredEndpoints();
}
````

5
docs/en/CLI.md

@ -365,6 +365,7 @@ abp generate-proxy -t csharp -url https://localhost:44302/
* `--module` or `-m`: Specifies the name of the backend module you wish to generate proxies for. Default value: `app`.
* `--working-directory` or `-wd`: Execution directory. For `csharp` and `js` client types.
* `--url` or `-u`: API definition URL from.
* `--service-type` or `-st`: Specifies the service type to generate. `application`, `integration` and `all`, Default value: `all` for C#, `application` for JavaScript / Angular.
> See the [Angular Service Proxies document](UI/Angular/Service-Proxies.md) for more.
@ -470,10 +471,10 @@ abp translate -c <culture> [options]
Example:
````bash
abp translate -c de-DE
abp translate -c de
````
This command created the unified translation file for the `de-DE` (German) culture.
This command created the unified translation file for the `de` (German) culture.
##### Additional Options

265
docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/Upgrade-Your-Existing-Projects-to-Dotnet7.md

@ -0,0 +1,265 @@
# Upgrade Your Existing Projects to .NET7
A new .NET version has come. As open-source contributors, we are tracking the latest libraries and adopting them to our existing projects. In this sense, we completed our .NET 7 upgrade in our repositories for ABP Framework and ABP Commercial. In this article, I'll share the experiences we faced while upgrading to the new .NET version 👉 .NET 7.
When I wrote this article, the latest .NET version was `7.0.0-rc.2`. So some of the version statements I wrote below must be changed due to the stable version release.
**To see the latest and greatest stuff, let's see how to upgrade our existing projects to .NET 7!**
## Install .NET7 SDK
If you are on your development computer, then you need to install the .NET7 SDK `7.x.x`. For the production servers, you need to install the .NET 7 runtime. Download link for the .NET7 SDK and runtime is:
* https://dotnet.microsoft.com/en-us/download/dotnet/7.0
## Update Your *.csproj Files
First, you need to update all your `*.csproj` files to support .NET7. Find and replace all your `<TargetFramework>*</TargetFramework>` in the `*.csproj` files to support .NET 7:
```xml
<TargetFramework>net7.0</TargetFramework>
```
We already did this in ABP Framework, see this commit as an example [github.com/abpframework/abp/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.csproj](https://github.com/abpframework/abp/blob/dev/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj#L4).
### Microsoft Package Updates
You must be using Microsoft packages as well; then you need to update them to the latest .NET 7 version.
At the time, I wrote this article, the latest version was `7.0.0-rc.2.22476.2`, so I'll update them to this version including minor version changes.
Here's the list of all package reference updates I did:
```xml
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0-rc.2.*">
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0-rc.2.*">
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0-rc.2.*" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0-rc.2.*" />
<PackageReference Include="System.Text.Encodings.Web" Version="7.0.0-rc.2.*" />
<PackageReference Include="System.Text.Json" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0-rc.2.*" />
<PackageReference Include="System.Collections.Immutable" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.0-rc.2.*" />
```
---
## Entity Framework Core Updates
If you use EF Core as your data access library, you should update your `dotnet-ef` CLI tool. Here's the terminal command to update it:
```bash
dotnet tool update dotnet-ef --global --prerelease
```
We already did the the EF Core package reference update in the *Microsoft Package Updates* section.
### Breaking Change: OrderBy
This release makes a breaking change in an EF Core query running behavior. We faced this issue in some of our queries that were missing `OrderBy` statement. It throws an exception and does not run the query. Here's the explanation of a EF Core team member for this issue: [github.com/dotnet/efcore/issues/21202#issuecomment-913206415](https://github.com/dotnet/efcore/issues/21202#issuecomment-913206415).
The following exception is being thrown:
> InvalidOperationException: The query uses 'Skip' without specifying ordering and uses split query mode. This generates incorrect results. Either provide ordering or run query in single query mode using AsSingleQuery(). See https://go.microsoft.com/fwlink/?linkid=2196526 for more information
If you don't want to add `OrderBy` statement to solve the issue, you can also use `AsSingleQuery()`.
![AsSingleQuery](https://raw.githubusercontent.com/abpframework/abp/dev/docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/./as-single-query.jpg)
### EF Core - SQL Client Connection String Update
With this version, the behavior of the SQL connection has been changed. There is a keyword in the SQL connection string called `TrustServerCertificate`. This keyword indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.
> When `TrustServerCertificate` is set to `True`, the transport layer will use SSL to encrypt the channel and bypass walking the certificate chain to validate trust. If `TrustServerCertificate` is set to `true` and encryption is turned on, the encryption level specified on the server will be used even if `Encrypt` is set to `false`. The connection will fail otherwise.
After the .NET7 update, it just started to throw the following exception:
> A connection was successfully established with the server, but then an error occurred during the login process.
We fixed this problem by adding the `TrustServerCertificate=true` to your connection string. Here's an example connection string that supports,
````sql
Server=localhost; Database=MyProjectName; Trusted_Connection=True; TrustServerCertificate=True
````
See our commit for this fix:
* [github.com/abpframework/abp/commit/96f17e67918eb87edd2baf876d4a7598281fe608](https://github.com/abpframework/abp/commit/96f17e67918eb87edd2baf876d4a7598281fe608)
Related docs:
* [learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes#encrypt-true](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes#encrypt-true)
* [stackoverflow.com/questions/34430550/a-connection-was-successfully-established-with-the-server-but-then-an-error-occ](https://stackoverflow.com/questions/34430550/a-connection-was-successfully-established-with-the-server-but-then-an-error-occ)
---
## Blazor Update
Ensure that you have updated your Blazor project's csproj to support .NET7:
```xml
<TargetFramework>net7.0</TargetFramework>
```
### Install Blazor Workloads
#### .NET Web Assembly build tools
If you have a Blazor-WASM project, install the workloads by running the following in a command shell:
```bash
dotnet workload install wasm-tools
```
**OR** you can update your workloads by running the following command in your Blazor project directory:
```bash
dotnet workload restore
```
---
## .NET MAUI Update
Ensure that you have updated your Blazor project's csproj to support .NET7:
```xml
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
```
### Install MAUI Workloads
If you have .NET MAUI project, then you also need to update your `TargetFramework` as below:
If you have a .NET MAUI project, after installing the .NET 7 SDK, install the latest workloads with the following command:
```bash
dotnet workload install maui
```
**OR** run the following command in your existing .NET MAUI project directory
```bash
dotnet workload restore
```
Further information, check out https://github.com/dotnet/maui/wiki/.NET-7-and-.NET-MAUI
---
#### Dotnet Maui Check Tool
Alternatively, there's a 3rd party tool for .NET MAUI to install the required workloads. This tool installs the missing SDK packs. You can reach the tool's repository at [github.com/Redth/dotnet-maui-check](https://github.com/Redth/dotnet-maui-check).
Installation:
```bash
dotnet tool install -g Redth.Net.Maui.Check
```
Run:
```bash
maui-check
```
---
## Docker Image Update
If you are using Docker to automate the deployment of applications, you also need to update your images. We were using `aspnet:6.0.0-bullseye-slim` base and after the .NET 7 update, we started using `aspnet:7.0-bullseye-slim` in our Docker files.
```
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim AS base
```
For this update, you can check out the following commit as an example:
* [github.com/abpframework/abp/commit/2d07b9bd00152bef4658c48ff9b2cbee5788d308](https://github.com/abpframework/abp/commit/2d07b9bd00152bef4658c48ff9b2cbee5788d308)
## ABP Framework .NET 7 Update
In [ABP Framework repository](https://github.com/abpframework/abp), we updated all our dependencies from .NET 6 to .NET 7.
Not all the changes are here, but you can check out the following PR of the .NET 7 update:
* [github.com/abpframework/abp/pull/13626/files](https://github.com/abpframework/abp/pull/13626/files)
...
Happy coding with .NET 7 🤗
...

BIN
docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/as-single-query.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
docs/en/Community-Articles/2022-10-27-Dotnet7-Upgrade/cover-image.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

8
docs/en/Dapr/Index.md

@ -209,7 +209,7 @@ ABP provides the following endpoints to receive events from Dapr:
* `dapr/subscribe`: Dapr uses this endpoint to get a list of subscriptions from the application. ABP automatically returns all the subscriptions for your distributed event handler classes and custom controller actions with the `Topic` attribute.
* `api/abp/dapr/event`: The unified endpoint to receive all the events from Dapr. ABP dispatches the events to your event handlers based on the topic name.
> **Since ABP provides the standard `dapr/subscribe` endpoint, you should not manually call the `app.MapSubscribeHandler()` method of Dapr.** You can use the `app.UseCloudEvents()` middleware in your ASP.NET Core pipeline if you want to support the [CloudEvents](https://cloudevents.io/) standard.
> **Since ABP will call `MapSubscribeHandler` internally, you should not manually call it anymore.** You can use the `app.UseCloudEvents()` middleware in your ASP.NET Core pipeline if you want to support the [CloudEvents](https://cloudevents.io/) standard.
### Usage
@ -299,8 +299,7 @@ public class MyController : AbpController
{
[HttpPost("/stock-changed")]
[Topic("pubsub", "StockChanged")]
public async Task<IActionResult> TestRouteAsync(
[FromBody] StockCountChangedEto model)
public async Task<IActionResult> TestRouteAsync([FromBody] StockCountChangedEto model)
{
HttpContext.ValidateDaprAppApiToken();
@ -430,8 +429,7 @@ public class MyController : AbpController
{
[HttpPost("/stock-changed")]
[Topic("pubsub", "StockChanged")]
public async Task<IActionResult> TestRouteAsync(
[FromBody] StockCountChangedEto model)
public async Task<IActionResult> TestRouteAsync([FromBody] StockCountChangedEto model)
{
// Validate the App API token!
HttpContext.ValidateDaprAppApiToken();

12
docs/en/Data-Seeding.md

@ -131,6 +131,16 @@ Then the data seed contributors can access to these properties via the `DataSeed
If a module needs to a parameter, it should be declared on the [module documentation](Modules/Index.md). For example, the [Identity Module](Modules/Identity.md) can use `AdminEmail` and `AdminPassword` parameters if you provide (otherwise uses the default values).
### Separate Unit Of Works
The default seed will be in a unit of work and may use transactions. If there are multiple `IDataSeedContributor` or too much data written, it may cause a database timeout error.
We provide an extension method of `SeedInSeparateUowAsync` for the `IDataSeeder` service to create a separate unit of work for each `IDataSeedContributor`.
````csharp
public static Task SeedInSeparateUowAsync(this IDataSeeder seeder, Guid? tenantId = null, AbpUnitOfWorkOptions options = null, bool requiresNew = false)
````
### Where & How to Seed Data?
It is important to understand where & how to execute the `IDataSeeder.SeedAsync()`?
@ -163,4 +173,4 @@ We suggest the same way on development. Run the DbMigrator console application w
You probably want to seed the data also for automated [testing](Testing.md), so want to use the `IDataSeeder.SeedAsync()`. In the [application startup template](Startup-Templates/Application.md), it is done in the [OnApplicationInitialization](Module-Development-Basics.md) method of the *YourProjectName*TestBaseModule class of the TestBase project.
In addition to the standard seed data (that is also used on production), you may want to seed additional data unique to the automated tests. If so, you can create a new data seed contributor in the test project to have more data to work on.
In addition to the standard seed data (that is also used on production), you may want to seed additional data unique to the automated tests. If so, you can create a new data seed contributor in the test project to have more data to work on.

21
docs/en/Getting-Started-React-Native.md

@ -53,6 +53,27 @@ Please do the following:
> React Native application does not trust the auto-generated .NET HTTPS certificate. You should use **HTTP** during the development.
> When you are using OpenIddict, You should remove 'clientSecret' on Environment.js (if exists) and disable "HTTPS-only" settings. (Openiddict has default since Version 6.0)
### How to disable Https-only in Openiddict.
You should add this code on `MyProjectName`HttpApiHostModule.
```csharp
public override void PreConfigureServices(ServiceConfigurationContext context)
{
#if DEBUG
PreConfigure<OpenIddictServerBuilder>(options =>
{
options
.UseAspNetCore()
.DisableTransportSecurityRequirement();
});
#endif
//....
}
```
A React Native application running on an Android emulator or a physical phone **can not connect to the backend** on `localhost`. To fix this problem, it is necessary to run the backend application on your **local IP address**.
{{ if Tiered == "No"}}

2
docs/en/JSON.md

@ -61,7 +61,7 @@ Properties:
## Newtonsoft
Add [Volo.Abp.Json.Newtonsoft](https://www.nuget.org/packages/Volo.Abp.Json.Newtonsoft) packge and depends on `AbpJsonNewtonsoftModule` to replace the `System Text Json`.
Add [Volo.Abp.Json.Newtonsoft](https://www.nuget.org/packages/Volo.Abp.Json.Newtonsoft) package and depends on `AbpJsonNewtonsoftModule` to replace the `System Text Json`.
#### AbpNewtonsoftJsonSerializerOptions

36
docs/en/Migration-Guides/Abp-7_0.md

@ -0,0 +1,36 @@
# ABP Version 7.0 Migration Guide
This document is a guide for upgrading ABP v6.0 solutions to ABP v7.0. There is a change in this version that may affect your applications, please read it carefully and apply the necessary changes to your application.
## Hybrid JSON was removed.
Since [System.Text.Json](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview) library supports more custom features in NET 7, ABP no longer need the hybrid Json feature.
### Previous Behavior
There is a `Volo.Abp.Json` package which contains the `AbpJsonModule` module.
`Serialization/deserialization` features of [System.Text.Json](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview) and [Nettonsoft](https://www.newtonsoft.com/json/help/html/SerializingJSON.htm) are implemented in this module.
We use [System.Text.Json](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview) first, More custom cases can be handled with [Nettonsoft](https://www.newtonsoft.com/json/help/html/SerializingJSON.htm) by configuring `UnsupportedTypes` of `AbpSystemTextJsonSerializerOptions`.
### New Behavior
We created `Volo.Abp.Json.SystemTextJson` and `Volo.Abp.Json.Newtonsoft` as separate packages, which means you can only use one of them in your project. The default is to use `SystemTextJson`. If you want `Newtonsoft`, please also use `Volo.Abp.AspNetCore.Mvc.NewtonsoftJson` in your web project.
* Volo.Abp.Json.Abstractions
* Volo.Abp.Json.Newtonsoft
* Volo.Abp.Json.SystemTextJson
* Volo.Abp.Json (Depends on `Volo.Abp.Json.SystemTextJson` by default to prevent breaking)
* Volo.Abp.AspNetCore.Mvc.NewtonsoftJson
The `AbpJsonOptions` now has only two properties, which are
* `InputDateTimeFormats(List<string>)`: Formats of input JSON date, Empty string means default format. You can provide multiple formats to parse the date.
* `OutputDateTimeFormat(string)`: Format of output json date, Null or empty string means default format.
Please remove all `UnsupportedTypes` add custom `Modifiers` to control serialization/deserialization behavior.
Check the docs to see the more info: https://github.com/abpframework/abp/blob/dev/docs/en/JSON.md#configuration
Check the docs to see how to customize a JSON contract: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/custom-contracts

30
docs/en/Themes/Index.md

@ -0,0 +1,30 @@
# The Official Themes
ABP Framework provides a complete UI theming system. While you can build your own themes, you can use the following pre-built themes freely in your applications.
## The Basic Theme
The Basic Theme is a minimalist theme that doesn't add any styling on top of the plain [Bootstrap](https://getbootstrap.com/) styles. You can take the Basic Theme as the base theme and build your own theme or styling on top of it. Here, a screenshot from the theme:
![basic-theme-application-layout](../images/basic-theme-application-layout.png)
### Documentation
- [Basic Theme - MVC UI](../UI/AspNetCore/Basic-Theme.md)
- [Basic Theme - Blazor UI](../UI/Blazor/Basic-Theme.md)
- [Basic Theme - Angular UI](../UI/Angular/Basic-Theme.md)
## The LeptonX Lite Theme
**LeptonX Lite** is the free version of the [LeptonX Theme](https://x.leptontheme.com/), which is a part of the ABP Commercial. Here, a screenshot from the theme:
![LeptonX Lite application layout](../images/leptonxlite-theme-application-layout.jpeg)
### Documentation
- [LeptonX Lite - MVC UI](LeptonXLite/AspNetCore.md)
- [LeptonX Lite - Blazor UI](LeptonXLite/Blazor.md)
- [LeptonX Lite - Angular UI](LeptonXLite/Angular.md)
## See Also
* [Theming - MVC UI](../UI/AspNetCore/Theming.md)
* [Theming - Blazor UI](../UI/Blazor/Theming.md)
* [Theming - Angular UI](../UI/Angular/Theming.md)

186
docs/en/Themes/LeptonXLite/Angular.md

@ -1,7 +1,8 @@
# LeptonX Lite Angular UI
LeptonX Lite has implementation for the ABP Framework Angular Client. It's a simplified variation of the [LeptonX Theme](https://x.leptontheme.com/).
> If you are looking for a professional, enterprise ready theme, you can check the [LeptonX Theme](https://x.leptontheme.com/), which is a part of [ABP Commercial](https://commercial.abp.io/).
> If you are looking for a professional, enterprise ready theme, you can check the [LeptonX Theme](https://x.leptontheme.com/), which is a part of [ABP Commercial](https://commercial.abp.io/).
> See the [Theming document](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Theming) to learn about themes.
@ -11,28 +12,27 @@ This theme is **already installed** when you create a new solution using the sta
To add `LeptonX-lite` into your project,
* Install `@abp/ng.theme.lepton-x`
- Install `@abp/ng.theme.lepton-x`
`yarn add @abp/ng.theme.lepton-x@preview`
* Install `bootstrap-icons`
- Install `bootstrap-icons`
`yarn add bootstrap-icons`
- Then, we need to edit the styles array in `angular.json` to replace the existing style with the new one.
* Then, we need to edit the styles array in `angular.json` to replace the existing style with the new one.
Add the following style
Add the following style
```json
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
```
* Finally, remove `ThemeBasicModule` from `app.module.ts`, and import the related modules in `app.module.ts`
- Finally, remove `ThemeBasicModule` from `app.module.ts`, and import the related modules in `app.module.ts`
```js
import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x';
import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts';
import { ThemeLeptonXModule } from "@abp/ng.theme.lepton-x";
import { SideMenuLayoutModule } from "@abp/ng.theme.lepton-x/layouts";
@NgModule({
imports: [
@ -51,7 +51,7 @@ export class AppModule {}
Note: If you employ [Resource Owner Password Flow](https://docs.abp.io/en/abp/latest/UI/Angular/Authorization#resource-owner-password-flow) for authorization, you should import the following module as well:
```js
import { AccountLayoutModule } from '@abp/ng.theme.lepton-x/account';
import { AccountLayoutModule } from "@abp/ng.theme.lepton-x/account";
@NgModule({
// ...
@ -69,15 +69,15 @@ To change the logos and brand color of `LeptonX`, simply add the following CSS t
```css
:root {
--lpx-logo: url('/assets/images/logo.png');
--lpx-logo-icon: url('/assets/images/logo-icon.png');
--lpx-logo: url("/assets/images/logo.png");
--lpx-logo-icon: url("/assets/images/logo-icon.png");
--lpx-brand: #edae53;
}
```
- `--lpx-logo` is used to place the logo in the menu.
- `--lpx-logo-icon` is a square icon used when the menu is collapsed.
- `--lpx-brand` is a color used throughout the application, especially on active elements.
- `--lpx-logo-icon` is a square icon used when the menu is collapsed.
- `--lpx-brand` is a color used throughout the application, especially on active elements.
### Server Side
@ -85,22 +85,18 @@ In order to migrate to LeptonX on your server side projects (Host and/or AuthSer
## Customization
### Layouts
The Angular version of LeptonX Lite provides **layout components** for your **user interface** on [ABP Framework Theming](https://docs.abp.io/en/abp/latest/UI/Angular/Theming). You can use layouts to **organize your user interface**. You can replace the **layout components** and some parts of the **layout components** with the [ABP replaceable component system](https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement).
The Angular version of LeptonX Lite provides **layout components** for your **user interface** on [ABP Framework Theming](https://docs.abp.io/en/abp/latest/UI/Angular/Theming). You can use the layouts to **organize your user interface**. You can replace the **layout components** and some parts of the **layout components** with the [ABP replaceable component system](https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement).
The main responsibility of a theme is to **provide** the layouts. There are **three pre-defined layouts that must be implemented by all the themes:**
* **ApplicationLayoutComponent:** The **default** layout which is used by the **main** application pages.
* **AccountLayoutComponent:** Mostly used by the **account module** for **login**, **register**, **forgot password**... pages.
* **EmptyLayoutComponent:** The **Minimal** layout that **has no layout components** at all.
- **ApplicationLayoutComponent:** The **default** layout which is used by the **main** application pages.
- **AccountLayoutComponent:** Mostly used by the **account module** for **login**, **register**, **forgot password**... pages.
- **EmptyLayoutComponent:** The **Minimal** layout that **has no layout components** at all.
The **Layout components** and all the replacable components are predefined in `eThemeLeptonXComponents` as enum.
The **Layout components** and all the replacable components are predefined in `eThemeLeptonXComponents` as enum.
### How to replace a component
```js
@ -122,8 +118,8 @@ export class AppComponent {
}
}
```
See the [Component Replacement](https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement) documentation for more information on how to replace components.
See the [Component Replacement](https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement) documentation for more information on how to replace components.
### Brand Component
@ -131,16 +127,14 @@ The **brand component** is a simple component that can be used to display your b
```js
///...
this.replaceableComponents.add({
component: YourNewLogoComponent,
key: eThemeLeptonXComponents.Logo,
});
this.replaceableComponents.add({
component: YourNewLogoComponent,
key: eThemeLeptonXComponents.Logo,
});
///...
```
![Brand component](../../images/leptonxlite-brand-component.png)
![Brand component](../../images/leptonxlite-brand-component.png)
## Breadcrumb Component
@ -148,14 +142,14 @@ On websites that have a lot of pages, **breadcrumb navigation** can greatly **en
```js
///...
this.replaceableComponents.add({
component: YourNewSidebarComponent,
key: eThemeLeptonXComponents.Breadcrumb,
});
this.replaceableComponents.add({
component: YourNewSidebarComponent,
key: eThemeLeptonXComponents.Breadcrumb,
});
///...
```
![Breadcrumb component](../../images/leptonxlite-breadcrumb-component.png)
![Breadcrumb component](../../images/leptonxlite-breadcrumb-component.png)
## Sidebar Menu Component
@ -163,54 +157,61 @@ Sidebar menus have been used as a **directory for Related Pages** to a **Service
```js
///...
this.replaceableComponents.add({
component: YourNewSidebarComponent,
key: eThemeLeptonXComponents.Sidebar,
});
this.replaceableComponents.add({
component: YourNewSidebarComponent,
key: eThemeLeptonXComponents.Sidebar,
});
///...
```
![Sidebar menu component](../../images/leptonxlite-sidebar-menu-component.png)
![Sidebar menu component](../../images/leptonxlite-sidebar-menu-component.png)
## Page Alerts Component
Provides contextual **feedback messages** for typical user actions with a handful of **available** and **flexible** **alert messages**. Alerts are available for any length of text, as well as an **optional dismiss button**.
![Page alerts component](../../images/leptonxlite-page-alerts-component.png)
![Page alerts component](../../images/leptonxlite-page-alerts-component.png)
```js
///...
this.replaceableComponents.add({
component: YourNewPageAlertContainerComponent,
key: eThemeLeptonXComponents.PageAlertContainer,
});
this.replaceableComponents.add({
component: YourNewPageAlertContainerComponent,
key: eThemeLeptonXComponents.PageAlertContainer,
});
///...
```
## Toolbar Component
![Breadcrumb component](../../images/leptonxlite-toolbar-component.png)
Toolbar items are used to add **extra functionality to the toolbar**. The toolbar is a **horizontal bar** that **contains** a group of **toolbar items**.
```js
///...
this.replaceableComponents.add({
component: YourNewNavItemsComponent,
key: eThemeLeptonXComponents.NavItems,
});
this.replaceableComponents.add({
component: YourNewNavItemsComponent,
key: eThemeLeptonXComponents.NavItems,
});
///...
```
## Toolbar Items
There are two parts to the toolbar. The first is Language-Switch. The second is the User-Profile element. You can swap out each of these parts individually.
## Language Switch Component
Think about a **multi-lingual** website and the first thing that could **hit your mind** is **the language switch component**. A **navigation bar** is a **great place** to **embed a language switch**. By embedding the language switch in the navigation bar of your website, you would **make it simpler** for users to **find it** and **easily** switch the **language** <u>**without trying to locate it across the website.**</u>
Think about a **multi-lingual** website and the first thing that could **hit your mind** is **the language switch component**. A **navigation bar** is a **great place** to **embed a language switch**. By embedding the language switch in the navigation bar of your website, you would **make it simpler** for users to **find it** and **easily** switch the **language** <u>**without trying to locate it across the website.**</u>
![Language switch component](../../images/leptonxlite-language-switch-component.png)
![Language switch component](../../images/leptonxlite-language-switch-component.png)
```js
///...
this.replaceableComponents.add({
component: YourNewLanguagesComponent,
key: eThemeLeptonXComponents.Languages,
});
this.replaceableComponents.add({
component: YourNewLanguagesComponent,
key: eThemeLeptonXComponents.Languages,
});
///...
```
@ -219,33 +220,84 @@ Think about a **multi-lingual** website and the first thing that could **hit you
The **User Menu** is the **menu** that **drops down** when you **click your name** or **profile picture** in the **upper right corner** of your page (**in the toolbar**). It drops down options such as **Settings**, **Logout**, etc.
![User menu component](../../images/leptonxlite-user-menu-component.png)
```js
///...
this.replaceableComponents.add({
component: YourNewCurrentUserComponent,
key: eThemeLeptonXComponents.CurrentUser,
});
this.replaceableComponents.add({
component: YourNewCurrentUserComponent,
key: eThemeLeptonXComponents.CurrentUser,
});
///...
```
Note: The language selection component in the Volo app is not replaceable. It is part of the settings menu.
## Mobile Navbar Component
The **mobile navbar component** is used to display the **navbar menu on mobile devices**. The mobile navbar component is a **dropdown menu** that contains language selection and user menu.
![Mobile user menu component](../../images/leptonxlite-mobile-user-menu-component.png)
![Mobile user menu component](../../images/leptonxlite-mobile-user-menu-component.png)
```js
///...
this.replaceableComponents.add({
component: YourNewMobileNavbarComponent,
key: eThemeLeptonXComponents.MobileNavbar,
});
this.replaceableComponents.add({
component: YourNewMobileNavbarComponent,
key: eThemeLeptonXComponents.MobileNavbar,
});
///...
```
## Mobile Navbar Items.
There are two parts of the mobile navbar. The mobile navbar has Language-Switch and User-Profile. You can swap out each of these parts individually.
There are two parts of the mobile navbar. The mobile navbar has Language-Switch and User-Profile. You can swap out each of these parts individually.
The Mobile language-Selection component key is `eThemeLeptonXComponents.MobileLanguageSelection`.
The Mobile User-Profile component key is `eThemeLeptonXComponents.MobileUserProfile`.
## Footer Component
![Angular Footer Component](../../images/angular-footer.png)
The Footer is the section of content at the very bottom of the site. This section of the content can be modified.
Inject **FooterLinksService** and use the **setFooterInfo** method of **FooterLinksService**
to assign path or link and description.
**descUrl** and **footerLinks** are nullable. Constant **footerLinks** are on the right side of footer.
```js
///...
const footerLinks = [
{
link: "/components/bootstrap/badge",
text: "Manage Your Profile",
},
{
link: "/components/bootstrap/border",
text: "My Security Logs",
},
];
const footerInfo: FooterNav = {
desc: "Home",
descUrl: "/components/home",
footerLinks: footerLinks,
};
this.footerLinksService.setFooterInfo(footerInfo);
///...
```
If you want to change the footer component, the key is `eThemeLeptonXComponents.Footer`
```js
///...
this.replaceableComponents.add({
component: YourNewFooterComponent,
key: eThemeLeptonXComponents.Footer,
});
///...
```

2
docs/en/UI/Angular/Localization.md

@ -138,7 +138,7 @@ See an example:
],
},
{
culture: 'de-DE',
culture: 'de',
resources: [
{
resourceName: 'MyProjectName',

4
docs/en/docs-nav.json

@ -1198,6 +1198,10 @@
{
"text": "Common",
"items": [
{
"text": "Themes",
"path": "Themes/Index.md"
},
{
"text": "Overriding the User Interface",
"path": "Customizing-Application-Modules-Overriding-User-Interface.md"

BIN
docs/en/images/angular-footer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/en/images/generated-static-client-proxies-with-contracts.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
docs/en/images/generated-static-client-proxies-without-contracts.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/en/images/generated-static-client-proxies.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

BIN
docs/en/images/leptonxlite-theme-application-layout.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

2
docs/zh-Hans/CLI.md

@ -373,7 +373,7 @@ abp translate -c <culture> [options]
示例:
````bash
abp translate -c de-DE
abp translate -c de
````
该命令为 `de-DE` (德语)文化创建了统一的翻译文件.

8
docs/zh-Hans/Dapr/Index.md

@ -209,7 +209,7 @@ ABP提供了以下端点来接收来自Dapr的事件:
* `dapr/subscribe`: Dapr使用此端点从应用程序获取订阅列表.ABP会自动返回所有分布式事件处理程序类和具有`Topic`属性的自定义控制器操作的订阅.
* `api/abp/dapr/event`: 用于接收来自Dapr的所有事件的统一端点.ABP根据主题名称将事件分派给您的事件处理程序.
> **由于ABP提供了标准的`dapr/subscribe`端点,所以你不应该手动调用Dapr的`app.MapSubscribeHandler()`方法.** 如果你想支持[CloudEvents](https://cloudevents.io/)标准,你可以在你的ASP.NET Core管道中使用`app.UseCloudEvents()`中间件.
> **由于ABP会在内部调用`MapSubscribeHandler` 方法,所以你不应该手动调用了.** 如果你想支持[CloudEvents](https://cloudevents.io/)标准,你可以在你的ASP.NET Core管道中使用`app.UseCloudEvents()`中间件.
### 用法
@ -299,8 +299,7 @@ public class MyController : AbpController
{
[HttpPost("/stock-changed")]
[Topic("pubsub", "StockChanged")]
public async Task<IActionResult> TestRouteAsync(
[FromBody] StockCountChangedEto model)
public async Task<IActionResult> TestRouteAsync([FromBody] StockCountChangedEto model)
{
HttpContext.ValidateDaprAppApiToken();
@ -430,8 +429,7 @@ public class MyController : AbpController
{
[HttpPost("/stock-changed")]
[Topic("pubsub", "StockChanged")]
public async Task<IActionResult> TestRouteAsync(
[FromBody] StockCountChangedEto model)
public async Task<IActionResult> TestRouteAsync([FromBody] StockCountChangedEto model)
{
// Validate the App API token!
HttpContext.ValidateDaprAppApiToken();

296
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/DaprAspNetCore/AbpDaprEndpointRouteBuilderExtensions.cs

@ -0,0 +1,296 @@
// ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Dapr
{
/// <summary>
/// This class defines configurations for the subscribe endpoint.
/// </summary>
public class AbpSubscribeOptions
{
/// <summary>
/// Gets or Sets a value which indicates whether to enable or disable processing raw messages.
/// </summary>
public bool EnableRawPayload { get; set; }
/// <summary>
/// An optional delegate used to configure the subscriptions.
/// </summary>
public Func<List<AbpSubscription>, Task> SubscriptionsCallback { get; set; }
}
/// <summary>
/// This class defines subscribe endpoint response
/// </summary>
public class AbpSubscription
{
/// <summary>
/// Gets or sets the topic name.
/// </summary>
public string Topic { get; set; }
/// <summary>
/// Gets or sets the pubsub name
/// </summary>
public string PubsubName { get; set; }
/// <summary>
/// Gets or sets the route
/// </summary>
public string Route { get; set; }
/// <summary>
/// Gets or sets the routes
/// </summary>
public AbpRoutes Routes { get; set; }
/// <summary>
/// Gets or sets the metadata.
/// </summary>
public AbpMetadata Metadata { get; set; }
/// <summary>
/// Gets or sets the deadletter topic.
/// </summary>
public string DeadLetterTopic { get; set; }
}
/// <summary>
/// This class defines the metadata for subscribe endpoint.
/// </summary>
public class AbpMetadata : Dictionary<string, string>
{
/// <summary>
/// Initializes a new instance of the Metadata class.
/// </summary>
public AbpMetadata() { }
/// <summary>
/// Initializes a new instance of the Metadata class.
/// </summary>
/// <param name="dictionary"></param>
public AbpMetadata(IDictionary<string, string> dictionary) : base(dictionary) { }
/// <summary>
/// RawPayload key
/// </summary>
internal const string RawPayload = "rawPayload";
}
/// <summary>
/// This class defines the routes for subscribe endpoint.
/// </summary>
public class AbpRoutes
{
/// <summary>
/// Gets or sets the default route
/// </summary>
public string Default { get; set; }
/// <summary>
/// Gets or sets the routing rules
/// </summary>
public List<AbpRule> Rules { get; set; }
}
/// <summary>
/// This class defines the rule for subscribe endpoint.
/// </summary>
public class AbpRule
{
/// <summary>
/// Gets or sets the CEL expression to match this route.
/// </summary>
public string Match { get; set; }
/// <summary>
/// Gets or sets the path of the route.
/// </summary>
public string Path { get; set; }
}
}
namespace Microsoft.AspNetCore.Builder
{
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Dapr;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Routing.Patterns;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
/// <summary>
/// Contains extension methods for <see cref="IEndpointRouteBuilder" />.
/// </summary>
public static class AbpDaprEndpointRouteBuilderExtensions
{
/// <summary>
/// Maps an endpoint that will respond to requests to <c>/dapr/subscribe</c> from the
/// Dapr runtime.
/// </summary>
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder" />.</param>
/// <returns>The <see cref="IEndpointConventionBuilder" />.</returns>
public static IEndpointConventionBuilder MapAbpSubscribeHandler(this IEndpointRouteBuilder endpoints)
{
return CreateSubscribeEndPoint(endpoints);
}
/// <summary>
/// Maps an endpoint that will respond to requests to <c>/dapr/subscribe</c> from the
/// Dapr runtime.
/// </summary>
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder" />.</param>
/// <param name="options">Configuration options</param>
/// <returns>The <see cref="IEndpointConventionBuilder" />.</returns>
/// <seealso cref="MapAbpSubscribeHandler(IEndpointRouteBuilder)"/>
public static IEndpointConventionBuilder MapAbpSubscribeHandler(this IEndpointRouteBuilder endpoints, AbpSubscribeOptions options)
{
return CreateSubscribeEndPoint(endpoints, options);
}
private static IEndpointConventionBuilder CreateSubscribeEndPoint(IEndpointRouteBuilder endpoints, AbpSubscribeOptions options = null)
{
if (endpoints is null)
{
throw new System.ArgumentNullException(nameof(endpoints));
}
return endpoints.MapGet("dapr/subscribe", async context =>
{
var logger = context.RequestServices.GetRequiredService<ILoggerFactory>().CreateLogger("DaprTopicSubscription");
var dataSource = context.RequestServices.GetRequiredService<EndpointDataSource>();
var subscriptions = dataSource.Endpoints
.OfType<RouteEndpoint>()
.Where(e => e.Metadata.GetOrderedMetadata<ITopicMetadata>().Any(t => t.Name != null)) // only endpoints which have TopicAttribute with not null Name.
.SelectMany(e =>
{
var topicMetadata = e.Metadata.GetOrderedMetadata<ITopicMetadata>();
var originalTopicMetadata = e.Metadata.GetOrderedMetadata<IOriginalTopicMetadata>();
var subs = new List<(string PubsubName, string Name, string DeadLetterTopic, bool? EnableRawPayload, string Match, int Priority, Dictionary<string, string[]> OriginalTopicMetadata, string MetadataSeparator, RoutePattern RoutePattern)>();
for (int i = 0; i < topicMetadata.Count(); i++)
{
subs.Add((topicMetadata[i].PubsubName,
topicMetadata[i].Name,
(topicMetadata[i] as IDeadLetterTopicMetadata)?.DeadLetterTopic,
(topicMetadata[i] as IRawTopicMetadata)?.EnableRawPayload,
topicMetadata[i].Match,
topicMetadata[i].Priority,
originalTopicMetadata.Where(m => (topicMetadata[i] as IOwnedOriginalTopicMetadata)?.OwnedMetadatas?.Any(o => o.Equals(m.Id)) == true || string.IsNullOrEmpty(m.Id))
.GroupBy(c => c.Name)
.ToDictionary(m => m.Key, m => m.Select(c => c.Value).Distinct().ToArray()),
(topicMetadata[i] as IOwnedOriginalTopicMetadata)?.MetadataSeparator,
e.RoutePattern));
}
return subs;
})
.Distinct()
.GroupBy(e => new { e.PubsubName, e.Name })
.Select(e => e.OrderBy(e => e.Priority))
.Select(e =>
{
var first = e.First();
var rawPayload = e.Any(e => e.EnableRawPayload.GetValueOrDefault());
var metadataSeparator = e.FirstOrDefault(e => !string.IsNullOrEmpty(e.MetadataSeparator)).MetadataSeparator ?? ",";
var rules = e.Where(e => !string.IsNullOrEmpty(e.Match)).ToList();
var defaultRoutes = e.Where(e => string.IsNullOrEmpty(e.Match)).Select(e => RoutePatternToString(e.RoutePattern)).ToList();
var defaultRoute = defaultRoutes.FirstOrDefault();
//multiple identical names. use comma separation.
var metadata = new AbpMetadata(e.SelectMany(c => c.OriginalTopicMetadata).GroupBy(c => c.Key).ToDictionary(c => c.Key, c => string.Join(metadataSeparator, c.SelectMany(c => c.Value).Distinct())));
if (rawPayload || options?.EnableRawPayload is true)
{
metadata.Add(AbpMetadata.RawPayload, "true");
}
if (logger != null)
{
if (defaultRoutes.Count > 1)
{
logger.LogError("A default subscription to topic {name} on pubsub {pubsub} already exists.", first.Name, first.PubsubName);
}
var duplicatePriorities = rules.GroupBy(e => e.Priority)
.Where(g => g.Count() > 1)
.ToDictionary(x => x.Key, y => y.Count());
foreach (var entry in duplicatePriorities)
{
logger.LogError("A subscription to topic {name} on pubsub {pubsub} has duplicate priorities for {priority}: found {count} occurrences.", first.Name, first.PubsubName, entry.Key, entry.Value);
}
}
var subscription = new AbpSubscription
{
Topic = first.Name,
PubsubName = first.PubsubName,
Metadata = metadata.Count > 0 ? metadata : null,
};
if (first.DeadLetterTopic != null)
{
subscription.DeadLetterTopic = first.DeadLetterTopic;
}
// Use the V2 routing rules structure
if (rules.Count > 0)
{
subscription.Routes = new AbpRoutes
{
Rules = rules.Select(e => new AbpRule
{
Match = e.Match,
Path = RoutePatternToString(e.RoutePattern),
}).ToList(),
Default = defaultRoute,
};
}
// Use the V1 structure for backward compatibility.
else
{
subscription.Route = defaultRoute;
}
return subscription;
})
.OrderBy(e => (e.PubsubName, e.Topic))
.ToList();
await options?.SubscriptionsCallback(subscriptions);
await context.Response.WriteAsync(JsonSerializer.Serialize(subscriptions,
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
}));
});
}
private static string RoutePatternToString(RoutePattern routePattern)
{
return string.Join("/", routePattern.PathSegments
.Select(segment => string.Concat(segment.Parts.Cast<RoutePatternLiteralPart>()
.Select(part => part.Content))));
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.csproj

@ -5,8 +5,6 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
</PropertyGroup>

61
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprEventBusModule.cs

@ -1,7 +1,14 @@
using Microsoft.AspNetCore.Http.Json;
using Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.SystemTextJson;
using System.Linq;
using System.Threading.Tasks;
using Dapr;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Dapr;
using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus;
@ -14,16 +21,50 @@ public class AbpAspNetCoreMvcDaprEventBusModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// TODO: Add NewtonsoftJson json converter.
var subscribeOptions = context.Services.ExecutePreConfiguredActions<AbpSubscribeOptions>();
Configure<JsonOptions>(options =>
Configure<AbpEndpointRouterOptions>(options =>
{
options.SerializerOptions.Converters.Add(new AbpAspNetCoreMvcDaprSubscriptionDefinitionConverter());
});
options.EndpointConfigureActions.Add(endpointContext =>
{
var rootServiceProvider = endpointContext.ScopeServiceProvider.GetRequiredService<IRootServiceProvider>();
subscribeOptions.SubscriptionsCallback = subscriptions =>
{
var daprEventBusOptions = rootServiceProvider.GetRequiredService<IOptions<AbpDaprEventBusOptions>>().Value;
foreach (var handler in rootServiceProvider.GetRequiredService<IOptions<AbpDistributedEventBusOptions>>().Value.Handlers)
{
foreach (var @interface in handler.GetInterfaces().Where(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IDistributedEventHandler<>)))
{
var eventType = @interface.GetGenericArguments()[0];
var eventName = EventNameAttribute.GetNameOrDefault(eventType);
Configure<AbpSystemTextJsonSerializerOptions>(options =>
{
options.JsonSerializerOptions.Converters.Add(new AbpAspNetCoreMvcDaprSubscriptionDefinitionConverter());
if (subscriptions.Any(x => x.PubsubName == daprEventBusOptions.PubSubName && x.Topic == eventName))
{
// Controllers with a [Topic] attribute can replace built-in event handlers.
continue;
}
var subscription = new AbpSubscription
{
PubsubName = daprEventBusOptions.PubSubName,
Topic = eventName,
Route = AbpAspNetCoreMvcDaprPubSubConsts.DaprEventCallbackUrl,
Metadata = new AbpMetadata
{
{
AbpMetadata.RawPayload, "true"
}
}
};
subscriptions.Add(subscription);
}
}
return Task.CompletedTask;
};
endpointContext.Endpoints.MapAbpSubscribeHandler(subscribeOptions);
});
});
}
}

11
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprEventBusOptions.cs

@ -1,11 +0,0 @@
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus;
public class AbpAspNetCoreMvcDaprEventBusOptions
{
public List<IAbpAspNetCoreMvcDaprPubSubProviderContributor> Contributors { get; }
public AbpAspNetCoreMvcDaprEventBusOptions()
{
Contributors = new List<IAbpAspNetCoreMvcDaprPubSubProviderContributor>();
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprPubSubConsts.cs

@ -2,7 +2,5 @@
public class AbpAspNetCoreMvcDaprPubSubConsts
{
public const string DaprSubscribeUrl = "dapr/subscribe";
public const string DaprEventCallbackUrl = "api/abp/dapr/event";
}

63
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprPubSubProvider.cs

@ -1,63 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Models;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Dapr;
using Volo.Abp.EventBus.Distributed;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus;
public class AbpAspNetCoreMvcDaprPubSubProvider : ITransientDependency
{
protected IServiceProvider ServiceProvider { get; }
protected AbpAspNetCoreMvcDaprEventBusOptions AspNetCoreMvcDaprEventBusOptions { get; }
protected AbpDaprEventBusOptions DaprEventBusOptions { get; }
protected AbpDistributedEventBusOptions DistributedEventBusOptions { get; }
public AbpAspNetCoreMvcDaprPubSubProvider(
IServiceProvider serviceProvider,
IOptions<AbpAspNetCoreMvcDaprEventBusOptions> aspNetCoreDaprEventBusOptions,
IOptions<AbpDaprEventBusOptions> daprEventBusOptions,
IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions)
{
ServiceProvider = serviceProvider;
AspNetCoreMvcDaprEventBusOptions = aspNetCoreDaprEventBusOptions.Value;
DaprEventBusOptions = daprEventBusOptions.Value;
DistributedEventBusOptions = distributedEventBusOptions.Value;
}
public virtual async Task<List<AbpAspNetCoreMvcDaprSubscriptionDefinition>> GetSubscriptionsAsync()
{
var subscriptions = new List<AbpAspNetCoreMvcDaprSubscriptionDefinition>();
foreach (var handler in DistributedEventBusOptions.Handlers)
{
foreach (var @interface in handler.GetInterfaces().Where(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IDistributedEventHandler<>)))
{
var eventType = @interface.GetGenericArguments()[0];
var eventName = EventNameAttribute.GetNameOrDefault(eventType);
subscriptions.Add(new AbpAspNetCoreMvcDaprSubscriptionDefinition()
{
PubSubName = DaprEventBusOptions.PubSubName,
Topic = eventName,
Route = AbpAspNetCoreMvcDaprPubSubConsts.DaprEventCallbackUrl
});
}
}
if (AspNetCoreMvcDaprEventBusOptions.Contributors.Any())
{
using (var scope = ServiceProvider.CreateScope())
{
var context = new AbpAspNetCoreMvcDaprPubSubProviderContributorContext(scope.ServiceProvider, subscriptions);
foreach (var contributor in AspNetCoreMvcDaprEventBusOptions.Contributors)
{
await contributor.ContributeAsync(context);
}
}
}
return subscriptions;
}
}

16
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/AbpAspNetCoreMvcDaprPubSubProviderContributorContext.cs

@ -1,16 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Models;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus;
public class AbpAspNetCoreMvcDaprPubSubProviderContributorContext
{
public IServiceProvider ServiceProvider { get; }
public List<AbpAspNetCoreMvcDaprSubscriptionDefinition> Subscriptions { get; }
public AbpAspNetCoreMvcDaprPubSubProviderContributorContext(IServiceProvider serviceProvider, List<AbpAspNetCoreMvcDaprSubscriptionDefinition> daprSubscriptionModels)
{
ServiceProvider = serviceProvider;
Subscriptions = daprSubscriptionModels;
}
}

38
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Controllers/AbpAspNetCoreMvcDaprEventsController.cs

@ -0,0 +1,38 @@
using System;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Volo.Abp.Dapr;
using Volo.Abp.EventBus.Dapr;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Controllers;
[Area("abp")]
[RemoteService(Name = "abp")]
public class AbpAspNetCoreMvcDaprEventsController : AbpController
{
[HttpPost(AbpAspNetCoreMvcDaprPubSubConsts.DaprEventCallbackUrl)]
public virtual async Task<IActionResult> EventAsync()
{
HttpContext.ValidateDaprAppApiToken();
var daprSerializer = HttpContext.RequestServices.GetRequiredService<IDaprSerializer>();
var body = (await JsonDocument.ParseAsync(HttpContext.Request.Body));
var pubSubName = body.RootElement.GetProperty("pubsubname").GetString();
var topic = body.RootElement.GetProperty("topic").GetString();
var data = body.RootElement.GetProperty("data").GetRawText();
if (pubSubName.IsNullOrWhiteSpace() || topic.IsNullOrWhiteSpace() || data.IsNullOrWhiteSpace())
{
Logger.LogError("Invalid Dapr event request.");
return BadRequest();
}
var distributedEventBus = HttpContext.RequestServices.GetRequiredService<DaprDistributedEventBus>();
var eventData = daprSerializer.Deserialize(data, distributedEventBus.GetEventType(topic));
await distributedEventBus.TriggerHandlersAsync(distributedEventBus.GetEventType(topic), eventData);
return Ok();
}
}

38
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Controllers/AbpAspNetCoreMvcDaprPubSubController.cs

@ -1,38 +0,0 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Models;
using Volo.Abp.Dapr;
using Volo.Abp.EventBus.Dapr;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Controllers;
[Area("abp")]
[RemoteService(Name = "abp")]
public class AbpAspNetCoreMvcDaprPubSubController : AbpController
{
[HttpGet(AbpAspNetCoreMvcDaprPubSubConsts.DaprSubscribeUrl)]
public virtual async Task<List<AbpAspNetCoreMvcDaprSubscriptionDefinition>> SubscribeAsync()
{
return await HttpContext.RequestServices.GetRequiredService<AbpAspNetCoreMvcDaprPubSubProvider>().GetSubscriptionsAsync();
}
[HttpPost(AbpAspNetCoreMvcDaprPubSubConsts.DaprEventCallbackUrl)]
public virtual async Task<IActionResult> EventsAsync()
{
this.HttpContext.ValidateDaprAppApiToken();
var bodyJsonDocument = await JsonDocument.ParseAsync(HttpContext.Request.Body);
var request = JsonSerializer.Deserialize<AbpAspNetCoreMvcDaprSubscriptionRequest>(bodyJsonDocument.RootElement.GetRawText(),
HttpContext.RequestServices.GetRequiredService<IOptions<JsonOptions>>().Value.JsonSerializerOptions);
var distributedEventBus = HttpContext.RequestServices.GetRequiredService<DaprDistributedEventBus>();
var daprSerializer = HttpContext.RequestServices.GetRequiredService<IDaprSerializer>();
var eventData = daprSerializer.Deserialize(bodyJsonDocument.RootElement.GetProperty("data").GetRawText(), distributedEventBus.GetEventType(request.Topic));
await distributedEventBus.TriggerHandlersAsync(distributedEventBus.GetEventType(request.Topic), eventData);
return Ok();
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/IAbpAspNetCoreMvcDaprPubSubProviderContributor.cs

@ -1,6 +0,0 @@
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus;
public interface IAbpAspNetCoreMvcDaprPubSubProviderContributor
{
Task ContributeAsync(AbpAspNetCoreMvcDaprPubSubProviderContributorContext context);
}

10
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Models/AbpAspNetCoreMvcDaprSubscriptionDefinition.cs

@ -1,10 +0,0 @@
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Models;
public class AbpAspNetCoreMvcDaprSubscriptionDefinition
{
public string PubSubName { get; set; }
public string Topic { get; set; }
public string Route { get; set; }
}

8
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/Models/AbpAspNetCoreMvcDaprSubscriptionRequest.cs

@ -1,8 +0,0 @@
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Models;
public class AbpAspNetCoreMvcDaprSubscriptionRequest
{
public string PubSubName { get; set; }
public string Topic { get; set; }
}

11
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/SystemTextJson/AbpAspNetCoreMvcDaprPubSubJsonNamingPolicy.cs

@ -1,11 +0,0 @@
using System.Text.Json;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.SystemTextJson;
public class AbpAspNetCoreMvcDaprPubSubJsonNamingPolicy : JsonNamingPolicy
{
public override string ConvertName(string name)
{
return name.ToLower();
}
}

25
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo/Abp/AspNetCore/Mvc/Dapr/EventBus/SystemTextJson/AbpAspNetCoreMvcDaprSubscriptionDefinitionConverter.cs

@ -1,25 +0,0 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.Models;
namespace Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.SystemTextJson;
public class AbpAspNetCoreMvcDaprSubscriptionDefinitionConverter : JsonConverter<AbpAspNetCoreMvcDaprSubscriptionDefinition>
{
private JsonSerializerOptions? _writeJsonSerializerOptions;
public override AbpAspNetCoreMvcDaprSubscriptionDefinition Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
throw new NotSupportedException();
}
public override void Write(Utf8JsonWriter writer, AbpAspNetCoreMvcDaprSubscriptionDefinition value, JsonSerializerOptions options)
{
_writeJsonSerializerOptions ??= JsonSerializerOptionsHelper.Create(new JsonSerializerOptions(options)
{
PropertyNamingPolicy = new AbpAspNetCoreMvcDaprPubSubJsonNamingPolicy()
}, x => x == this);
JsonSerializer.Serialize(writer, value, _writeJsonSerializerOptions);
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo.Abp.AspNetCore.Mvc.Dapr.csproj

@ -5,8 +5,6 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
</PropertyGroup>
@ -16,7 +14,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.8.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
</ItemGroup>
</Project>

21
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo/Abp/AspNetCore/Mvc/Dapr/DaprAppApiTokenValidator.cs

@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Authorization;
using Volo.Abp.Dapr;
@ -10,13 +11,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Dapr;
public class DaprAppApiTokenValidator : IDaprAppApiTokenValidator, ISingletonDependency
{
protected IHttpContextAccessor HttpContextAccessor { get; }
protected HttpContext HttpContext => GetHttpContext();
protected HttpContext HttpContext => GetHttpContext();
public DaprAppApiTokenValidator(IHttpContextAccessor httpContextAccessor)
{
HttpContextAccessor = httpContextAccessor;
}
public virtual void CheckDaprAppApiToken()
{
var expectedAppApiToken = GetConfiguredAppApiTokenOrNull();
@ -24,7 +25,7 @@ public class DaprAppApiTokenValidator : IDaprAppApiTokenValidator, ISingletonDep
{
return;
}
var headerAppApiToken = GetDaprAppApiTokenOrNull();
if (headerAppApiToken.IsNullOrWhiteSpace())
{
@ -44,12 +45,12 @@ public class DaprAppApiTokenValidator : IDaprAppApiTokenValidator, ISingletonDep
{
return true;
}
var headerAppApiToken = GetDaprAppApiTokenOrNull();
return expectedAppApiToken == headerAppApiToken;
}
public virtual string? GetDaprAppApiTokenOrNull()
public virtual string GetDaprAppApiTokenOrNull()
{
string apiTokenHeader = HttpContext.Request.Headers["dapr-api-token"];
if (string.IsNullOrEmpty(apiTokenHeader) || apiTokenHeader.Length < 1)
@ -59,8 +60,8 @@ public class DaprAppApiTokenValidator : IDaprAppApiTokenValidator, ISingletonDep
return apiTokenHeader;
}
protected virtual string? GetConfiguredAppApiTokenOrNull()
protected virtual string GetConfiguredAppApiTokenOrNull()
{
return HttpContext
.RequestServices
@ -72,4 +73,4 @@ public class DaprAppApiTokenValidator : IDaprAppApiTokenValidator, ISingletonDep
{
return HttpContextAccessor.HttpContext ?? throw new AbpException("HttpContext is not available!");
}
}
}

11
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo/Abp/AspNetCore/Mvc/Dapr/DaprHttpContextExtensions.cs

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Volo.Abp.AspNetCore.Mvc.Dapr;
@ -12,7 +13,7 @@ public static class DaprHttpContextExtensions
.GetRequiredService<IDaprAppApiTokenValidator>()
.CheckDaprAppApiToken();
}
public static bool IsValidDaprAppApiToken(this HttpContext httpContext)
{
return httpContext
@ -20,12 +21,12 @@ public static class DaprHttpContextExtensions
.GetRequiredService<IDaprAppApiTokenValidator>()
.IsValidDaprAppApiToken();
}
public static string? GetDaprAppApiTokenOrNull(HttpContext httpContext)
public static string GetDaprAppApiTokenOrNull(HttpContext httpContext)
{
return httpContext
.RequestServices
.GetRequiredService<IDaprAppApiTokenValidator>()
.GetDaprAppApiTokenOrNull();
}
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo/Abp/AspNetCore/Mvc/Dapr/IDaprAppApiTokenValidator.cs

@ -3,6 +3,8 @@ namespace Volo.Abp.AspNetCore.Mvc.Dapr;
public interface IDaprAppApiTokenValidator
{
void CheckDaprAppApiToken();
bool IsValidDaprAppApiToken();
string? GetDaprAppApiTokenOrNull();
}
string GetDaprAppApiTokenOrNull();
}

13
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/de-DE.json

@ -1,13 +0,0 @@
{
"culture": "de-DE",
"texts": {
"GivenTenantIsNotExist": "Der angegebene Client ist nicht vorhanden: {0}",
"GivenTenantIsNotAvailable": "Der angegebene Mandant ist nicht verfügbar: {0}",
"Tenant": "Mandant",
"Switch": "wechseln",
"Name": "Name",
"SwitchTenantHint": "Lassen Sie das Namensfeld leer, um zur Host-Seite zu wechseln.",
"SwitchTenant": "Mandant wechseln",
"NotSelected": "Nicht ausgewählt"
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiforgeryTokenAuthorizationFilter.cs

@ -46,7 +46,7 @@ public class AbpValidateAntiforgeryTokenAuthorizationFilter : IAsyncAuthorizatio
}
catch (AntiforgeryValidationException exception)
{
_logger.LogError(exception.Message, exception);
_logger.LogWarning(exception.Message, exception);
context.Result = new AntiforgeryValidationFailedResult();
}
}

17
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiDescriptionExtensions.cs

@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Volo.Abp.Reflection;
@ -7,9 +6,9 @@ namespace Volo.Abp.AspNetCore.Mvc;
public static class ApiDescriptionExtensions
{
public static bool IsRemoteService(this ApiDescription actionDescriptor)
public static bool IsRemoteService(this ApiDescription apiDescriptor)
{
if (actionDescriptor.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
if (apiDescriptor.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
{
var remoteServiceAttr = ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<RemoteServiceAttribute>(controllerActionDescriptor.MethodInfo);
if (remoteServiceAttr != null && remoteServiceAttr.IsEnabled)
@ -31,4 +30,14 @@ public static class ApiDescriptionExtensions
return false;
}
public static bool IsIntegrationService(this ApiDescription apiDescriptor)
{
if (apiDescriptor.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
{
return IntegrationServiceAttribute.IsDefinedOrInherited(controllerActionDescriptor.ControllerTypeInfo);
}
return false;
}
}

1
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs

@ -103,6 +103,7 @@ public class AspNetCoreApiDescriptionModelProvider : IApiDescriptionModelProvide
_options.ControllerNameGenerator(controllerType, setting),
FindGroupName(controllerType) ?? apiDescription.GroupName,
apiDescription.IsRemoteService(),
apiDescription.IsIntegrationService(),
apiDescription.GetProperty<ApiVersion>()?.ToString(),
controllerType,
_modelOptions.IgnoredInterfaces

2
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs

@ -33,6 +33,8 @@ public class AbpAspNetCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAuthorization();
Configure<AbpAuditingOptions>(options =>
{
options.Contributors.Add(new AspNetCoreAuditLogContributor());

2
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/de-DE.json

@ -1,7 +1,7 @@
{
"culture": "de-DE",
"texts": {
"Volo.Authorization:010001": "Autorisation fehlgeschlagen! Die gegebene Politik hat nicht gewährt.",
"Volo.Authorization:010001": "Autorisation fehlgeschlagen! Die entsprechende Richtlinie wurde nicht erfüllt.",
"Volo.Authorization:010002": "Autorisation fehlgeschlagen! Die angegebene Richtlinie wurde nicht gewährt: {PolicyName}",
"Volo.Authorization:010003": "Autorisation fehlgeschlagen! Die angegebene Richtlinie wurde für die angegebene Ressource nicht gewährt: {ResourceName}",
"Volo.Authorization:010004": "Autorisation fehlgeschlagen! Die angegebene Anforderung wurde für die angegebene Ressource nicht gewährt: {ResourceName}",

77
framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor

@ -1,49 +1,52 @@
<Modal @ref="@ModalRef" Closing="@OnModalClosing">
<ModalContent Centered="@CenterMessage">
<ModalHeader>
<ModalTitle>
@Title
</ModalTitle>
</ModalHeader>
@if (!Title.IsNullOrEmpty())
{
<ModalHeader>
<ModalTitle>
@Title
</ModalTitle>
</ModalHeader>
}
<ModalBody>
@if ( ShowMessageIcon )
{
<DisplayHeading Size="DisplayHeadingSize.Is2" Alignment="TextAlignment.Center">
<Icon Name="@MessageIcon" Style="@MessageIconStyle" />
<DisplayHeading Size="DisplayHeadingSize.Is2" TextAlignment="TextAlignment.Center">
<Icon Name="@MessageIcon" Style="@MessageIconStyle" />
</DisplayHeading>
}
<Text Alignment="TextAlignment.Center">
<Paragraph TextAlignment="TextAlignment.Center" Margin="Margin.Is0.FromBottom">
@Message
</Text>
</Paragraph>
</ModalBody>
<ModalFooter>
@if ( IsConfirmation )
{
<Button Color="Color.Danger" Padding="Padding.Is2.OnX" Clicked="@OnCancelClicked">
@if ( Options?.CancelButtonIcon != null )
{
<Icon Name="@Options.CancelButtonIcon" Margin="Margin.Is2.FromEnd" />
}
@CancelButtonText
</Button>
<Button Color="Color.Primary" Padding="Padding.Is2.OnX" Clicked="@OnConfirmClicked">
@if ( Options?.ConfirmButtonIcon != null )
{
<Icon Name="@Options.ConfirmButtonIcon" Margin="Margin.Is2.FromEnd" />
}
@ConfirmButtonText
</Button>
}
else
{
<Button Color="Color.Primary" Padding="Padding.Is2.OnX" Clicked="@OnOkClicked">
@if ( Options?.OkButtonIcon != null )
{
<Icon Name="@Options.OkButtonIcon" Margin="Margin.Is2.FromEnd" />
}
@OkButtonText
</Button>
}
<ModalFooter class="d-flex justify-content-center">
@if ( IsConfirmation )
{
<Button Color="Color.Danger" Padding="Padding.Is3.OnX" Margin="Margin.Is1.OnX" Clicked="@OnCancelClicked">
@if ( Options?.CancelButtonIcon != null )
{
<Icon Name="@Options.CancelButtonIcon" Margin="Margin.Is2.FromEnd" />
}
@CancelButtonText
</Button>
<Button Color="Color.Primary" Padding="Padding.Is3.OnX" Margin="Margin.Is1.OnX" Clicked="@OnConfirmClicked">
@if ( Options?.ConfirmButtonIcon != null )
{
<Icon Name="@Options.ConfirmButtonIcon" Margin="Margin.Is2.FromEnd" />
}
@ConfirmButtonText
</Button>
}
else
{
<Button Color="Color.Primary" Padding="Padding.Is3.OnX" Margin="Margin.Is1.OnX" Clicked="@OnOkClicked">
@if ( Options?.OkButtonIcon != null )
{
<Icon Name="@Options.OkButtonIcon" Margin="Margin.Is2.FromEnd" />
}
@OkButtonText
</Button>
}
</ModalFooter>
</ModalContent>
</Modal>

8
framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj

@ -14,10 +14,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazorise" Version="1.1.2" />
<PackageReference Include="Blazorise.DataGrid" Version="1.1.2" />
<PackageReference Include="Blazorise.Snackbar" Version="1.1.2" />
<PackageReference Include="Blazorise.Components" Version="1.1.2" />
<PackageReference Include="Blazorise" Version="1.1.3.1" />
<PackageReference Include="Blazorise.DataGrid" Version="1.1.3.1" />
<PackageReference Include="Blazorise.Snackbar" Version="1.1.3.1" />
<PackageReference Include="Blazorise.Components" Version="1.1.3.1" />
</ItemGroup>
</Project>

14
framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainer.cs

@ -10,11 +10,11 @@ namespace Volo.Abp.BlobStoring;
public class BlobContainer<TContainer> : IBlobContainer<TContainer>
where TContainer : class
{
private readonly IBlobContainer _container;
protected readonly IBlobContainer Container;
public BlobContainer(IBlobContainerFactory blobContainerFactory)
{
_container = blobContainerFactory.Create<TContainer>();
Container = blobContainerFactory.Create<TContainer>();
}
public Task SaveAsync(
@ -23,7 +23,7 @@ public class BlobContainer<TContainer> : IBlobContainer<TContainer>
bool overrideExisting = false,
CancellationToken cancellationToken = default)
{
return _container.SaveAsync(
return Container.SaveAsync(
name,
stream,
overrideExisting,
@ -35,7 +35,7 @@ public class BlobContainer<TContainer> : IBlobContainer<TContainer>
string name,
CancellationToken cancellationToken = default)
{
return _container.DeleteAsync(
return Container.DeleteAsync(
name,
cancellationToken
);
@ -45,7 +45,7 @@ public class BlobContainer<TContainer> : IBlobContainer<TContainer>
string name,
CancellationToken cancellationToken = default)
{
return _container.ExistsAsync(
return Container.ExistsAsync(
name,
cancellationToken
);
@ -55,7 +55,7 @@ public class BlobContainer<TContainer> : IBlobContainer<TContainer>
string name,
CancellationToken cancellationToken = default)
{
return _container.GetAsync(
return Container.GetAsync(
name,
cancellationToken
);
@ -65,7 +65,7 @@ public class BlobContainer<TContainer> : IBlobContainer<TContainer>
string name,
CancellationToken cancellationToken = default)
{
return _container.GetOrNullAsync(
return Container.GetOrNullAsync(
name,
cancellationToken
);

19
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AngularThemeConfigurationArgs.cs

@ -0,0 +1,19 @@
using Volo.Abp.Cli.ProjectBuilding.Building;
namespace Volo.Abp.Cli.Args;
public class AngularThemeConfigurationArgs
{
public Theme Theme { get; }
public string ProjectName { get; }
public string AngularFolderPath { get; }
public AngularThemeConfigurationArgs(Theme theme, string projectName, string angularFolderPath)
{
Theme = theme;
ProjectName = projectName;
AngularFolderPath = angularFolderPath;
}
}

5
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs

@ -1,4 +1,5 @@
using System;
using Volo.Abp.Http.Modeling;
namespace Volo.Abp.Cli;
@ -26,9 +27,9 @@ public static class CliUrls
return $"{NuGetRootPath}{apiKey}/v3/package/{packageId}/index.json";
}
public static string GetApiDefinitionUrl(string url)
public static string GetApiDefinitionUrl(string url, ApplicationApiDescriptionModelRequestDto model = null)
{
url = url.EnsureEndsWith('/');
return $"{url}api/abp/api-definition";
return $"{url}api/abp/api-definition{(model != null ? model.IncludeTypes ? "?includeTypes=true" : string.Empty : string.Empty)}";
}
}

15
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -40,7 +40,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
ILocalEventBus eventBus,
IBundlingService bundlingService,
ITemplateInfoProvider templateInfoProvider,
TemplateProjectBuilder templateProjectBuilder) :
TemplateProjectBuilder templateProjectBuilder,
AngularThemeConfigurer angularThemeConfigurer) :
base(connectionStringProvider,
solutionPackageVersionFinder,
cmdHelper,
@ -50,7 +51,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
initialMigrationCreator,
themePackageAdder,
eventBus,
bundlingService)
bundlingService,
angularThemeConfigurer)
{
TemplateInfoProvider = templateInfoProvider;
TemplateProjectBuilder = templateProjectBuilder;
@ -95,6 +97,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
Logger.LogInformation($"'{projectName}' has been successfully created to '{projectArgs.OutputFolder}'");
ConfigureAngularJsonForThemeSelection(projectArgs);
ConfigureNpmPackagesForTheme(projectArgs);
await RunGraphBuildForMicroserviceServiceTemplate(projectArgs);
await CreateInitialMigrationsAsync(projectArgs);
@ -105,7 +108,11 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
await RunInstallLibsForWebTemplateAsync(projectArgs);
}
await RunBundleForBlazorWasmTemplateAsync(projectArgs);
var skipBundling = commandLineArgs.Options.ContainsKey(Options.SkipBundling.Long) || commandLineArgs.Options.ContainsKey(Options.SkipBundling.Short);
if (!skipBundling)
{
await RunBundleForBlazorWasmTemplateAsync(projectArgs);
}
await ConfigurePwaSupportForAngular(projectArgs);
@ -140,6 +147,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
sb.AppendLine("--no-random-port (Use template's default ports)");
sb.AppendLine("--separate-auth-server (if supported by the template)");
sb.AppendLine("--local-framework-ref --abp-path <your-local-abp-repo-path> (keeps local references to projects instead of replacing with NuGet package references)");
sb.AppendLine("-sib|--skip-installing-libs (Doesn't run `abp install-libs` command after project creation)");
sb.AppendLine("-sb|--skip-bundling (Doesn't run `abp bundle` command after Blazor Wasm project creation)");
sb.AppendLine("");
sb.AppendLine("Examples:");
sb.AppendLine("");

39
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -19,6 +19,7 @@ using Volo.Abp.Cli.ProjectBuilding.Events;
using Volo.Abp.Cli.ProjectBuilding.Templates.App;
using Volo.Abp.Cli.ProjectBuilding.Templates.Microservice;
using Volo.Abp.Cli.ProjectBuilding.Templates.Module;
using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule;
using Volo.Abp.Cli.Utils;
using Volo.Abp.EventBus.Local;
@ -38,6 +39,8 @@ public abstract class ProjectCreationCommandBase
public ILogger<NewCommand> Logger { get; set; }
public ThemePackageAdder ThemePackageAdder { get; }
public AngularThemeConfigurer AngularThemeConfigurer { get; }
public ProjectCreationCommandBase(
ConnectionStringProvider connectionStringProvider,
@ -49,7 +52,8 @@ public abstract class ProjectCreationCommandBase
InitialMigrationCreator initialMigrationCreator,
ThemePackageAdder themePackageAdder,
ILocalEventBus eventBus,
IBundlingService bundlingService)
IBundlingService bundlingService,
AngularThemeConfigurer angularThemeConfigurer)
{
_bundlingService = bundlingService;
ConnectionStringProvider = connectionStringProvider;
@ -61,6 +65,7 @@ public abstract class ProjectCreationCommandBase
InitialMigrationCreator = initialMigrationCreator;
EventBus = eventBus;
ThemePackageAdder = themePackageAdder;
AngularThemeConfigurer = angularThemeConfigurer;
Logger = NullLogger<NewCommand>.Instance;
}
@ -667,6 +672,32 @@ public abstract class ProjectCreationCommandBase
}
}
protected void ConfigureAngularJsonForThemeSelection(ProjectBuildArgs projectArgs)
{
var theme = projectArgs.Theme;
var isProTemplate = !projectArgs.TemplateName.IsNullOrEmpty() && projectArgs.TemplateName.EndsWith("-pro", StringComparison.OrdinalIgnoreCase);
var isDefaultTheme = (isProTemplate && theme == AppProTemplate.DefaultTheme) ||
(!isProTemplate && theme == AppTemplate.DefaultTheme);
if (isDefaultTheme || projectArgs.TemplateName == ModuleTemplate.TemplateName)
{
return;
}
if (theme.HasValue && projectArgs.UiFramework == UiFramework.Angular)
{
var angularFolderPath = projectArgs.TemplateName == MicroserviceProTemplate.TemplateName
? projectArgs.OutputFolder.EnsureEndsWith(Path.DirectorySeparatorChar) + "apps" + Path.DirectorySeparatorChar + "angular"
: projectArgs.OutputFolder.EnsureEndsWith(Path.DirectorySeparatorChar) + "angular";
AngularThemeConfigurer.Configure(new AngularThemeConfigurationArgs(
theme: theme.Value,
projectName: projectArgs.SolutionName.FullName,
angularFolderPath: angularFolderPath
));
}
}
public static class Options
{
public static class Template
@ -750,6 +781,12 @@ public abstract class ProjectCreationCommandBase
public const string Long = "skip-installing-libs";
}
public static class SkipBundling
{
public const string Short = "sb";
public const string Long = "skip-bundling";
}
public static class Tiered
{
public const string Long = "tiered";

29
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs

@ -68,8 +68,22 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc
var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long);
var workDirectory = commandLineArgs.Options.GetOrNull(Options.WorkDirectory.Short, Options.WorkDirectory.Long) ?? Directory.GetCurrentDirectory();
var folder = commandLineArgs.Options.GetOrNull(Options.Folder.Long);
var serviceTypeArg = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.ServiceType.Long);
return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, commandLineArgs.Options);
ServiceType? serviceType = null;
if (!serviceTypeArg.IsNullOrWhiteSpace())
{
serviceType = serviceTypeArg.ToLower() == "application"
? ServiceType.Application
: serviceTypeArg.ToLower() == "integration"
? ServiceType.Integration
: null;
}
var withoutContracts = commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Short) ||
commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Long);
return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, withoutContracts, commandLineArgs.Options);
}
public virtual string GetUsageInfo()
@ -162,5 +176,18 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc
public const string Short = "wd";
public const string Long = "working-directory";
}
public static class ServiceType
{
public const string Short = "st";
public const string Long = "service-type";
}
public static class WithoutContracts
{
public const string Short = "c";
public const string Long = "without-contracts";
}
}
}

143
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs

@ -31,9 +31,9 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
protected void ChangeToBasicTheme(ProjectBuildContext context)
{
var defaultThemeName = context.BuildArgs.TemplateName is AppTemplate.TemplateName or AppNoLayersTemplate.TemplateName
? "LeptonXLite"
? "LeptonXLite"
: "LeptonX";
#region MVC Projects
ChangeThemeToBasicForMvcProjects(context, defaultThemeName);
@ -41,14 +41,14 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
#endregion
#region MyCompanyName.MyProjectName.Blazor
ReplacePackageReferenceWithProjectReference(
context,
"/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj",
$"Volo.Abp.AspNetCore.Components.WebAssembly.{defaultThemeName}Theme",
@"..\..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme\Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj"
);
ChangeNamespaceAndKeyword(
context,
"/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs",
@ -58,31 +58,40 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
"AbpAspNetCoreComponentsWebAssemblyBasicThemeModule"
);
ChangeNamespaceAndKeyword(
context,
"/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs",
$"Volo.Abp.AspNetCore.Components.Web.{defaultThemeName}Theme.Themes.{defaultThemeName}",
"Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic",
$"AbpAspNetCoreComponentsWebAssembly{defaultThemeName}ThemeModule",
"AbpAspNetCoreComponentsWebAssemblyBasicThemeModule"
);
ChangeNamespace(
context,
"/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs",
$"Volo.Abp.AspNetCore.Components.Web.{defaultThemeName}Theme.Components",
"Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic"
);
#endregion
#region Blazor.Server Projects
ChangeThemeToBasicForBlazorProjects(context, defaultThemeName);
#endregion
#region Angular
var angularPackageName = context.BuildArgs.TemplateName is AppTemplate.TemplateName or AppNoLayersTemplate.TemplateName
? "@abp/ng.theme.lepton-x"
? "@abp/ng.theme.lepton-x"
: "@volosoft/abp.ng.theme.lepton-x";
ReplaceImportPackage(
context,
context,
"/angular/src/app/app.module.ts",
angularPackageName,
angularPackageName,
"@abp/ng.theme.basic"
);
@ -98,7 +107,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
"ThemeLeptonXModule",
"ThemeBasicModule"
);
RemoveLinesByStatement(
context,
"/angular/angular.json",
@ -113,7 +122,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
"HttpErrorComponent, ",
""
);
ChangeModuleImportBetweenStatements(
context,
"/angular/src/app/app.module.ts",
@ -128,11 +137,11 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
protected void ChangeToLeptonTheme(ProjectBuildContext context)
{
#region Common
#region Common
RenameLeptonXFolders(context, folderName: "Lepton");
AddLeptonThemeManagementReferenceToProjects(context);
#endregion
#region MVC Projects
@ -140,16 +149,16 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
ChangeThemeToLeptonForMvcProjects(context);
#endregion
#region MyCompanyName.MyProjectName.Blazor
ReplacePackageReferenceWithProjectReference(
context,
"/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj",
"Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXTheme",
@"..\..\..\..\..\lepton-theme\src\Volo.Abp.AspNetCore.Components.WebAssembly.LeptonTheme\Volo.Abp.AspNetCore.Components.WebAssembly.LeptonTheme.csproj"
);
ChangeNamespaceAndKeyword(
context,
"/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs",
@ -168,7 +177,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
#endregion
#region MyCompanyName.MyProjectName.Blazor.Server && MyCompanyName.MyProjectName.Blazor.Server.Tiered
#region MyCompanyName.MyProjectName.Blazor.Server && MyCompanyName.MyProjectName.Blazor.Server.Tiered
ChangeThemeToLeptonForBlazorServerProjects(context);
@ -177,9 +186,9 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
#region Angular
ReplaceImportPackage(
context,
context,
"/angular/src/app/app.module.ts",
"@volosoft/abp.ng.theme.lepton-x",
"@volosoft/abp.ng.theme.lepton-x",
"@volo/abp.ng.theme.lepton"
);
@ -195,7 +204,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
"ThemeLeptonXModule",
"ThemeLeptonModule"
);
RemoveLinesByStatement(
context,
"/angular/angular.json",
@ -214,7 +223,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
#region MyCompanyName.MyProjectName.Blazor.Server && MyCompanyName.MyProjectName.Blazor.Server.Mongo - (app-nolayers)
ChangeThemeToLeptonForNoLayersBlazorServerProjects(context);
#endregion
}
@ -233,7 +242,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
continue;
}
AddProjectReference(file, $@"..\..\..\..\lepton-theme\src\Volo.Abp.LeptonTheme.Management.{projectName}\Volo.Abp.LeptonTheme.Management.{projectName}.csproj");
AddModuleDependency(moduleFile, projectName, $"LeptonThemeManagement{ConvertProjectNameToModuleName($"{projectName}")}Module");
}
@ -241,12 +250,12 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
private void ChangeThemeToLeptonForMvcProjects(ProjectBuildContext context)
{
var projectNames = new[]
var projectNames = new[]
{
".Web", ".HttpApi.Host", ".AuthServer",
".Web", ".HttpApi.Host", ".AuthServer",
"" //for app-nolayers-mvc
};
foreach (var projectName in projectNames)
{
var projectPath = $"/MyCompanyName.MyProjectName{projectName}/MyCompanyName.MyProjectName{projectName}.csproj";
@ -255,20 +264,20 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
continue;
}
var moduleFile = ConvertProjectFileToModuleFile(context, projectFile);
if (moduleFile == null)
{
continue;
}
ReplacePackageReferenceWithProjectReference(
context,
projectFile.Name,
"Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX",
@"..\..\..\..\..\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.csproj"
);
ChangeNamespaceAndKeyword(
context,
moduleFile.Name,
@ -277,7 +286,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
"LeptonXThemeBundles.Styles.Global",
"LeptonThemeBundles.Styles.Global"
);
ChangeNamespaceAndKeyword(
context,
moduleFile.Name,
@ -286,7 +295,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
"AbpAspNetCoreMvcUiLeptonXThemeModule",
"AbpAspNetCoreMvcUiLeptonThemeModule"
);
RemoveLinesByStatement(
context,
moduleFile.Name,
@ -294,10 +303,10 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
);
}
}
private void AddLeptonThemeManagementReferenceToProjects(ProjectBuildContext context)
{
var projects = new Dictionary<string, string>
var projects = new Dictionary<string, string>
{
{"Domain", "MyCompanyName.MyProjectName.Domain.csproj"},
{"Domain.Shared", "MyCompanyName.MyProjectName.Domain.Shared.csproj"},
@ -306,9 +315,9 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{"HttpApi", "MyCompanyName.MyProjectName.HttpApi.csproj"},
{"HttpApi.Client", "MyCompanyName.MyProjectName.HttpApi.Client.csproj"}
};
AddUiProjectToProjects(projects, context);
foreach (var project in projects)
{
AddLeptonThemeManagementReference(context, project);
@ -324,7 +333,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{"HttpApi.Client", "MyCompanyName.MyProjectName.AdministrationService.HttpApi.Client.csproj"},
{"Web", "MyCompanyName.MyProjectName.AdministrationService.Web.csproj"}
};
foreach (var microserviceServiceProject in microserviceServiceProjects)
{
AddLeptonThemeManagementReference(context, microserviceServiceProject);
@ -337,7 +346,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
return;
}
switch (context.BuildArgs.UiFramework)
{
case UiFramework.Mvc:
@ -352,8 +361,8 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
break;
}
}
private void AddLeptonThemeManagementReference(ProjectBuildContext context, KeyValuePair<string, string> projectInfo)
private void AddLeptonThemeManagementReference(ProjectBuildContext context, KeyValuePair<string, string> projectInfo)
{
var reference = $@"..\..\..\..\..\lepton-theme\src\Volo.Abp.LeptonTheme.Management.{projectInfo.Key}\Volo.Abp.LeptonTheme.Management.{projectInfo.Key}.csproj";
var projectFile = context.Files.FirstOrDefault(f => !f.Name.Contains("Test") && f.Name.Contains(projectInfo.Value) && f.Name.Contains(".csproj"));
@ -367,7 +376,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
return;
}
AddProjectReference(projectFile, reference);
AddModuleDependency(moduleFile, projectInfo.Key, $"LeptonThemeManagement{ConvertProjectNameToModuleName(projectInfo.Key)}Module",
@ -391,12 +400,12 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
lines[i - 2] = lines[i - 2] + "," + Environment.NewLine + $"\ttypeof({dependency})";
}
}
moduleFile.SetLines(lines);
}
protected void ReplacePackageReferenceWithProjectReference(
ProjectBuildContext context,
protected void ReplacePackageReferenceWithProjectReference(
ProjectBuildContext context,
string targetProjectFilePath,
string packageReference,
string projectReference)
@ -406,16 +415,16 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
return;
}
file.NormalizeLineEndings();
var lines = file.GetLines();
var lineIndex = lines.FindIndex(line => line.Contains("PackageReference") && line.Contains(packageReference));
if (lineIndex == -1)
{
return;
}
lines[lineIndex] = lines[lineIndex].Replace(lines[lineIndex], $"\t<ProjectReference Include=\"{projectReference}\" />");
file.SetLines(lines);
}
@ -498,13 +507,13 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
return;
}
lines[lineIndex] = lines[lineIndex].Replace(oldImportPackage, newImportPackage);
file.SetLines(lines);
}
protected void RemoveLinesByStatement(
ProjectBuildContext context,
ProjectBuildContext context,
string filePath,
string statement)
{
@ -515,7 +524,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
}
file.NormalizeLineEndings();
var lines = file.GetLines();
for (var i = 0; i < lines.Length; i++)
{
@ -529,7 +538,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
}
private void ChangeModuleImportBetweenStatements(
ProjectBuildContext context,
ProjectBuildContext context,
string filePath,
string firstStatement,
string lastStatement,
@ -542,7 +551,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
}
file.NormalizeLineEndings();
var lines = file.GetLines();
var firstLineIndex = lines.FindIndex(line => line.Contains(firstStatement));
var lastLineIndex = lines.FindIndex(line => line.Contains(lastStatement));
@ -551,7 +560,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
return;
}
lines[firstLineIndex] = newStatement;
for (var i = firstLineIndex + 1; i <= lastLineIndex; i++)
@ -564,7 +573,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
}
protected void ReplaceMethodNames(
ProjectBuildContext context,
ProjectBuildContext context,
string filePath,
string oldMethodName,
string newMethodName)
@ -576,7 +585,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
}
file.NormalizeLineEndings();
var lines = file.GetLines();
for (var i = 0; i < lines.Length; i++)
{
@ -585,17 +594,17 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
lines[i] = lines[i].Replace(oldMethodName, newMethodName);
}
}
file.SetLines(lines);
}
private static void AddProjectReference(FileEntry file, string reference)
{
if (!file.Name.Contains(".csproj"))
{
return;
}
var doc = new XmlDocument() { PreserveWhitespace = true };
using (var stream = StreamHelper.GenerateStreamFromString(file.Content))
{
@ -647,19 +656,19 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
file.SetContent(doc.OuterXml);
}
}
private static FileEntry ConvertProjectFileToModuleFile(ProjectBuildContext context, FileEntry projectFile)
{
var splittedProjectFileName = projectFile.Name.RemovePostFix("/").Split("/");
splittedProjectFileName = splittedProjectFileName.Take(splittedProjectFileName.Length - 1).ToArray();
var fileName = splittedProjectFileName?.Last();
if (fileName == null)
{
return null;
}
fileName = fileName
.Replace("MyCompanyName.", "")
.Replace(".csproj", "Module")
@ -667,12 +676,12 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
return context.Files.FirstOrDefault(f => f.Name.Contains(splittedProjectFileName.Last() + "/" + fileName) && f.Name.EndsWith("Module.cs"));
}
private static string ConvertProjectNameToModuleName(string moduleName)
{
return moduleName.Replace(".", "");
}
private static void RenameLeptonXFolders(ProjectBuildContext context, string folderName)
{
var leptonXFiles = context.Files.Where(x => x.Name.Contains("LeptonX") && x.IsDirectory);
@ -700,7 +709,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
$"Volo.Abp.AspNetCore.Mvc.UI.Theme.{defaultThemeName}",
@"..\..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj"
);
ChangeNamespaceAndKeyword(
context,
$"/MyCompanyName.MyProjectName{project.Key}/{project.Value}.cs",
@ -720,7 +729,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
);
}
}
private void ChangeThemeToBasicForBlazorProjects(ProjectBuildContext context, string defaultThemeName)
{
var projects = new Dictionary<string, string>
@ -964,4 +973,4 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
);
}
}
}
}

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs

@ -236,10 +236,14 @@ public class TemplateProjectBuilder : IProjectBuilder, ITransientDependency
{
Logger.LogInformation("Theme: " + args.Theme);
if (args.UiFramework == UiFramework.Angular && (args.Theme != AppTemplate.DefaultTheme || args.Theme != AppProTemplate.DefaultTheme))
var isProTemplate = !args.TemplateName.IsNullOrEmpty() && args.TemplateName.EndsWith("-pro", StringComparison.OrdinalIgnoreCase);
if (args.UiFramework == UiFramework.Angular && ((isProTemplate && args.Theme != AppProTemplate.DefaultTheme) ||
(!isProTemplate && args.Theme != AppTemplate.DefaultTheme)))
{
Logger.LogWarning("You may need to make some additional changes for this theme. " +
"See the documentation for more information: https://docs.abp.io/en/abp/latest/UI/Angular/Theme-Configurations");
"See the documentation for more information: " +
"https://docs.abp.io/en/abp/latest/UI/Angular/Theme-Configurations");
}
}

30
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularThemeConfigurer.cs

@ -0,0 +1,30 @@
using System;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Cli.ProjectModification;
public class AngularThemeConfigurer : ITransientDependency
{
private readonly ICmdHelper _cmdHelper;
public AngularThemeConfigurer(ICmdHelper cmdHelper)
{
_cmdHelper = cmdHelper;
}
public void Configure(AngularThemeConfigurationArgs args)
{
if (args.ProjectName.IsNullOrEmpty() || args.AngularFolderPath.IsNullOrEmpty())
{
return;
}
var command = "npx ng g @abp/ng.schematics:change-theme " +
$"--name {(int)args.Theme} " +
$"--target-project {args.ProjectName}";
_cmdHelper.RunCmd(command, workingDirectory: args.AngularFolderPath);
}
}

13
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs

@ -30,7 +30,7 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase<AngularSer
_cliService = cliService;
}
public override async Task GenerateProxyAsync(GenerateProxyArgs args)
public async override Task GenerateProxyAsync(GenerateProxyArgs args)
{
CheckAngularJsonFile();
await CheckNgSchematicsAsync();
@ -76,9 +76,20 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase<AngularSer
commandBuilder.Append($" --url {url}");
}
var serviceType = GetServiceType(args);
if (args.ServiceType != null)
{
commandBuilder.Append($" --service-type {serviceType.ToString().ToLower()}");
}
_cmdhelper.RunCmd(commandBuilder.ToString());
}
protected override ServiceType? GetDefaultServiceType(GenerateProxyArgs args)
{
return ServiceType.Application;
}
private async Task CheckNgSchematicsAsync()
{
var packageJsonPath = $"package.json";

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

Loading…
Cancel
Save