Browse Source

Merge branch 'dev' into auto-merge/rel-6-0/1244

pull/13559/head
Enis Necipoglu 4 years ago
committed by GitHub
parent
commit
3364c69f7d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
  2. 6
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/ro-RO.json
  3. 9
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json
  4. 9
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json
  5. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ar.json
  6. 10
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json
  7. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/ro-RO.json
  8. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json
  9. 5
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/AbpIoWwwResource.cs
  10. 16
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
  11. 6
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/ro-RO.json
  12. 2
      common.props
  13. 12
      docs/en/Background-Jobs-RabbitMq.md
  14. 3
      docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md
  15. 0
      docs/en/Themes/LeptonXLite/Angular.md
  16. 0
      docs/en/Themes/LeptonXLite/Blazor.md
  17. 140
      docs/es/Getting-Started-AspNetCore-Application.md
  18. BIN
      docs/es/images/create-aspnet-core-application.png
  19. BIN
      docs/es/images/create-new-aspnet-core-application-v2.png
  20. BIN
      docs/es/images/select-empty-web-application-v2.png
  21. 10
      docs/zh-Hans/Background-Jobs-RabbitMq.md
  22. 3
      docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md
  23. 5
      framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/PageToolbars/PageToolbarManager.cs
  24. 5
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/PageToolbars/PageToolbarManager.cs
  25. 52
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/DependencyInjection/HttpContextServiceScopeFactory.cs
  26. 4
      framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IDeletionAuditedObject.cs
  27. 2
      framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IHasDeletionTime.cs
  28. 2
      framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IHasModificationTime.cs
  29. 4
      framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IModificationAuditedObject.cs
  30. 16
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditPropertySetter.cs
  31. 2
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs
  32. 10
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs
  33. 6
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs
  34. 3
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs
  35. 5
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs
  36. 3
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs
  37. 22
      framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultServiceScopeFactory.cs
  38. 8
      framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IHybridServiceScopeFactory.cs
  39. 4
      framework/src/Volo.Abp.Core/Volo/Abp/ISoftDelete.cs
  40. 36
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs
  41. 23
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs
  42. 22
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs
  43. 22
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs
  44. 22
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs
  45. 3
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/IEntityChangeEventHelper.cs
  46. 12
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/NullEntityChangeEventHelper.cs
  47. 6
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
  48. 2
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs
  49. 3
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs
  50. 5
      framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs
  51. 8
      framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs
  52. 6
      framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/QueueDeclareConfiguration.cs
  53. 7
      framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs
  54. 5
      framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs
  55. 4
      framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/ar.json
  56. 10
      framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/ro-RO.json
  57. 1
      framework/test/Volo.Abp.AspNetCore.Mvc.PlugIn/Volo.Abp.AspNetCore.Mvc.PlugIn.csproj
  58. 71
      framework/test/Volo.Abp.Core.Tests/Volo/Abp/DependencyInjection/HybridServiceScopeFactory_Tests.cs
  59. 1
      framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj
  60. 24
      framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs
  61. 2
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json
  62. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDbProperties.cs
  63. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContext.cs
  64. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs
  65. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/IBackgroundJobsDbContext.cs
  66. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContext.cs
  67. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs
  68. 2
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/IBackgroundJobsMongoDbContext.cs
  69. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/AbpBlobStoringDatabaseDbProperties.cs
  70. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContext.cs
  71. 4
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs
  72. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/IBlobStoringDbContext.cs
  73. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContext.cs
  74. 4
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs
  75. 2
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/IBlobStoringMongoDbContext.cs
  76. 2
      modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/AbpBloggingDbProperties.cs
  77. 2
      modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContext.cs
  78. 12
      modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs
  79. 2
      modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/IBloggingDbContext.cs
  80. 2
      modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContext.cs
  81. 10
      modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs
  82. 2
      modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/IBloggingMongoDbContext.cs
  83. 19
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/create.js
  84. 19
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/update.js
  85. 36
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js
  86. 28
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js
  87. 7
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/BlogPostCommonDto.cs
  88. 8
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/DefaultContentDto.cs
  89. 7
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContent.cs
  90. 10
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs
  91. 13
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/PageDto.cs
  92. 22
      modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs
  93. 4
      modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs
  94. 14
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Controllers/CmsKitCommonWidgetsController.cs
  95. 9
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewDto.cs
  96. 30
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewViewComponent.cs
  97. 10
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/Default.cshtml
  98. 20
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragment.cshtml
  99. 21
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragmentViewComponent.cs
  100. 2
      modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/IContentRenderer.cs

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

@ -397,6 +397,8 @@
"BookDiscountDeletionConfirmationMessage": "Are you sure you want to delete this book discount?", "BookDiscountDeletionConfirmationMessage": "Are you sure you want to delete this book discount?",
"CustomPaymentFlexSwitchDescription": "With license", "CustomPaymentFlexSwitchDescription": "With license",
"AllowFeatureUpgradeOnLicenseExpire": "Allow feature upgrade on license expire", "AllowFeatureUpgradeOnLicenseExpire": "Allow feature upgrade on license expire",
"Deleted{0}": "[Deleted {0}]" "Deleted{0}": "[Deleted {0}]",
"Tags": "Tags",
"SetTagsInfo": "Tags should be comma-separated. Eg: CSharp, Entity Framework"
} }
} }

6
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/ro-RO.json

@ -30,7 +30,7 @@
"NugetPackageDeletionWarningMessage": "Sunteţi sigur(ă) că doriţi să ştergeţi acest pachet de tip Nuget?", "NugetPackageDeletionWarningMessage": "Sunteţi sigur(ă) că doriţi să ştergeţi acest pachet de tip Nuget?",
"ModuleDeletionWarningMessage": "Sunteţi sigur(ă) că doriţi să ştergeţi acest modul?", "ModuleDeletionWarningMessage": "Sunteţi sigur(ă) că doriţi să ştergeţi acest modul?",
"Name": "Nume", "Name": "Nume",
"DisplayName": "Nume de afişare", "DisplayName": "Nume afişat",
"ShortDescription": "Descriere scurtă", "ShortDescription": "Descriere scurtă",
"NameFilter": "Nume", "NameFilter": "Nume",
"CreationTime": "Data şi ora creării", "CreationTime": "Data şi ora creării",
@ -317,7 +317,7 @@
"TrialLicenseStartDateFilter": "Data de început", "TrialLicenseStartDateFilter": "Data de început",
"TrialLicenseEndDateFilter": "Data de încheiere", "TrialLicenseEndDateFilter": "Data de încheiere",
"FirsName": "Nume", "FirsName": "Nume",
"LastName": "Nume", "LastName": "Nume de familie",
"StartDate": "Data de început", "StartDate": "Data de început",
"EndDate": "Data de încheiere", "EndDate": "Data de încheiere",
"PurchasedDate": "Data achiziției", "PurchasedDate": "Data achiziției",
@ -350,4 +350,4 @@
"Volo.AbpIo.Commercial:030010": "Pentru a achiziționa licența de probă, mai întâi trebuie să vă activați licența de probă!", "Volo.AbpIo.Commercial:030010": "Pentru a achiziționa licența de probă, mai întâi trebuie să vă activați licența de probă!",
"Volo.AbpIo.Commercial:030011": "Nu puteți șterge o licență de probă atunci când este achiziționată!" "Volo.AbpIo.Commercial:030011": "Nu puteți șterge o licență de probă atunci când este achiziționată!"
} }
} }

9
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json

@ -164,6 +164,13 @@
"Books": "Books", "Books": "Books",
"ABPDiscordServer": "ABP Discord Server", "ABPDiscordServer": "ABP Discord Server",
"ABPCommunityTalks": "ABP Community Talks", "ABPCommunityTalks": "ABP Community Talks",
"ABPCommunityPosts": "ABP Community Posts" "ABPCommunityPosts": "ABP Community Posts",
"BuyAndGetMonths": "BUY 12 MONTHS, <span class=\"text-info\">GET 14 MONTHS!</span>",
"GetYourDeal": "Get Your Deal",
"BuyOrRenewLicense": "Buy or Renew License Now and Get 2 Extra Months!",
"BuyOrRenewLicenseToGetExtra2Months": "Buy or Renew License Now and Get 2 Extra Months! HURRY UP! ⏰ Last Day: {0}",
"HurryUp": "HURRY UP!",
"LastDay": "Last Day: {0}",
"BuyNewLicenseBetweenDatesToGetBenefit": "Buy a new license between {0} and {1} to get benefit for extra 2 months!"
} }
} }

9
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json

@ -161,6 +161,13 @@
"Error_Page_500_Title": "好像出了什么问题!", "Error_Page_500_Title": "好像出了什么问题!",
"Error_Page_500_Description_1": "我们会自动跟踪这些错误,但如果问题仍然存在,请随时 <br /> 联系我们。 与此同时,尝试刷新。", "Error_Page_500_Description_1": "我们会自动跟踪这些错误,但如果问题仍然存在,请随时 <br /> 联系我们。 与此同时,尝试刷新。",
"Error_Page_500_Description_2": "通过 <a href=\"mailto:info@abp.io\" target=\"_blank\">info@abp.io</a> 与我们联系。", "Error_Page_500_Description_2": "通过 <a href=\"mailto:info@abp.io\" target=\"_blank\">info@abp.io</a> 与我们联系。",
"Books": "书籍" "Books": "书籍",
"BuyAndGetMonths": "购买 12 个月,<span class=\"text-info\">获得 14 个月!</span>",
"GetYourDeal": "得到你的交易",
"BuyOrRenewLicense": "立即购买或续订许可证并额外获得 2 个月!",
"BuyOrRenewLicenseToGetExtra2Months": "立即购买或续订 ABP 商业许可证(适用于所有版本)并额外获得 2 个月!",
"HurryUp": "赶快下单!",
"LastDay": "活动截止日期: {0}",
"BuyNewLicenseBetweenDatesToGetBenefit": "在 {0} 和 {1} 之间购买一个新的许可证以获得额外 2 个月的收益!"
} }
} }

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

@ -89,7 +89,7 @@
"Blogging": "التدوين", "Blogging": "التدوين",
"Identity": "هوية", "Identity": "هوية",
"IdentityServer": "خادم الهوية", "IdentityServer": "خادم الهوية",
"Saas": "ساس", "Saas": "البرمجيات كخدمة",
"LanguageManagement": "إدارة اللغة", "LanguageManagement": "إدارة اللغة",
"TextTemplateManagement": "إدارة قالب النص", "TextTemplateManagement": "إدارة قالب النص",
"See All Modules": "انظر جميع الوحدات", "See All Modules": "انظر جميع الوحدات",
@ -382,4 +382,4 @@
"RenewLicenseEarly": "إذا قمت بتجديد رخصتي في وقت مبكر ، هل سأحصل على السنة كاملة؟", "RenewLicenseEarly": "إذا قمت بتجديد رخصتي في وقت مبكر ، هل سأحصل على السنة كاملة؟",
"RenewLicenseEarylExplanation": "عند تجديد الترخيص الخاص بك قبل تاريخ انتهاء الترخيص الخاص بك ، ستتم إضافة سنة واحدة إلى تاريخ انتهاء الترخيص الخاص بك. على سبيل المثال ، إذا انتهت صلاحية ترخيصك في {0} -06-06 وقمت بتجديده في {0} -01-01 ، فسيكون تاريخ انتهاء صلاحية الترخيص الجديد {1} -06-06." "RenewLicenseEarylExplanation": "عند تجديد الترخيص الخاص بك قبل تاريخ انتهاء الترخيص الخاص بك ، ستتم إضافة سنة واحدة إلى تاريخ انتهاء الترخيص الخاص بك. على سبيل المثال ، إذا انتهت صلاحية ترخيصك في {0} -06-06 وقمت بتجديده في {0} -01-01 ، فسيكون تاريخ انتهاء صلاحية الترخيص الجديد {1} -06-06."
} }
} }

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

@ -735,6 +735,14 @@
"ConfirmedEmailAddressRequiredToStartTrial": "You should have a confirmed email address in order to start a trial license.", "ConfirmedEmailAddressRequiredToStartTrial": "You should have a confirmed email address in order to start a trial license.",
"EmailVerificationMailNotSent": "Email verification mail couldn't send.", "EmailVerificationMailNotSent": "Email verification mail couldn't send.",
"GetConfirmationEmail": "<a href=\"javascript:void(0);\" id=\"{0}\">Click here to get a confirmation email</a> if you haven't got it before.", "GetConfirmationEmail": "<a href=\"javascript:void(0);\" id=\"{0}\">Click here to get a confirmation email</a> if you haven't got it before.",
"WhichLicenseTypeYouAreInterestedIn": "Which license type you are interested in?" "WhichLicenseTypeYouAreInterestedIn": "Which license type you are interested in?",
"DontTakeOurWordForIt": "Don't take our word for it...",
"ReadAbpCommercialUsersWantYouToKnow": "Read what ABP Commercial users want you to know",
"Testimonial_ShortDescription_1": "The modularity of ABP made it possible for the team to deliver in time.",
"Testimonial_ShortDescription_2": "Build new features faster than before.",
"Testimonial_ShortDescription_3": "We start from out-of-the-box features and just focus on what we really need to write.",
"Testimonial_ShortDescription_4": "ABP Commercial was the best fit for our needs.",
"OnlineReviewersOnAbpCommercial": "Online Reviews on ABP Commercial",
"SeeWhatToldAboutAbpCommercial": "See what has been told about ABP Commercial and write your thoughts if you want."
} }
} }

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

@ -341,7 +341,7 @@
"SignIn": "Autentificare", "SignIn": "Autentificare",
"Or": "Sau", "Or": "Sau",
"TellUsAboutYourself": "Spuneţi-ne despre dumneavoastră", "TellUsAboutYourself": "Spuneţi-ne despre dumneavoastră",
"Surname": "Nume", "Surname": "Nume de familie",
"DoYouAgreePrivacyPolicy": "Sunt de acord cu <a href=\"/TermsConditions\">Termenii şi condiţiile<a/> şi <a href=\"/Privacy\">Politica de confidenţialitate</a>.", "DoYouAgreePrivacyPolicy": "Sunt de acord cu <a href=\"/TermsConditions\">Termenii şi condiţiile<a/> şi <a href=\"/Privacy\">Politica de confidenţialitate</a>.",
"VolosoftMarketingInformationMessage": "Sunt de acord să primesc informaţii, sfaturi şi oferte despre soluţii pentru afaceri şi organizaţii şi alte produse şi servicii Volosoft.", "VolosoftMarketingInformationMessage": "Sunt de acord să primesc informaţii, sfaturi şi oferte despre soluţii pentru afaceri şi organizaţii şi alte produse şi servicii Volosoft.",
"VolosoftSharingInformationMessage": "Sunt de acord ca Volosoft să partajeze informaţiile mele cu partenerii selectaţi astfel încât să primesc informaţii relevante despre produsele şi serviciile lor.", "VolosoftSharingInformationMessage": "Sunt de acord ca Volosoft să partajeze informaţiile mele cu partenerii selectaţi astfel încât să primesc informaţii relevante despre produsele şi serviciile lor.",
@ -380,4 +380,4 @@
"TrialLicenseExpiredInfo": "Perioada de licență de probă a expirat!", "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>."
} }
} }

3
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json

@ -184,6 +184,7 @@
"Post_Index_Page_MetaDescription": "ABP Community's purpose is to create a contribution environment for developers who use the ABP framework.", "Post_Index_Page_MetaDescription": "ABP Community's purpose is to create a contribution environment for developers who use the ABP framework.",
"Layout_Title": "{0} | ABP Community", "Layout_Title": "{0} | ABP Community",
"Layout_MetaDescription": "ABP Community is an environment where people can share posts about ABP framework and follows the projects.", "Layout_MetaDescription": "ABP Community is an environment where people can share posts about ABP framework and follows the projects.",
"Index_Page_CommunityIntroduction": "This is a hub for ABP Framework, .NET and software development. You can read the articles, watch the video tutorials, get informed about ABP’s development progress and ABP-related events, help other developers and share your expertise with the ABP community." "Index_Page_CommunityIntroduction": "This is a hub for ABP Framework, .NET and software development. You can read the articles, watch the video tutorials, get informed about ABP’s development progress and ABP-related events, help other developers and share your expertise with the ABP community.",
"TagsInArticle": "Tags in article"
} }
} }

5
abp_io/AbpIoLocalization/AbpIoLocalization/Www/AbpIoWwwResource.cs

@ -1,5 +1,8 @@
namespace AbpIoLocalization.Www using Volo.Abp.Localization;
namespace AbpIoLocalization.Www
{ {
[LocalizationResourceName("AbpIoWww")]
public class AbpIoWwwResource public class AbpIoWwwResource
{ {

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

@ -372,6 +372,20 @@
"MasteringAbpFramework_Book_What_You_Will_Learn_8": "Write unit, integration, and UI tests using ABP Framework.", "MasteringAbpFramework_Book_What_You_Will_Learn_8": "Write unit, integration, and UI tests using ABP Framework.",
"MasteringAbpFramework_Book_WhoIsThisBookFor": "Who's this book for", "MasteringAbpFramework_Book_WhoIsThisBookFor": "Who's this book for",
"MasteringAbpFramework_Book_WhoIsThisBookFor_Description": "This book is for web developers who want to learn software architectures and best practices for building\n maintainable web-based solutions using Microsoft technologies and ABP Framework. Basic knowledge of C#\n and ASP.NET Core is necessary to get started with this book.", "MasteringAbpFramework_Book_WhoIsThisBookFor_Description": "This book is for web developers who want to learn software architectures and best practices for building\n maintainable web-based solutions using Microsoft technologies and ABP Framework. Basic knowledge of C#\n and ASP.NET Core is necessary to get started with this book.",
"ComputersAndTechnology": "Computers & Technology" "ComputersAndTechnology": "Computers & Technology",
"BuildingMicroserviceSolutions": "Building Microservice Solutions",
"MicroserviceBookPracticalGuide": "This book is a reference guide for developing and managing microservice-based applications using the ABP Framework. It references the <strong>.NET Microservice Sample Reference Application</strong>: eShopOnContainers and discusses the architectural design and implementation approaches using the ABP Framework. By the end of this book, you'll learn how ABP approaches the common microservice complexities such as authorization, distributed transactions, inter-microservice communications, deployment, etc.",
"IntroducingTheSolution": "Introducing the eShopOnAbp Solution",
"RunningTheSolution": "Running the Solution",
"UnderstandingTheAuthenticationSystem": "Understanding the Authentication System",
"Authors": "Authors",
"MicroserviceEBook": "Microservice E-Book",
"SelectUITheme": "Select UI Theme",
"LeptonXLiteTheme": "LeptonX Lite Theme",
"BasicTheme": "Basic Theme",
"LeptonXLiteThemeInfo": " A modern and stylish Bootstrap UI theme. Ideal if you want to have a production ready UI theme. This is the newest theme and is the default.",
"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>"
} }
} }

6
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/ro-RO.json

@ -253,18 +253,18 @@
"Or": "Sau", "Or": "Sau",
"TellUsAboutYourself": "Spuneţi-ne un pic despre dumneavoastră", "TellUsAboutYourself": "Spuneţi-ne un pic despre dumneavoastră",
"Name": "Nume", "Name": "Nume",
"Surname": "Nume", "Surname": "Nume de familie",
"CompanyName": "Nume companie", "CompanyName": "Nume companie",
"DoYouAgreePrivacyPolicy": "Sunt de acord cu <a href=\"https://account.abp.io/Account/TermsConditions\">Termenii & condiţiile</a> şi <a href=\"https://account.abp.io/Account/Privacy\">Politica de confidenţialitate</a>.", "DoYouAgreePrivacyPolicy": "Sunt de acord cu <a href=\"https://account.abp.io/Account/TermsConditions\">Termenii & condiţiile</a> şi <a href=\"https://account.abp.io/Account/Privacy\">Politica de confidenţialitate</a>.",
"Free": "Gratuit", "Free": "Gratuit",
"DDDEBook": "E-book DDD", "DDDEBook": "E-book DDD",
"PracticalGuideForImplementingDDD": "Această carte este un ghid practic pentru implementarea Domain Driven Design în framework-ul ABP.", "PracticalGuideForImplementingDDD": "Această carte este un ghid practic pentru implementarea Domain Driven Design în framework-ul ABP.",
"IntroducingDDD": "Introducere în Domain Driven Design", "IntroducingDDD": "Introducere în Domain Driven Design",
"DDDLayersAndCleanArchitecture": "Straturile DDD & Arhitectură curată", "DDDLayersAndCleanArchitecture": "Straturile DDD şi Arhitectură curată",
"LayeringOfADotnetSolution": "Stratificarea unei soluţii .NET", "LayeringOfADotnetSolution": "Stratificarea unei soluţii .NET",
"ImplementingDDDBuildingBlocks": "Implementând DDD Building Blocks", "ImplementingDDDBuildingBlocks": "Implementând DDD Building Blocks",
"DomainVsApplicationLogic": "Domain Logic vs Application Logic", "DomainVsApplicationLogic": "Domain Logic vs Application Logic",
"SamplesAndDiscussions": "Exemple & Discuţii", "SamplesAndDiscussions": "Exemple şi Discuţii",
"EmailNotValid": "Vă rugăm să introduceţi o adresa de email validă.", "EmailNotValid": "Vă rugăm să introduceţi o adresa de email validă.",
"WeWillSendYouADownloadLink": "Un link care conţine e-book-ul a fost trimis către {0}. Verificaţi-vă folderele de inbox, junk sau spam!", "WeWillSendYouADownloadLink": "Un link care conţine e-book-ul a fost trimis către {0}. Verificaţi-vă folderele de inbox, junk sau spam!",
"GoHome": "Pagina principală", "GoHome": "Pagina principală",

2
common.props

@ -1,7 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Version>6.0.0-rc.1</Version> <Version>7.0.0</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn> <NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl> <PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl>
<PackageProjectUrl>https://abp.io/</PackageProjectUrl> <PackageProjectUrl>https://abp.io/</PackageProjectUrl>

12
docs/en/Background-Jobs-RabbitMq.md

@ -126,25 +126,31 @@ By default, all the job types use the `Default` RabbitMQ connection.
Configure<AbpRabbitMqBackgroundJobOptions>(options => Configure<AbpRabbitMqBackgroundJobOptions>(options =>
{ {
options.DefaultQueueNamePrefix = "my_app_jobs."; options.DefaultQueueNamePrefix = "my_app_jobs.";
options.DefaultDelayedQueueNamePrefix = "my_app_jobs.delayed"
options.PrefetchCount = 1;
options.JobQueues[typeof(EmailSendingArgs)] = options.JobQueues[typeof(EmailSendingArgs)] =
new JobQueueConfiguration( new JobQueueConfiguration(
typeof(EmailSendingArgs), typeof(EmailSendingArgs),
queueName: "my_app_jobs.emails", queueName: "my_app_jobs.emails",
connectionName: "SecondConnection" connectionName: "SecondConnection",
delayedQueueName:"my_app_jobs.emails.delayed"
); );
}); });
```` ````
* This example sets the default queue name prefix to `my_app_jobs.`. If different applications use the same RabbitMQ server, it would be important to use different prefixes for each application to not consume jobs of each other. * This example sets the default queue name prefix to `my_app_jobs.` and default delayed queue name prefix to `my_app_jobs.delayed`. If different applications use the same RabbitMQ server, it would be important to use different prefixes for each application to not consume jobs of each other.
* Sets `PrefetchCount` for all queues.
* Also specifies a different connection string for the `EmailSendingArgs`. * Also specifies a different connection string for the `EmailSendingArgs`.
`JobQueueConfiguration` class has some additional options in its constructor; `JobQueueConfiguration` class has some additional options in its constructor;
* `queueName`: The queue name that is used for this job. The prefix is not added, so you need to specify the full name of the queue. * `queueName`: The queue name that is used for this job. The prefix is not added, so you need to specify the full name of the queue.
* `DelayedQueueName`: The delayed queue name that is used for delayed execution of job. The prefix is not added, so you need to specify the full name of the queue.
* `connectionName`: The RabbitMQ connection name (see the connection configuration above). This is optional and the default value is `Default`. * `connectionName`: The RabbitMQ connection name (see the connection configuration above). This is optional and the default value is `Default`.
* `durable` (optional, default: `true`). * `durable` (optional, default: `true`).
* `exclusive` (optional, default: `false`). * `exclusive` (optional, default: `false`).
* `autoDelete` (optional, default: `false`) * `autoDelete` (optional, default: `false`).
* `PrefetchCount` (optional, default: null)
See the RabbitMQ documentation if you want to understand the `durable`, `exclusive` and `autoDelete` options better, while most of the times the default configuration is what you want. See the RabbitMQ documentation if you want to understand the `durable`, `exclusive` and `autoDelete` options better, while most of the times the default configuration is what you want.

3
docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md

@ -141,13 +141,14 @@ Configure<AbpRabbitMqOptions>(options =>
}); });
```` ````
**Example: Configure the client and exchange names** **Example: Configure the client, exchange names and prefetchCount**
````csharp ````csharp
Configure<AbpRabbitMqEventBusOptions>(options => Configure<AbpRabbitMqEventBusOptions>(options =>
{ {
options.ClientName = "TestApp1"; options.ClientName = "TestApp1";
options.ExchangeName = "TestMessages"; options.ExchangeName = "TestMessages";
options.PrefetchCount = 1;
}); });
```` ````

0
docs/en/Themes/LeptonXLite/angular.md → docs/en/Themes/LeptonXLite/Angular.md

0
docs/en/Themes/LeptonXLite/blazor.md → docs/en/Themes/LeptonXLite/Blazor.md

140
docs/es/Getting-Started-AspNetCore-Application.md

@ -0,0 +1,140 @@
# Empezando con ABP y una Aplicacion AspNet Core MVC Web
Este tutorial explica como empezar una aplicacion ABP desde cero usando las dependencias minimas. Uno generalmente desea
empezar con la **[plantilla de inicio](Getting-Started-AspNetCore-MVC-Template.md)**.
## Crea un Proyecto Nuevo
1. Crea una Aplicacion Web AspNet Core nueva usando Visual Studio 2022 (17.0.0+):
![](images/create-new-aspnet-core-application-v2.png)
2. Configura el nuevo proyecto:
![](images/select-empty-web-application-v2.png)
3. Presione el boton Create:
![create-aspnet-core-application](images/create-aspnet-core-application.png)
## Instale el paquete Volo.Abp.AspNetCore.Mvc
Volo.Abp.AspNetCore.Mvc es el paquete de integracion con AspNet Core MVC para ABP. Siendo asi, instalalo en su proyecto:
````
Install-Package Volo.Abp.AspNetCore.Mvc
````
## Crea el primer modulo ABP
ABP es un marco de referencia modular y require una clase de **inicio (raíz) tipo modulo** derivada de ``AbpModule``:
````C#
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity;
namespace BasicAspNetCoreApplication
{
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
public class AppModule : AbpModule
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
// Configura la canalización de peticiones HTTP.
if (env.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// El valor por defecto de HSTS es 30 dias. Debes cambiar esto en ambientes productivos. Referencia https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseConfiguredEndpoints();
}
}
}
````
``AppModule`` es un buen nombre para el modulo de inicio de una aplicacion.
Los paquetes de ABP definen clases de tipo modulo y cada modulo puede depender de otro.
En el codigo anterior, el ``AppModule`` depende de el modulo ``AbpAspNetCoreMvcModule`` (definido por el paquete [Volo.Abp.AspNetCore.Mvc](https://www.nuget.org/packages/Volo.Abp.AspNetCore.Mvc)). Es comun agregar el atributo ``DependsOn`` despues de instalar un paquete ABP nuevo.
En vez de la clase de inicion Startup, estamos configurando una canalizacion de ASP.NET Core en este modulo.
## La clase Program
El proximo paso es modificar la clase Program para integrate el sistema de modulos ABP:
````C#
using BasicAspNetCoreApplication;
var builder = WebApplication.CreateBuilder(args);
await builder.Services.AddApplicationAsync<AppModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
````
``builder.Services.AddApplicationAsync<AppModule>();`` Agrega todos los servicios definidos en todos los modulos empezando desde ``AppModule``.
``app.InitializeApplicationAsync()`` inicializa y empieza la aplicacion.
## Ejecutar la Aplicación
Es todo! Ejecuta la aplicación, debe funcionar como esperado.
## Uso de Autofac como Marco de Inyección de Dependencia
Mientras el sistema de Inyección de Dependencia de ASP.NET Core es suficiente para requerimientos basico, [Autofac](https://autofac.org/) proporciona características avanzadas como Inyección de Propiedades e Intercepcion de Metodos, los cuales son necesarios para que ABP pueda llevar a cabo funciones avanzadas.
El acto de remplazar el sistema DI de ASP.NET Core por Autofac e integrarlo con ABP es facil.
1. Instala el paquete [Volo.Abp.Autofac](https://www.nuget.org/packages/Volo.Abp.Autofac)
````
Install-Package Volo.Abp.Autofac
````
2. Agrega la dependencia sobre el modulo ``AbpAutofacModule``
````C#
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
[DependsOn(typeof(AbpAutofacModule))] //Agrega la dependencia sobre el modulo ABP Autofac
public class AppModule : AbpModule
{
...
}
````
3. Actualiza `Program.cs` para que use Autofac:
````C#
using BasicAspNetCoreApplication;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseAutofac(); //Agrega esta linea
await builder.Services.AddApplicationAsync<AppModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
````
## Codigo fuente
Obten el codigo fuente del ejemplo creado en este tutorial de [aqui](https://github.com/abpframework/abp-samples/tree/master/BasicAspNetCoreApplication).

BIN
docs/es/images/create-aspnet-core-application.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/es/images/create-new-aspnet-core-application-v2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

BIN
docs/es/images/select-empty-web-application-v2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

10
docs/zh-Hans/Background-Jobs-RabbitMq.md

@ -126,25 +126,31 @@ Configure<AbpRabbitMqOptions>(options =>
Configure<AbpRabbitMqBackgroundJobOptions>(options => Configure<AbpRabbitMqBackgroundJobOptions>(options =>
{ {
options.DefaultQueueNamePrefix = "my_app_jobs."; options.DefaultQueueNamePrefix = "my_app_jobs.";
options.DefaultDelayedQueueNamePrefix = "my_app_jobs.delayed"
options.PrefetchCount = 1;
options.JobQueues[typeof(EmailSendingArgs)] = options.JobQueues[typeof(EmailSendingArgs)] =
new JobQueueConfiguration( new JobQueueConfiguration(
typeof(EmailSendingArgs), typeof(EmailSendingArgs),
queueName: "my_app_jobs.emails", queueName: "my_app_jobs.emails",
connectionName: "SecondConnection" connectionName: "SecondConnection",
delayedQueueName:"my_app_jobs.emails.delayed"
); );
}); });
``` ```
- 这个示例将默认的队列名前缀设置为 `my_app_jobs.`,如果多个项目都使用的同一个 RabbitMQ 服务,设置不同的前缀可以避免执行其他项目的后台作业. - 这个示例将默认的队列名前缀设置为 `my_app_jobs.`并且设置默认的延迟队列名为 `my_app_jobs.delayed`,如果多个项目都使用的同一个 RabbitMQ 服务,设置不同的前缀可以避免执行其他项目的后台作业.
- 设置了预取数量, 用于所有队列.
- 这里还设置了 `EmailSendingArgs` 绑定的 RabbitMQ 连接. - 这里还设置了 `EmailSendingArgs` 绑定的 RabbitMQ 连接.
`JobQueueConfiguration` 类的构造函数中,还有一些其他的可选参数. `JobQueueConfiguration` 类的构造函数中,还有一些其他的可选参数.
- `queueName`: 指定后台作业对应的队列名称(全名). - `queueName`: 指定后台作业对应的队列名称(全名).
* `DelayedQueueName`: 指定后台延迟执行的作业对于的队列名称(全名).
- `connectionName`: 后台作业对应的 RabbitMQ 连接名称,默认是 `Default`. - `connectionName`: 后台作业对应的 RabbitMQ 连接名称,默认是 `Default`.
- `durable`: 可选参数,默认为 `true`. - `durable`: 可选参数,默认为 `true`.
- `exclusive`: 可选参数,默认为 `false`. - `exclusive`: 可选参数,默认为 `false`.
- `autoDelete`: 可选参数,默认为 `false`. - `autoDelete`: 可选参数,默认为 `false`.
* `PrefetchCount` (可选参数, 默认为: null)
如果你想要更多地了解 `durable`,`exclusive`,`autoDelete` 的用法,请阅读 RabbitMQ 提供的文档. 如果你想要更多地了解 `durable`,`exclusive`,`autoDelete` 的用法,请阅读 RabbitMQ 提供的文档.

3
docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md

@ -141,13 +141,14 @@ Configure<AbpRabbitMqOptions>(options =>
}); });
```` ````
**示例: 配置客户端和交换机名称** **示例: 配置客户端,交换机名称和预取数量**
````csharp ````csharp
Configure<AbpRabbitMqEventBusOptions>(options => Configure<AbpRabbitMqEventBusOptions>(options =>
{ {
options.ClientName = "TestApp1"; options.ClientName = "TestApp1";
options.ExchangeName = "TestMessages"; options.ExchangeName = "TestMessages";
options.PrefetchCount = 1;
}); });
```` ````

5
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/PageToolbars/PageToolbarManager.cs

@ -3,16 +3,17 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars;
public class PageToolbarManager : IPageToolbarManager, ITransientDependency public class PageToolbarManager : IPageToolbarManager, ITransientDependency
{ {
protected IHybridServiceScopeFactory ServiceScopeFactory { get; } protected IServiceScopeFactory ServiceScopeFactory { get; }
public PageToolbarManager( public PageToolbarManager(
IHybridServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
{ {
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;
} }

5
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/PageToolbars/PageToolbarManager.cs

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -10,11 +11,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.PageToolbars;
public class PageToolbarManager : IPageToolbarManager, ITransientDependency public class PageToolbarManager : IPageToolbarManager, ITransientDependency
{ {
protected AbpPageToolbarOptions Options { get; } protected AbpPageToolbarOptions Options { get; }
protected IHybridServiceScopeFactory ServiceScopeFactory { get; } protected IServiceScopeFactory ServiceScopeFactory { get; }
public PageToolbarManager( public PageToolbarManager(
IOptions<AbpPageToolbarOptions> options, IOptions<AbpPageToolbarOptions> options,
IHybridServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
{ {
Options = options.Value; Options = options.Value;
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;

52
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/DependencyInjection/HttpContextServiceScopeFactory.cs

@ -1,52 +0,0 @@
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.DependencyInjection;
[ExposeServices(
typeof(IHybridServiceScopeFactory),
typeof(HttpContextServiceScopeFactory)
)]
[Dependency(ReplaceServices = true)]
public class HttpContextServiceScopeFactory : IHybridServiceScopeFactory, ITransientDependency
{
protected IHttpContextAccessor HttpContextAccessor { get; }
protected IServiceScopeFactory ServiceScopeFactory { get; }
public HttpContextServiceScopeFactory(
IHttpContextAccessor httpContextAccessor,
IServiceScopeFactory serviceScopeFactory)
{
HttpContextAccessor = httpContextAccessor;
ServiceScopeFactory = serviceScopeFactory;
}
public virtual IServiceScope CreateScope()
{
var httpContext = HttpContextAccessor.HttpContext;
if (httpContext == null)
{
return ServiceScopeFactory.CreateScope();
}
return new NonDisposedHttpContextServiceScope(httpContext.RequestServices);
}
protected class NonDisposedHttpContextServiceScope : IServiceScope
{
public IServiceProvider ServiceProvider { get; }
public NonDisposedHttpContextServiceScope(IServiceProvider serviceProvider)
{
ServiceProvider = serviceProvider;
}
public void Dispose()
{
}
}
}

4
framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IDeletionAuditedObject.cs

@ -10,7 +10,7 @@ public interface IDeletionAuditedObject : IHasDeletionTime
/// <summary> /// <summary>
/// Id of the deleter user. /// Id of the deleter user.
/// </summary> /// </summary>
Guid? DeleterId { get; set; } Guid? DeleterId { get; }
} }
/// <summary> /// <summary>
@ -22,5 +22,5 @@ public interface IDeletionAuditedObject<TUser> : IDeletionAuditedObject
/// <summary> /// <summary>
/// Reference to the deleter user. /// Reference to the deleter user.
/// </summary> /// </summary>
TUser Deleter { get; set; } TUser Deleter { get; }
} }

2
framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IHasDeletionTime.cs

@ -11,5 +11,5 @@ public interface IHasDeletionTime : ISoftDelete
/// <summary> /// <summary>
/// Deletion time. /// Deletion time.
/// </summary> /// </summary>
DateTime? DeletionTime { get; set; } DateTime? DeletionTime { get; }
} }

2
framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IHasModificationTime.cs

@ -10,5 +10,5 @@ public interface IHasModificationTime
/// <summary> /// <summary>
/// The last modified time for this entity. /// The last modified time for this entity.
/// </summary> /// </summary>
DateTime? LastModificationTime { get; set; } DateTime? LastModificationTime { get; }
} }

4
framework/src/Volo.Abp.Auditing.Contracts/Volo/Abp/Auditing/IModificationAuditedObject.cs

@ -10,7 +10,7 @@ public interface IModificationAuditedObject : IHasModificationTime
/// <summary> /// <summary>
/// Last modifier user for this entity. /// Last modifier user for this entity.
/// </summary> /// </summary>
Guid? LastModifierId { get; set; } Guid? LastModifierId { get; }
} }
/// <summary> /// <summary>
@ -22,5 +22,5 @@ public interface IModificationAuditedObject<TUser> : IModificationAuditedObject
/// <summary> /// <summary>
/// Reference to the last modifier user of this entity. /// Reference to the last modifier user of this entity.
/// </summary> /// </summary>
TUser LastModifier { get; set; } TUser LastModifier { get; }
} }

16
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditPropertySetter.cs

@ -99,7 +99,7 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
{ {
if (targetObject is IHasModificationTime objectWithModificationTime) if (targetObject is IHasModificationTime objectWithModificationTime)
{ {
objectWithModificationTime.LastModificationTime = Clock.Now; ObjectHelper.TrySetProperty(objectWithModificationTime, x => x.LastModificationTime, () => Clock.Now);
} }
} }
@ -112,7 +112,7 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
if (!CurrentUser.Id.HasValue) if (!CurrentUser.Id.HasValue)
{ {
modificationAuditedObject.LastModifierId = null; ObjectHelper.TrySetProperty(modificationAuditedObject, x => x.LastModifierId, () => null);
return; return;
} }
@ -120,7 +120,7 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
{ {
if (multiTenantEntity.TenantId != CurrentUser.TenantId) if (multiTenantEntity.TenantId != CurrentUser.TenantId)
{ {
modificationAuditedObject.LastModifierId = null; ObjectHelper.TrySetProperty(modificationAuditedObject, x => x.LastModifierId, () => null);
return; return;
} }
} }
@ -134,7 +134,7 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
} }
*/ */
modificationAuditedObject.LastModifierId = CurrentUser.Id; ObjectHelper.TrySetProperty(modificationAuditedObject, x => x.LastModifierId, () => CurrentUser.Id);
} }
protected virtual void SetDeletionTime(object targetObject) protected virtual void SetDeletionTime(object targetObject)
@ -143,7 +143,7 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
{ {
if (objectWithDeletionTime.DeletionTime == null) if (objectWithDeletionTime.DeletionTime == null)
{ {
objectWithDeletionTime.DeletionTime = Clock.Now; ObjectHelper.TrySetProperty(objectWithDeletionTime, x => x.DeletionTime, () => Clock.Now);
} }
} }
} }
@ -162,7 +162,7 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
if (!CurrentUser.Id.HasValue) if (!CurrentUser.Id.HasValue)
{ {
deletionAuditedObject.DeleterId = null; ObjectHelper.TrySetProperty(deletionAuditedObject, x => x.DeleterId, () => null);
return; return;
} }
@ -170,11 +170,11 @@ public class AuditPropertySetter : IAuditPropertySetter, ITransientDependency
{ {
if (multiTenantEntity.TenantId != CurrentUser.TenantId) if (multiTenantEntity.TenantId != CurrentUser.TenantId)
{ {
deletionAuditedObject.DeleterId = null; ObjectHelper.TrySetProperty(deletionAuditedObject, x => x.DeleterId, () => null);
return; return;
} }
} }
deletionAuditedObject.DeleterId = CurrentUser.Id; ObjectHelper.TrySetProperty(deletionAuditedObject, x => x.DeleterId, () => CurrentUser.Id);
} }
} }

2
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs

@ -19,6 +19,8 @@ public class AbpRabbitMqBackgroundJobOptions
/// Default value: "AbpBackgroundJobsDelayed." /// Default value: "AbpBackgroundJobsDelayed."
/// </summary> /// </summary>
public string DefaultDelayedQueueNamePrefix { get; set; } public string DefaultDelayedQueueNamePrefix { get; set; }
public ushort? PrefetchCount { get; set; }
public AbpRabbitMqBackgroundJobOptions() public AbpRabbitMqBackgroundJobOptions()
{ {

10
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs

@ -66,7 +66,8 @@ public class JobQueue<TArgs> : IJobQueue<TArgs>
new JobQueueConfiguration( new JobQueueConfiguration(
typeof(TArgs), typeof(TArgs),
AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName, AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName,
AbpRabbitMqBackgroundJobOptions.DefaultDelayedQueueNamePrefix + JobConfiguration.JobName AbpRabbitMqBackgroundJobOptions.DefaultDelayedQueueNamePrefix + JobConfiguration.JobName,
prefetchCount: AbpRabbitMqBackgroundJobOptions.PrefetchCount
); );
} }
@ -140,9 +141,14 @@ public class JobQueue<TArgs> : IJobQueue<TArgs>
if (AbpBackgroundJobOptions.IsJobExecutionEnabled) if (AbpBackgroundJobOptions.IsJobExecutionEnabled)
{ {
if (QueueConfiguration.PrefetchCount.HasValue)
{
ChannelAccessor.Channel.BasicQos(0, QueueConfiguration.PrefetchCount.Value, false);
}
Consumer = new AsyncEventingBasicConsumer(ChannelAccessor.Channel); Consumer = new AsyncEventingBasicConsumer(ChannelAccessor.Channel);
Consumer.Received += MessageReceived; Consumer.Received += MessageReceived;
//TODO: What BasicConsume returns? //TODO: What BasicConsume returns?
ChannelAccessor.Channel.BasicConsume( ChannelAccessor.Channel.BasicConsume(
queue: QueueConfiguration.QueueName, queue: QueueConfiguration.QueueName,

6
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs

@ -20,12 +20,14 @@ public class JobQueueConfiguration : QueueDeclareConfiguration
string connectionName = null, string connectionName = null,
bool durable = true, bool durable = true,
bool exclusive = false, bool exclusive = false,
bool autoDelete = false) bool autoDelete = false,
ushort? prefetchCount = null)
: base( : base(
queueName, queueName,
durable, durable,
exclusive, exclusive,
autoDelete) autoDelete,
prefetchCount)
{ {
JobArgsType = jobArgsType; JobArgsType = jobArgsType;
ConnectionName = connectionName; ConnectionName = connectionName;

3
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs

@ -1,4 +1,5 @@
using System.Text; using System.Text;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Volo.Abp.Cli.ServiceProxying; using Volo.Abp.Cli.ServiceProxying;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -13,7 +14,7 @@ public class GenerateProxyCommand : ProxyCommandBase<GenerateProxyCommand>
public GenerateProxyCommand( public GenerateProxyCommand(
IOptions<AbpCliServiceProxyOptions> serviceProxyOptions, IOptions<AbpCliServiceProxyOptions> serviceProxyOptions,
IHybridServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
: base(serviceProxyOptions, serviceScopeFactory) : base(serviceProxyOptions, serviceScopeFactory)
{ {
} }

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

@ -2,6 +2,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -19,11 +20,11 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc
protected AbpCliServiceProxyOptions ServiceProxyOptions { get; } protected AbpCliServiceProxyOptions ServiceProxyOptions { get; }
protected IHybridServiceScopeFactory ServiceScopeFactory { get; } protected IServiceScopeFactory ServiceScopeFactory { get; }
public ProxyCommandBase( public ProxyCommandBase(
IOptions<AbpCliServiceProxyOptions> serviceProxyOptions, IOptions<AbpCliServiceProxyOptions> serviceProxyOptions,
IHybridServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
{ {
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;
ServiceProxyOptions = serviceProxyOptions.Value; ServiceProxyOptions = serviceProxyOptions.Value;

3
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs

@ -1,4 +1,5 @@
using System.Text; using System.Text;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Volo.Abp.Cli.ServiceProxying; using Volo.Abp.Cli.ServiceProxying;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -13,7 +14,7 @@ public class RemoveProxyCommand : ProxyCommandBase<RemoveProxyCommand>
public RemoveProxyCommand( public RemoveProxyCommand(
IOptions<AbpCliServiceProxyOptions> serviceProxyOptions, IOptions<AbpCliServiceProxyOptions> serviceProxyOptions,
IHybridServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
: base(serviceProxyOptions, serviceScopeFactory) : base(serviceProxyOptions, serviceScopeFactory)
{ {
} }

22
framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultServiceScopeFactory.cs

@ -1,22 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
namespace Volo.Abp.DependencyInjection;
[ExposeServices(
typeof(IHybridServiceScopeFactory),
typeof(DefaultServiceScopeFactory)
)]
public class DefaultServiceScopeFactory : IHybridServiceScopeFactory, ITransientDependency
{
protected IServiceScopeFactory Factory { get; }
public DefaultServiceScopeFactory(IServiceScopeFactory factory)
{
Factory = factory;
}
public IServiceScope CreateScope()
{
return Factory.CreateScope();
}
}

8
framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IHybridServiceScopeFactory.cs

@ -1,8 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
namespace Volo.Abp.DependencyInjection;
public interface IHybridServiceScopeFactory : IServiceScopeFactory
{
}

4
framework/src/Volo.Abp.Core/Volo/Abp/ISoftDelete.cs

@ -9,7 +9,7 @@
public interface ISoftDelete public interface ISoftDelete
{ {
/// <summary> /// <summary>
/// Used to mark an Entity as 'Deleted'. /// Used to mark an Entity as 'Deleted'.
/// </summary> /// </summary>
bool IsDeleted { get; set; } bool IsDeleted { get; }
} }

36
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs

@ -42,18 +42,6 @@ public class EntityChangeEventHelper : IEntityChangeEventHelper, ITransientDepen
Logger = NullLogger<EntityChangeEventHelper>.Instance; Logger = NullLogger<EntityChangeEventHelper>.Instance;
} }
public virtual void PublishEntityCreatingEvent(object entity)
{
TriggerEventWithEntity(
LocalEventBus,
#pragma warning disable 618
typeof(EntityCreatingEventData<>),
#pragma warning restore 618
entity,
entity
);
}
public virtual void PublishEntityCreatedEvent(object entity) public virtual void PublishEntityCreatedEvent(object entity)
{ {
TriggerEventWithEntity( TriggerEventWithEntity(
@ -89,18 +77,6 @@ public class EntityChangeEventHelper : IEntityChangeEventHelper, ITransientDepen
); );
} }
public virtual void PublishEntityUpdatingEvent(object entity)
{
TriggerEventWithEntity(
LocalEventBus,
#pragma warning disable 618
typeof(EntityUpdatingEventData<>),
#pragma warning restore 618
entity,
entity
);
}
public virtual void PublishEntityUpdatedEvent(object entity) public virtual void PublishEntityUpdatedEvent(object entity)
{ {
TriggerEventWithEntity( TriggerEventWithEntity(
@ -125,18 +101,6 @@ public class EntityChangeEventHelper : IEntityChangeEventHelper, ITransientDepen
} }
} }
public virtual void PublishEntityDeletingEvent(object entity)
{
TriggerEventWithEntity(
LocalEventBus,
#pragma warning disable 618
typeof(EntityDeletingEventData<>),
#pragma warning restore 618
entity,
entity
);
}
public virtual void PublishEntityDeletedEvent(object entity) public virtual void PublishEntityDeletedEvent(object entity)
{ {
TriggerEventWithEntity( TriggerEventWithEntity(

23
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs

@ -1,23 +0,0 @@
using System;
namespace Volo.Abp.Domain.Entities.Events;
/// <summary>
/// Used to pass data for an event when an entity (<see cref="IEntity"/>) is being changed (creating, updating or deleting).
/// See <see cref="EntityCreatingEventData{TEntity}"/>, <see cref="EntityDeletingEventData{TEntity}"/> and <see cref="EntityUpdatingEventData{TEntity}"/> classes.
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityChangedEventData. Please use EntityChangedEventData instead.")]
public class EntityChangingEventData<TEntity> : EntityEventData<TEntity>
{
/// <summary>
/// Constructor.
/// </summary>
/// <param name="entity">Changing entity in this event</param>
public EntityChangingEventData(TEntity entity)
: base(entity)
{
}
}

22
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs

@ -1,22 +0,0 @@
using System;
namespace Volo.Abp.Domain.Entities.Events;
/// <summary>
/// This type of event is used to notify just before creation of an Entity.
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityCreatedEventData. Please use EntityCreatedEventData instead.")]
public class EntityCreatingEventData<TEntity> : EntityChangingEventData<TEntity>
{
/// <summary>
/// Constructor.
/// </summary>
/// <param name="entity">The entity which is being created</param>
public EntityCreatingEventData(TEntity entity)
: base(entity)
{
}
}

22
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs

@ -1,22 +0,0 @@
using System;
namespace Volo.Abp.Domain.Entities.Events;
/// <summary>
/// This type of event is used to notify just before deletion of an Entity.
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityDeletedEventData. Please use EntityDeletedEventData instead.")]
public class EntityDeletingEventData<TEntity> : EntityChangingEventData<TEntity>
{
/// <summary>
/// Constructor.
/// </summary>
/// <param name="entity">The entity which is being deleted</param>
public EntityDeletingEventData(TEntity entity)
: base(entity)
{
}
}

22
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs

@ -1,22 +0,0 @@
using System;
namespace Volo.Abp.Domain.Entities.Events;
/// <summary>
/// This type of event is used to notify just before update of an Entity.
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityUpdatedEventData. Please use EntityUpdatedEventData instead.")]
public class EntityUpdatingEventData<TEntity> : EntityChangingEventData<TEntity>
{
/// <summary>
/// Constructor.
/// </summary>
/// <param name="entity">The entity which is being updated</param>
public EntityUpdatingEventData(TEntity entity)
: base(entity)
{
}
}

3
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/IEntityChangeEventHelper.cs

@ -5,12 +5,9 @@ namespace Volo.Abp.Domain.Entities.Events;
/// </summary> /// </summary>
public interface IEntityChangeEventHelper public interface IEntityChangeEventHelper
{ {
void PublishEntityCreatingEvent(object entity);
void PublishEntityCreatedEvent(object entity); void PublishEntityCreatedEvent(object entity);
void PublishEntityUpdatingEvent(object entity);
void PublishEntityUpdatedEvent(object entity); void PublishEntityUpdatedEvent(object entity);
void PublishEntityDeletingEvent(object entity);
void PublishEntityDeletedEvent(object entity); void PublishEntityDeletedEvent(object entity);
} }

12
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/NullEntityChangeEventHelper.cs

@ -14,26 +14,14 @@ public class NullEntityChangeEventHelper : IEntityChangeEventHelper
{ {
} }
public void PublishEntityCreatingEvent(object entity)
{
}
public void PublishEntityCreatedEvent(object entity) public void PublishEntityCreatedEvent(object entity)
{ {
} }
public void PublishEntityUpdatingEvent(object entity)
{
}
public void PublishEntityUpdatedEvent(object entity) public void PublishEntityUpdatedEvent(object entity)
{ {
} }
public void PublishEntityDeletingEvent(object entity)
{
}
public void PublishEntityDeletedEvent(object entity) public void PublishEntityDeletedEvent(object entity)
{ {
} }

6
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -292,7 +292,6 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext,
{ {
case EntityState.Added: case EntityState.Added:
ApplyAbpConceptsForAddedEntity(entry); ApplyAbpConceptsForAddedEntity(entry);
EntityChangeEventHelper.PublishEntityCreatingEvent(entry.Entity);
EntityChangeEventHelper.PublishEntityCreatedEvent(entry.Entity); EntityChangeEventHelper.PublishEntityCreatedEvent(entry.Entity);
break; break;
case EntityState.Modified: case EntityState.Modified:
@ -301,12 +300,10 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext,
{ {
if (entry.Entity is ISoftDelete && entry.Entity.As<ISoftDelete>().IsDeleted) if (entry.Entity is ISoftDelete && entry.Entity.As<ISoftDelete>().IsDeleted)
{ {
EntityChangeEventHelper.PublishEntityDeletingEvent(entry.Entity);
EntityChangeEventHelper.PublishEntityDeletedEvent(entry.Entity); EntityChangeEventHelper.PublishEntityDeletedEvent(entry.Entity);
} }
else else
{ {
EntityChangeEventHelper.PublishEntityUpdatingEvent(entry.Entity);
EntityChangeEventHelper.PublishEntityUpdatedEvent(entry.Entity); EntityChangeEventHelper.PublishEntityUpdatedEvent(entry.Entity);
} }
} }
@ -314,7 +311,6 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext,
break; break;
case EntityState.Deleted: case EntityState.Deleted:
ApplyAbpConceptsForDeletedEntity(entry); ApplyAbpConceptsForDeletedEntity(entry);
EntityChangeEventHelper.PublishEntityDeletingEvent(entry.Entity);
EntityChangeEventHelper.PublishEntityDeletedEvent(entry.Entity); EntityChangeEventHelper.PublishEntityDeletedEvent(entry.Entity);
break; break;
} }
@ -485,7 +481,7 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext,
} }
entry.Reload(); entry.Reload();
entry.Entity.As<ISoftDelete>().IsDeleted = true; ObjectHelper.TrySetProperty(entry.Entity.As<ISoftDelete>(), x => x.IsDeleted, () => true);
SetDeletionAuditProperties(entry); SetDeletionAuditProperties(entry);
} }

2
framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs

@ -13,6 +13,8 @@ public class AbpRabbitMqEventBusOptions
public string ExchangeName { get; set; } public string ExchangeName { get; set; }
public string ExchangeType { get; set; } public string ExchangeType { get; set; }
public ushort? PrefetchCount { get; set; }
public string GetExchangeTypeOrDefault() public string GetExchangeTypeOrDefault()
{ {

3
framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs

@ -78,7 +78,8 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, ISingletonDe
AbpRabbitMqEventBusOptions.ClientName, AbpRabbitMqEventBusOptions.ClientName,
durable: true, durable: true,
exclusive: false, exclusive: false,
autoDelete: false autoDelete: false,
prefetchCount: AbpRabbitMqEventBusOptions.PrefetchCount
), ),
AbpRabbitMqEventBusOptions.ConnectionName AbpRabbitMqEventBusOptions.ConnectionName
); );

5
framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs

@ -159,19 +159,16 @@ public class MemoryDbRepository<TMemoryDbContext, TEntity> : RepositoryBase<TEnt
protected virtual void TriggerEntityCreateEvents(TEntity entity) protected virtual void TriggerEntityCreateEvents(TEntity entity)
{ {
EntityChangeEventHelper.PublishEntityCreatingEvent(entity);
EntityChangeEventHelper.PublishEntityCreatedEvent(entity); EntityChangeEventHelper.PublishEntityCreatedEvent(entity);
} }
protected virtual void TriggerEntityUpdateEvents(TEntity entity) protected virtual void TriggerEntityUpdateEvents(TEntity entity)
{ {
EntityChangeEventHelper.PublishEntityUpdatingEvent(entity);
EntityChangeEventHelper.PublishEntityUpdatedEvent(entity); EntityChangeEventHelper.PublishEntityUpdatedEvent(entity);
} }
protected virtual void TriggerEntityDeleteEvents(TEntity entity) protected virtual void TriggerEntityDeleteEvents(TEntity entity)
{ {
EntityChangeEventHelper.PublishEntityDeletingEvent(entity);
EntityChangeEventHelper.PublishEntityDeletedEvent(entity); EntityChangeEventHelper.PublishEntityDeletedEvent(entity);
} }
@ -253,7 +250,7 @@ public class MemoryDbRepository<TMemoryDbContext, TEntity> : RepositoryBase<TEnt
if (entity is ISoftDelete softDeleteEntity && !IsHardDeleted(entity)) if (entity is ISoftDelete softDeleteEntity && !IsHardDeleted(entity))
{ {
softDeleteEntity.IsDeleted = true; ObjectHelper.TrySetProperty(softDeleteEntity, x => x.IsDeleted, () => true);
(await GetCollectionAsync()).Update(entity); (await GetCollectionAsync()).Update(entity);
} }
else else

8
framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs

@ -294,7 +294,7 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity)) if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity))
{ {
((ISoftDelete)entity).IsDeleted = true; ObjectHelper.TrySetProperty(((ISoftDelete)entity), x => x.IsDeleted, () => true);
ApplyAbpConceptsForDeletedEntity(entity); ApplyAbpConceptsForDeletedEntity(entity);
ReplaceOneResult result; ReplaceOneResult result;
@ -365,8 +365,7 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
{ {
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity)) if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity))
{ {
((ISoftDelete)entity).IsDeleted = true; ObjectHelper.TrySetProperty(((ISoftDelete)entity), x => x.IsDeleted, () => true);
softDeletedEntities.Add(entity, SetNewConcurrencyStamp(entity)); softDeletedEntities.Add(entity, SetNewConcurrencyStamp(entity));
} }
else else
@ -598,13 +597,11 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
private void TriggerEntityCreateEvents(TEntity entity) private void TriggerEntityCreateEvents(TEntity entity)
{ {
EntityChangeEventHelper.PublishEntityCreatingEvent(entity);
EntityChangeEventHelper.PublishEntityCreatedEvent(entity); EntityChangeEventHelper.PublishEntityCreatedEvent(entity);
} }
protected virtual void TriggerEntityUpdateEvents(TEntity entity) protected virtual void TriggerEntityUpdateEvents(TEntity entity)
{ {
EntityChangeEventHelper.PublishEntityUpdatingEvent(entity);
EntityChangeEventHelper.PublishEntityUpdatedEvent(entity); EntityChangeEventHelper.PublishEntityUpdatedEvent(entity);
} }
@ -617,7 +614,6 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
protected virtual void TriggerEntityDeleteEvents(TEntity entity) protected virtual void TriggerEntityDeleteEvents(TEntity entity)
{ {
EntityChangeEventHelper.PublishEntityDeletingEvent(entity);
EntityChangeEventHelper.PublishEntityDeletedEvent(entity); EntityChangeEventHelper.PublishEntityDeletedEvent(entity);
} }

6
framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/QueueDeclareConfiguration.cs

@ -13,6 +13,8 @@ public class QueueDeclareConfiguration
public bool Exclusive { get; set; } public bool Exclusive { get; set; }
public bool AutoDelete { get; set; } public bool AutoDelete { get; set; }
public ushort? PrefetchCount { get; set; }
public IDictionary<string, object> Arguments { get; } public IDictionary<string, object> Arguments { get; }
@ -20,13 +22,15 @@ public class QueueDeclareConfiguration
[NotNull] string queueName, [NotNull] string queueName,
bool durable = true, bool durable = true,
bool exclusive = false, bool exclusive = false,
bool autoDelete = false) bool autoDelete = false,
ushort? prefetchCount = null)
{ {
QueueName = queueName; QueueName = queueName;
Durable = durable; Durable = durable;
Exclusive = exclusive; Exclusive = exclusive;
AutoDelete = autoDelete; AutoDelete = autoDelete;
Arguments = new Dictionary<string, object>(); Arguments = new Dictionary<string, object>();
PrefetchCount = prefetchCount;
} }
public virtual QueueDeclareOk Declare(IModel channel) public virtual QueueDeclareOk Declare(IModel channel)

7
framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs

@ -165,9 +165,14 @@ public class RabbitMqMessageConsumer : IRabbitMqMessageConsumer, ITransientDepen
arguments: Queue.Arguments arguments: Queue.Arguments
); );
if (Queue.PrefetchCount.HasValue)
{
Channel.BasicQos(0, Queue.PrefetchCount.Value, false);
}
var consumer = new AsyncEventingBasicConsumer(Channel); var consumer = new AsyncEventingBasicConsumer(Channel);
consumer.Received += HandleIncomingMessageAsync; consumer.Received += HandleIncomingMessageAsync;
Channel.BasicConsume( Channel.BasicConsume(
queue: Queue.QueueName, queue: Queue.QueueName,
autoAck: false, autoAck: false,

5
framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -13,11 +14,11 @@ namespace Volo.Abp.UI.Navigation;
public class MenuManager : IMenuManager, ITransientDependency public class MenuManager : IMenuManager, ITransientDependency
{ {
protected AbpNavigationOptions Options { get; } protected AbpNavigationOptions Options { get; }
protected IHybridServiceScopeFactory ServiceScopeFactory { get; } protected IServiceScopeFactory ServiceScopeFactory { get; }
protected ISimpleStateCheckerManager<ApplicationMenuItem> SimpleStateCheckerManager { get; } protected ISimpleStateCheckerManager<ApplicationMenuItem> SimpleStateCheckerManager { get; }
public MenuManager( public MenuManager(
IOptions<AbpNavigationOptions> options, IOptions<AbpNavigationOptions> options,
IHybridServiceScopeFactory serviceScopeFactory, IServiceScopeFactory serviceScopeFactory,
ISimpleStateCheckerManager<ApplicationMenuItem> simpleStateCheckerManager) ISimpleStateCheckerManager<ApplicationMenuItem> simpleStateCheckerManager)
{ {
Options = options.Value; Options = options.Value;

4
framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/ar.json

@ -11,7 +11,7 @@
"Close": "أغلق", "Close": "أغلق",
"Save": "حفظ", "Save": "حفظ",
"SavingWithThreeDot": "حفظ...", "SavingWithThreeDot": "حفظ...",
"Actions": "أجراءات", "Actions": "الإجراءات",
"Delete": "حذف", "Delete": "حذف",
"SuccessfullyDeleted": "تم الحذف بنجاح", "SuccessfullyDeleted": "تم الحذف بنجاح",
"Edit": "تعديل", "Edit": "تعديل",
@ -50,4 +50,4 @@
"ItemWillBeDeletedMessage": "سوف يتم حذف هذا البند!", "ItemWillBeDeletedMessage": "سوف يتم حذف هذا البند!",
"ManageYourAccount": "إدارة حسابك" "ManageYourAccount": "إدارة حسابك"
} }
} }

10
framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/ro-RO.json

@ -31,14 +31,14 @@
"PagerPrevious": "Anterior", "PagerPrevious": "Anterior",
"PagerFirst": "Primul", "PagerFirst": "Primul",
"PagerLast": "Ultimul", "PagerLast": "Ultimul",
"PagerInfo": "Afişate _START_ to _END_ of _TOTAL_ înregistrări", "PagerInfo": "Afişate de la _START_ la _END_ din _TOTAL_ înregistrări",
"PagerInfo{0}{1}{2}": "Afişate {0} to {1} of {2} înregistrări", "PagerInfo{0}{1}{2}": "Afişate de la {0} la {1} din {2} înregistrări",
"PagerInfoEmpty": "Afişate 0 to 0 of 0 înregistrări", "PagerInfoEmpty": "Afişate 0 din 0 înregistrări",
"PagerInfoFiltered": "(filtrate de la _MAX_ înregistrări totale)", "PagerInfoFiltered": "(filtrate de la _MAX_ înregistrări totale)",
"NoDataAvailableInDatatable": "Nicio informaţie disponibilă", "NoDataAvailableInDatatable": "Nicio informaţie disponibilă",
"Total": "total", "Total": "total",
"Selected": "selectate", "Selected": "selectate",
"PagerShowMenuEntries": "Arată _MENU_ intrări", "PagerShowMenuEntries": "Afişează _MENU_ intrări",
"DatatableActionDropdownDefaultText": "Acţiuni", "DatatableActionDropdownDefaultText": "Acţiuni",
"ChangePassword": "Schimbă parola", "ChangePassword": "Schimbă parola",
"PersonalInfo": "Profilul meu", "PersonalInfo": "Profilul meu",
@ -50,4 +50,4 @@
"ItemWillBeDeletedMessage": "Acest articol va fi şters!", "ItemWillBeDeletedMessage": "Acest articol va fi şters!",
"ManageYourAccount": "Administraţi-vă contul" "ManageYourAccount": "Administraţi-vă contul"
} }
} }

1
framework/test/Volo.Abp.AspNetCore.Mvc.PlugIn/Volo.Abp.AspNetCore.Mvc.PlugIn.csproj

@ -4,6 +4,7 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

71
framework/test/Volo.Abp.Core.Tests/Volo/Abp/DependencyInjection/HybridServiceScopeFactory_Tests.cs

@ -1,71 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Shouldly;
using Volo.Abp.Modularity;
using Xunit;
namespace Volo.Abp.DependencyInjection;
public class HybridServiceScopeFactory_Tests
{
[Fact]
public async Task Should_Use_Default_ServiceScopeFactory_By_Default_Async()
{
using (var application = await AbpApplicationFactory.CreateAsync<IndependentEmptyModule>())
{
application.Services.AddType(typeof(MyServiceAsync));
await application.InitializeAsync();
var serviceScopeFactory = application.ServiceProvider.GetRequiredService<IHybridServiceScopeFactory>();
using (var scope = serviceScopeFactory.CreateScope())
{
scope.ServiceProvider.GetRequiredService<MyServiceAsync>();
}
MyServiceAsync.DisposeCount.ShouldBe(1);
}
}
[Fact]
public void Should_Use_Default_ServiceScopeFactory_By_Default()
{
using (var application = AbpApplicationFactory.Create<IndependentEmptyModule>())
{
application.Services.AddType(typeof(MyService));
application.Initialize();
var serviceScopeFactory = application.ServiceProvider.GetRequiredService<IHybridServiceScopeFactory>();
using (var scope = serviceScopeFactory.CreateScope())
{
scope.ServiceProvider.GetRequiredService<MyService>();
}
MyService.DisposeCount.ShouldBe(1);
}
}
private class MyServiceAsync : ITransientDependency, IDisposable
{
public static int DisposeCount { get; private set; }
public void Dispose()
{
++DisposeCount;
}
}
private class MyService : ITransientDependency, IDisposable
{
public static int DisposeCount { get; private set; }
public void Dispose()
{
++DisposeCount;
}
}
}

1
framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj

@ -5,6 +5,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace /> <RootNamespace />
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

24
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs

@ -32,37 +32,18 @@ public abstract class EntityChangeEvents_Tests<TStartupModule> : TestAppTestBase
{ {
var personName = Guid.NewGuid().ToString("N"); var personName = Guid.NewGuid().ToString("N");
var creatingEventTriggered = false;
var createdEventTriggered = false; var createdEventTriggered = false;
var createdEtoTriggered = false; var createdEtoTriggered = false;
using (var uow = GetRequiredService<IUnitOfWorkManager>().Begin()) using (var uow = GetRequiredService<IUnitOfWorkManager>().Begin())
{ {
#pragma warning disable 618
LocalEventBus.Subscribe<EntityCreatingEventData<Person>>(data =>
#pragma warning restore 618
{
creatingEventTriggered.ShouldBeFalse();
createdEventTriggered.ShouldBeFalse();
creatingEventTriggered = true;
data.Entity.Name.ShouldBe(personName);
/* Want to change age from 15 to 18 */
data.Entity.Age.ShouldBe(15);
data.Entity.Age = 18;
return Task.CompletedTask;
});
LocalEventBus.Subscribe<EntityCreatedEventData<Person>>(data => LocalEventBus.Subscribe<EntityCreatedEventData<Person>>(data =>
{ {
creatingEventTriggered.ShouldBeTrue();
createdEventTriggered.ShouldBeFalse(); createdEventTriggered.ShouldBeFalse();
createdEventTriggered = true; createdEventTriggered = true;
data.Entity.Age.ShouldBe(18); data.Entity.Age.ShouldBe(15);
data.Entity.Name.ShouldBe(personName); data.Entity.Name.ShouldBe(personName);
return Task.CompletedTask; return Task.CompletedTask;
@ -81,8 +62,7 @@ public abstract class EntityChangeEvents_Tests<TStartupModule> : TestAppTestBase
await uow.CompleteAsync(); await uow.CompleteAsync();
} }
creatingEventTriggered.ShouldBeTrue();
createdEventTriggered.ShouldBeTrue(); createdEventTriggered.ShouldBeTrue();
createdEtoTriggered.ShouldBeTrue(); createdEtoTriggered.ShouldBeTrue();
} }

2
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json

@ -27,7 +27,7 @@
"DisplayName:UserName": "Nume de utilizator", "DisplayName:UserName": "Nume de utilizator",
"DisplayName:Email": "Email", "DisplayName:Email": "Email",
"DisplayName:Name": "Nume", "DisplayName:Name": "Nume",
"DisplayName:Surname": "Surname", "DisplayName:Surname": "Nume de familie",
"DisplayName:Password": "Parolă", "DisplayName:Password": "Parolă",
"DisplayName:EmailAddress": "Adresa de email", "DisplayName:EmailAddress": "Adresa de email",
"DisplayName:PhoneNumber": "Număr de telefon", "DisplayName:PhoneNumber": "Număr de telefon",

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDbProperties.cs → modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDbProperties.cs

@ -2,7 +2,7 @@
namespace Volo.Abp.BackgroundJobs; namespace Volo.Abp.BackgroundJobs;
public static class BackgroundJobsDbProperties public static class AbpBackgroundJobsDbProperties
{ {
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix; public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix;

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContext.cs

@ -6,7 +6,7 @@ using Volo.Abp.MultiTenancy;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore; namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore;
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public class BackgroundJobsDbContext : AbpDbContext<BackgroundJobsDbContext>, IBackgroundJobsDbContext public class BackgroundJobsDbContext : AbpDbContext<BackgroundJobsDbContext>, IBackgroundJobsDbContext
{ {
public DbSet<BackgroundJobRecord> BackgroundJobs { get; set; } public DbSet<BackgroundJobRecord> BackgroundJobs { get; set; }

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs

@ -18,7 +18,7 @@ public static class BackgroundJobsDbContextModelCreatingExtensions
builder.Entity<BackgroundJobRecord>(b => builder.Entity<BackgroundJobRecord>(b =>
{ {
b.ToTable(BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs", BackgroundJobsDbProperties.DbSchema); b.ToTable(AbpBackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs", AbpBackgroundJobsDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/IBackgroundJobsDbContext.cs

@ -6,7 +6,7 @@ using Volo.Abp.MultiTenancy;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore; namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore;
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public interface IBackgroundJobsDbContext : IEfCoreDbContext public interface IBackgroundJobsDbContext : IEfCoreDbContext
{ {
DbSet<BackgroundJobRecord> BackgroundJobs { get; } DbSet<BackgroundJobRecord> BackgroundJobs { get; }

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContext.cs

@ -6,7 +6,7 @@ using Volo.Abp.MultiTenancy;
namespace Volo.Abp.BackgroundJobs.MongoDB; namespace Volo.Abp.BackgroundJobs.MongoDB;
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public class BackgroundJobsMongoDbContext : AbpMongoDbContext, IBackgroundJobsMongoDbContext public class BackgroundJobsMongoDbContext : AbpMongoDbContext, IBackgroundJobsMongoDbContext
{ {
public IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; set; } public IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; set; }

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs

@ -11,7 +11,7 @@ public static class BackgroundJobsMongoDbContextExtensions
builder.Entity<BackgroundJobRecord>(b => builder.Entity<BackgroundJobRecord>(b =>
{ {
b.CollectionName = BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs"; b.CollectionName = AbpBackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs";
}); });
} }
} }

2
modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/IBackgroundJobsMongoDbContext.cs

@ -6,7 +6,7 @@ using Volo.Abp.MultiTenancy;
namespace Volo.Abp.BackgroundJobs.MongoDB; namespace Volo.Abp.BackgroundJobs.MongoDB;
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public interface IBackgroundJobsMongoDbContext : IAbpMongoDbContext public interface IBackgroundJobsMongoDbContext : IAbpMongoDbContext
{ {
IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; } IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; }

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/BlobStoringDatabaseDbProperties.cs → modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/AbpBlobStoringDatabaseDbProperties.cs

@ -2,7 +2,7 @@
namespace Volo.Abp.BlobStoring.Database; namespace Volo.Abp.BlobStoring.Database;
public static class BlobStoringDatabaseDbProperties public static class AbpBlobStoringDatabaseDbProperties
{ {
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix; public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix;

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContext.cs

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore; namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public class BlobStoringDbContext : AbpDbContext<BlobStoringDbContext>, IBlobStoringDbContext public class BlobStoringDbContext : AbpDbContext<BlobStoringDbContext>, IBlobStoringDbContext
{ {
public DbSet<DatabaseBlobContainer> BlobContainers { get; set; } public DbSet<DatabaseBlobContainer> BlobContainers { get; set; }

4
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs

@ -12,7 +12,7 @@ public static class BlobStoringDbContextModelCreatingExtensions
builder.Entity<DatabaseBlobContainer>(b => builder.Entity<DatabaseBlobContainer>(b =>
{ {
b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers", BlobStoringDatabaseDbProperties.DbSchema); b.ToTable(AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers", AbpBlobStoringDatabaseDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
@ -27,7 +27,7 @@ public static class BlobStoringDbContextModelCreatingExtensions
builder.Entity<DatabaseBlob>(b => builder.Entity<DatabaseBlob>(b =>
{ {
b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs", BlobStoringDatabaseDbProperties.DbSchema); b.ToTable(AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs", AbpBlobStoringDatabaseDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/IBlobStoringDbContext.cs

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore; namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public interface IBlobStoringDbContext : IEfCoreDbContext public interface IBlobStoringDbContext : IEfCoreDbContext
{ {
DbSet<DatabaseBlobContainer> BlobContainers { get; } DbSet<DatabaseBlobContainer> BlobContainers { get; }

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContext.cs

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.BlobStoring.Database.MongoDB; namespace Volo.Abp.BlobStoring.Database.MongoDB;
[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public class BlobStoringMongoDbContext : AbpMongoDbContext, IBlobStoringMongoDbContext public class BlobStoringMongoDbContext : AbpMongoDbContext, IBlobStoringMongoDbContext
{ {
public IMongoCollection<DatabaseBlobContainer> BlobContainers => Collection<DatabaseBlobContainer>(); public IMongoCollection<DatabaseBlobContainer> BlobContainers => Collection<DatabaseBlobContainer>();

4
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs

@ -11,12 +11,12 @@ public static class BlobStoringMongoDbContextExtensions
builder.Entity<DatabaseBlobContainer>(b => builder.Entity<DatabaseBlobContainer>(b =>
{ {
b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers"; b.CollectionName = AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers";
}); });
builder.Entity<DatabaseBlob>(b => builder.Entity<DatabaseBlob>(b =>
{ {
b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs"; b.CollectionName = AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs";
}); });
} }
} }

2
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/IBlobStoringMongoDbContext.cs

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.BlobStoring.Database.MongoDB; namespace Volo.Abp.BlobStoring.Database.MongoDB;
[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public interface IBlobStoringMongoDbContext : IAbpMongoDbContext public interface IBlobStoringMongoDbContext : IAbpMongoDbContext
{ {
IMongoCollection<DatabaseBlobContainer> BlobContainers { get; } IMongoCollection<DatabaseBlobContainer> BlobContainers { get; }

2
modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDbProperties.cs → modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/AbpBloggingDbProperties.cs

@ -1,6 +1,6 @@
namespace Volo.Blogging namespace Volo.Blogging
{ {
public static class BloggingDbProperties public static class AbpBloggingDbProperties
{ {
/// <summary> /// <summary>
/// Default value: "Blg". /// Default value: "Blg".

2
modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContext.cs

@ -11,7 +11,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.EntityFrameworkCore namespace Volo.Blogging.EntityFrameworkCore
{ {
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public class BloggingDbContext : AbpDbContext<BloggingDbContext>, IBloggingDbContext public class BloggingDbContext : AbpDbContext<BloggingDbContext>, IBloggingDbContext
{ {
public DbSet<BlogUser> Users { get; set; } public DbSet<BlogUser> Users { get; set; }

12
modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs

@ -25,7 +25,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<BlogUser>(b => builder.Entity<BlogUser>(b =>
{ {
b.ToTable(BloggingDbProperties.DbTablePrefix + "Users", BloggingDbProperties.DbSchema); b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Users", AbpBloggingDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.ConfigureAbpUser(); b.ConfigureAbpUser();
@ -35,7 +35,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Blog>(b => builder.Entity<Blog>(b =>
{ {
b.ToTable(BloggingDbProperties.DbTablePrefix + "Blogs", BloggingDbProperties.DbSchema); b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Blogs", AbpBloggingDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
@ -48,7 +48,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Post>(b => builder.Entity<Post>(b =>
{ {
b.ToTable(BloggingDbProperties.DbTablePrefix + "Posts", BloggingDbProperties.DbSchema); b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Posts", AbpBloggingDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
@ -68,7 +68,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Comment>(b => builder.Entity<Comment>(b =>
{ {
b.ToTable(BloggingDbProperties.DbTablePrefix + "Comments", BloggingDbProperties.DbSchema); b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Comments", AbpBloggingDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
@ -84,7 +84,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Tag>(b => builder.Entity<Tag>(b =>
{ {
b.ToTable(BloggingDbProperties.DbTablePrefix + "Tags", BloggingDbProperties.DbSchema); b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Tags", AbpBloggingDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
@ -99,7 +99,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<PostTag>(b => builder.Entity<PostTag>(b =>
{ {
b.ToTable(BloggingDbProperties.DbTablePrefix + "PostTags", BloggingDbProperties.DbSchema); b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "PostTags", AbpBloggingDbProperties.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();

2
modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/IBloggingDbContext.cs

@ -11,7 +11,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.EntityFrameworkCore namespace Volo.Blogging.EntityFrameworkCore
{ {
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public interface IBloggingDbContext : IEfCoreDbContext public interface IBloggingDbContext : IEfCoreDbContext
{ {
DbSet<BlogUser> Users { get; } DbSet<BlogUser> Users { get; }

2
modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContext.cs

@ -10,7 +10,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.MongoDB namespace Volo.Blogging.MongoDB
{ {
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public class BloggingMongoDbContext : AbpMongoDbContext, IBloggingMongoDbContext public class BloggingMongoDbContext : AbpMongoDbContext, IBloggingMongoDbContext
{ {
public IMongoCollection<BlogUser> Users => Collection<BlogUser>(); public IMongoCollection<BlogUser> Users => Collection<BlogUser>();

10
modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs

@ -16,27 +16,27 @@ namespace Volo.Blogging.MongoDB
builder.Entity<BlogUser>(b => builder.Entity<BlogUser>(b =>
{ {
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Users"; b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Users";
}); });
builder.Entity<Blog>(b => builder.Entity<Blog>(b =>
{ {
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Blogs"; b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Blogs";
}); });
builder.Entity<Post>(b => builder.Entity<Post>(b =>
{ {
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Posts"; b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Posts";
}); });
builder.Entity<Tagging.Tag>(b => builder.Entity<Tagging.Tag>(b =>
{ {
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Tags"; b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Tags";
}); });
builder.Entity<Comment>(b => builder.Entity<Comment>(b =>
{ {
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Comments"; b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Comments";
}); });
} }
} }

2
modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/IBloggingMongoDbContext.cs

@ -10,7 +10,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.MongoDB namespace Volo.Blogging.MongoDB
{ {
[IgnoreMultiTenancy] [IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)] [ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public interface IBloggingMongoDbContext : IAbpMongoDbContext public interface IBloggingMongoDbContext : IAbpMongoDbContext
{ {
IMongoCollection<BlogUser> Users { get; } IMongoCollection<BlogUser> Users { get; }

19
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/create.js

@ -334,6 +334,25 @@ $(function () {
editor.insertText(txt); editor.insertText(txt);
}); });
$('.tab-item').on('click', function () {
if ($(this).attr("aria-label") == 'Preview' && editor.isMarkdownMode()) {
let content = editor.getMarkdown();
localStorage.setItem('content', content);
$.post("/CmsKitCommonWidgets/ContentPreview", { content: content }, function (result) {
editor.setHTML(result);
var highllightedText = $('#ContentEditor').find('.toastui-editor-md-preview-highlight');
highllightedText.removeClass('toastui-editor-md-preview-highlight');
});
}
else if ($(this).attr("aria-label") == 'Write') {
var retrievedObject = localStorage.getItem('content');
editor.setMarkdown(retrievedObject);
}
});
function createAddWidgetButton() { function createAddWidgetButton() {
const button = document.createElement('button'); const button = document.createElement('button');

19
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/update.js

@ -255,6 +255,25 @@ $(function () {
editor.insertText(txt); editor.insertText(txt);
}); });
$('.tab-item').on('click', function () {
if ($(this).attr("aria-label") == 'Preview' && editor.isMarkdownMode()) {
let content = editor.getMarkdown();
localStorage.setItem('content', content);
$.post("/CmsKitCommonWidgets/ContentPreview", { content: content }, function (result) {
editor.setHTML(result);
var highllightedText = $('#ContentEditor').find('.toastui-editor-md-preview-highlight');
highllightedText.removeClass('toastui-editor-md-preview-highlight');
});
}
else if ($(this).attr("aria-label") == 'Write') {
var retrievedObject = localStorage.getItem('content');
editor.setMarkdown(retrievedObject);
}
});
function createAddWidgetButton() { function createAddWidgetButton() {
const button = document.createElement('button'); const button = document.createElement('button');

36
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js

@ -1,6 +1,6 @@
$(function () { $(function () {
var l = abp.localization.getResource("CmsKit"); var l = abp.localization.getResource("CmsKit");
var $createForm = $('#form-page-create'); var $createForm = $('#form-page-create');
var $title = $('#ViewModel_Title'); var $title = $('#ViewModel_Title');
var $slug = $('#ViewModel_Slug'); var $slug = $('#ViewModel_Slug');
@ -90,7 +90,7 @@ $(function () {
var fileUriPrefix = "/api/cms-kit/media/"; var fileUriPrefix = "/api/cms-kit/media/";
initEditor(); initEditor();
var editor; var editor;
function initEditor() { function initEditor() {
var $editorContainer = $("#ContentEditor"); var $editorContainer = $("#ContentEditor");
@ -133,7 +133,7 @@ $(function () {
} }
}); });
} }
function uploadFile(blob, callback, source) { function uploadFile(blob, callback, source) {
var UPPY_OPTIONS = { var UPPY_OPTIONS = {
endpoint: fileUploadUri, endpoint: fileUploadUri,
@ -166,11 +166,37 @@ $(function () {
}); });
} }
$('#GeneratedWidgetText').on('change',function () { $('#GeneratedWidgetText').on('change', function () {
var txt = $('#GeneratedWidgetText').val(); var txt = $('#GeneratedWidgetText').val();
editor.insertText(txt); editor.insertText(txt);
}); });
$('.tab-item').on('click', function () {
if ($(this).attr("aria-label") == 'Preview' && editor.isMarkdownMode()) {
let content = editor.getMarkdown();
localStorage.setItem('content', content);
$.post("/CmsKitCommonWidgets/ContentPreview", { content: content }, function (result) {
let style = styleEditor.getValue();
$('#editor-preview-style').remove();
$('head').append('<style id="editor-preview-style">' + style + '</style>');
editor.setHTML(result);
var highllightedText = $('#ContentEditor').find('.toastui-editor-md-preview-highlight');
highllightedText.removeClass('toastui-editor-md-preview-highlight');
});
}
else if ($(this).attr("aria-label") == 'Write'){
var retrievedObject = localStorage.getItem('content');
editor.setMarkdown(retrievedObject);
}
});
function createAddWidgetButton() { function createAddWidgetButton() {
const button = document.createElement('button'); const button = document.createElement('button');

28
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js

@ -140,7 +140,33 @@ $(function () {
var txt = $('#GeneratedWidgetText').val(); var txt = $('#GeneratedWidgetText').val();
editor.insertText(txt); editor.insertText(txt);
}); });
$('.tab-item').on('click', function () {
if ($(this).attr("aria-label") == 'Preview' && editor.isMarkdownMode()) {
let content = editor.getMarkdown();
localStorage.setItem('content', content);
$.post("/CmsKitCommonWidgets/ContentPreview", { content: content }, function (result) {
let style = styleEditor.getValue();
$('#editor-preview-style').remove();
$('head').append('<style id="editor-preview-style">' + style + '</style>');
editor.setHTML(result);
var highllightedText = $('#ContentEditor').find('.toastui-editor-md-preview-highlight');
highllightedText.removeClass('toastui-editor-md-preview-highlight');
});
}
else if ($(this).attr("aria-label") == 'Write') {
var retrievedObject = localStorage.getItem('content');
editor.setMarkdown(retrievedObject);
}
});
function createAddWidgetButton() { function createAddWidgetButton() {
const button = document.createElement('button'); const button = document.createElement('button');

7
modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogPostPublicDto.cs → modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/BlogPostCommonDto.cs

@ -1,13 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Blogs; namespace Volo.CmsKit.Contents;
[Serializable] [Serializable]
public class BlogPostPublicDto : AuditedEntityDto<Guid> public class BlogPostCommonDto : AuditedEntityDto<Guid>, IContent
{ {
public Guid BlogId { get; set; } public Guid BlogId { get; set; }
@ -24,4 +23,4 @@ public class BlogPostPublicDto : AuditedEntityDto<Guid>
public Guid? CoverImageMediaId { get; set; } public Guid? CoverImageMediaId { get; set; }
public CmsUserDto Author { get; set; } public CmsUserDto Author { get; set; }
} }

8
modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/DefaultContentDto.cs

@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace Volo.CmsKit.Contents;
public class DefaultContentDto : IContent
{
public List<ContentFragment> ContentFragments { get; set; }
}

7
modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContent.cs

@ -0,0 +1,7 @@
using System.Collections.Generic;
namespace Volo.CmsKit.Contents;
public interface IContent
{
public List<ContentFragment> ContentFragments { get; set; }
}

10
modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs

@ -0,0 +1,10 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
namespace Volo.CmsKit.Contents;
public interface IContentAppService : IApplicationService
{
Task<List<ContentFragment>> ParseAsync(string content);
}

13
modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs → modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/PageDto.cs

@ -1,22 +1,21 @@
using System; using System.Collections.Generic;
using System.Collections.Generic; using System;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.CmsKit.Contents;
namespace Volo.CmsKit.Public.Pages; namespace Volo.CmsKit.Contents;
[Serializable] [Serializable]
public class PageDto : EntityDto<Guid> public class PageDto : EntityDto<Guid>, IContent
{ {
public string Title { get; set; } public string Title { get; set; }
public string Slug { get; set; } public string Slug { get; set; }
public string Content { get; set; } public string Content { get; set; }
public List<ContentFragment> ContentFragments { get; set; } public List<ContentFragment> ContentFragments { get; set; }
public string Script { get; set; } public string Script { get; set; }
public string Style { get; set; } public string Style { get; set; }
} }

22
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs

@ -0,0 +1,22 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Contents;
[RequiresGlobalFeature(typeof(PagesFeature))]
public class ContentAppService : CmsKitAppServiceBase, IContentAppService
{
protected ContentParser ContentParser { get; }
public ContentAppService(ContentParser contentParser)
{
ContentParser = contentParser;
}
public async Task<List<ContentFragment>> ParseAsync(string content)
{
return await ContentParser.ParseAsync(content);
}
}

4
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs

@ -28,10 +28,10 @@ public class ContentParser : ITransientDependency
}); });
} }
var parsedList = new List<string>(); List<string> parsedList = new();
ParseContent(content, parsedList); ParseContent(content, parsedList);
var contentFragments = new List<ContentFragment>(); List<ContentFragment> contentFragments = new();
FillContentFragment(content, parsedList, contentFragments); FillContentFragment(content, parsedList, contentFragments);
return Task.FromResult(contentFragments); return Task.FromResult(contentFragments);

14
modules/cms-kit/src/Volo.CmsKit.Common.Web/Controllers/CmsKitCommonWidgetsController.cs

@ -0,0 +1,14 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.CmsKit.Web.Pages.CmsKit.Components.ContentPreview;
namespace Volo.CmsKit.Web.Controllers;
public class CmsKitCommonWidgetsController : AbpController
{
[HttpPost]
public IActionResult ContentPreview(ContentPreviewDto dto)
{
return ViewComponent(typeof(ContentPreviewViewComponent), new { content = dto.Content });
}
}

9
modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewDto.cs

@ -0,0 +1,9 @@
using System;
namespace Volo.CmsKit.Web.Pages.CmsKit.Components.ContentPreview;
[Serializable]
public class ContentPreviewDto
{
public string Content { get; set; }
}

30
modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewViewComponent.cs

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.CmsKit.Contents;
namespace Volo.CmsKit.Web.Pages.CmsKit.Components.ContentPreview;
public class ContentPreviewViewComponent : AbpViewComponent
{
protected IContentAppService ContentAppService { get; }
public ContentPreviewViewComponent(IContentAppService contentAppService)
{
ContentAppService = contentAppService;
}
public virtual async Task<IViewComponentResult> InvokeAsync(string content)
{
var fragments = await ContentAppService.ParseAsync(content);
return View("~/Pages/CmsKit/Components/ContentPreview/Default.cshtml", new DefaultContentDto
{
ContentFragments = fragments
});
}
}

10
modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/Default.cshtml

@ -0,0 +1,10 @@
@using Volo.CmsKit.Contents
@using Volo.CmsKit.Web.Pages.CmsKit.Components.Contents
@model DefaultContentDto
<div class="content">
@await Component.InvokeAsync(typeof(ContentFragmentViewComponent), Model)
</div>

20
modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragment.cshtml

@ -0,0 +1,20 @@
@using System.Dynamic
@using Volo.Abp.Data
@using Volo.CmsKit.Web.Renderers;
@using Volo.CmsKit.Web.Pages.CmsKit.Components.Contents;
@model ContentFragmentViewComponent
@inject IMarkdownToHtmlRenderer MarkdownRenderer
@foreach (var contentFragment in Model.ContentDto.ContentFragments)
{
if (contentFragment.Type == "Markdown")
{
@Html.Raw(await MarkdownRenderer.RenderAsync(contentFragment.GetProperty<string>("Content")))
}
else if (contentFragment.Type == "Widget")
{
@await Component.InvokeAsync(contentFragment.GetProperty<string>("Type"), contentFragment.ExtraProperties.ConvertToDynamicObject())
}
}

21
modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragmentViewComponent.cs

@ -0,0 +1,21 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
using Volo.CmsKit.Contents;
namespace Volo.CmsKit.Web.Pages.CmsKit.Components.Contents;
[ViewComponent(Name = "ContentFragment")]
[Widget(
AutoInitialize = true
)]
public class ContentFragmentViewComponent : AbpViewComponent
{
public IContent ContentDto { get; set; }
public virtual async Task<IViewComponentResult> InvokeAsync(IContent contentDto)
{
return View("~/Pages/CmsKit/Components/Contents/ContentFragment.cshtml", new ContentFragmentViewComponent() { ContentDto = contentDto });
}
}

2
modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs → modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/IContentRenderer.cs

@ -1,6 +1,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Volo.CmsKit.Web.Contents; namespace Volo.CmsKit.Web.Pages.CmsKit.Components.Contents;
public interface IContentRenderer public interface IContentRenderer
{ {

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

Loading…
Cancel
Save