diff --git a/README.md b/README.md index 1b4d56dd26..8d872160ca 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](http://vjenkins.dynu.net:5480/job/abp/badge/icon)](http://ci.volosoft.com:5480/blue/organizations/jenkins/abp/activity) [![NuGet](https://img.shields.io/nuget/v/Volo.Abp.Core.svg?style=flat-square)](https://www.nuget.org/packages/Volo.Abp.Core) [![NuGet Download](https://img.shields.io/nuget/dt/Volo.Abp.Core.svg?style=flat-square)](https://www.nuget.org/packages/Volo.Abp.Core) -[![MyGet (with prereleases)](https://img.shields.io/myget/abp-nightly/vpre/Volo.Abp.Core.svg?style=flat-square)](https://docs.abp.io/en/abp/latest/Nightly-Builds) +[![MyGet (with prereleases)](https://img.shields.io/myget/abp-nightly/vpre/Volo.Abp.svg?style=flat-square)](https://docs.abp.io/en/abp/latest/Nightly-Builds) This project is the next generation of the [ASP.NET Boilerplate](https://aspnetboilerplate.com/) web application framework. See [the announcement](https://blog.abp.io/abp/Abp-vNext-Announcement). diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalization.csproj b/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalization.csproj index aaebfafe6f..7b26f13919 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalization.csproj +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalization.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..58d01109b5 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hant.json @@ -0,0 +1,13 @@ +{ + "culture": "zh-Hant", + "texts": { + "Account": "帳號", + "Welcome": "歡迎", + "UseOneOfTheFollowingLinksToContinue": "使用下面的連結繼續", + "FrameworkHomePage": "框架首頁", + "FrameworkDocumentation": "框架文件", + "OfficialBlog": "官方部落格", + "CommercialHomePage": "商業版首頁", + "CommercialSupportWebSite": "商業版支援網站" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index 7ce192c3ca..9c00e584ab 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -1,6 +1,8 @@ { "culture": "en", "texts": { + "Permission:Organizations": "Organizations", + "Permission:Manage": "Manage Organizations", "Permission:NpmPackages": "NPM Packages", "Permission:NugetPackages": "Nuget Packages", "Permission:Maintenance": "Maintenance", @@ -11,6 +13,7 @@ "Permission:Edit": "Edit", "Permission:Delete": "Delete", "Permission:Create": "Create", + "Menu:Organizations": "Organizations", "Menu:Packages": "Packages", "NpmPackageDeletionWarningMessage": "This NPM Package will be deleted. Do you confirm that?", "NugetPackageDeletionWarningMessage": "This Nuget Package will be deleted. Do you confirm that?", @@ -34,7 +37,7 @@ "NugetPackageTarget.HttpApi": "Http Api", "NugetPackageTarget.HttpApiClient": "Http Api Client", "NugetPackageTarget.Web": "Web", - "NugetPackageTarget.EntityFrameworkCore": "EntityFramework Core", + "NugetPackageTarget.EntityFrameworkCore": "DeleteAllEntityFramework Core", "NugetPackageTarget.MongoDB": "MongoDB", "Edit": "Edit", "Delete": "Delete", @@ -55,6 +58,31 @@ "Menu:NpmPackages": "NPM Packages", "Menu:Modules": "Modules", "Menu:Maintenance": "Maintenance", - "Menu:NugetPackages": "Nuget Packages" + "Menu:NugetPackages": "Nuget Packages", + "CreateAnOrganization": "Create an organization", + "Organizations": "Organizations", + "LongName": "Long name", + "LicenseType": "License type", + "LicenseStartTime": "License start time", + "LicenseEndTime": "License end time", + "AllowedDeveloperCount": "Allowed developer count", + "UserNameOrEmailAddress": "Username or email address", + "AddOwner": "Add owner", + "UserName": "Username", + "Email": "Email", + "Developers": "Developers", + "AddDeveloper": "Add developer", + "Create": "Create", + "UserNotFound": "User not found", + "{0}WillBeRemovedFromMembers": "{0} Will be removed from members", + "Computers": "Computers", + "UniqueComputerId": "Unique computer id", + "LastSeenDate": "Last seen date", + "{0}Computer{1}WillBeRemovedFromRecords": "Computer of {0} ({1}) will be removed from records", + "OrganizationDeletionWarningMessage": "Organization will be deleted", + "This{0}AlreadyExistInThisOrganization": "This {0} already exist in this organization", + "AreYouSureYouWantToDeleteAllComputers": "Are you sure you want to delete all computers?", + "DeleteAll": "Delete all", + "DoYouWantToCreateNewUser": "Do you want to create new user?" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json index 7c3d3ce695..bc78a54119 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json @@ -1,6 +1,8 @@ { "culture": "zh-Hans", "texts": { + "Permission:Organizations": "组织", + "Permission:Manage": "管理组织", "Permission:NpmPackages": "NPM包", "Permission:NugetPackages": "Nuget包", "Permission:Maintenance": "维护", @@ -11,6 +13,7 @@ "Permission:Edit": "编辑", "Permission:Delete": "删除", "Permission:Create": "创建", + "Menu:Organizations": "组织", "Menu:Packages": "包", "NpmPackageDeletionWarningMessage": "该NPM包将会被删除. 你确定吗?", "NugetPackageDeletionWarningMessage": "该Nuget包将会被删除. 你确定吗?", @@ -55,6 +58,30 @@ "Menu:NpmPackages": "NPM包", "Menu:Modules": "模块", "Menu:Maintenance": "维护", - "Menu:NugetPackages": "Nuget包" + "Menu:NugetPackages": "Nuget包", + "CreateAnOrganization": "创建新组织", + "Organizations": "组织", + "LongName": "完整名称", + "LicenseType": "授权类型", + "LicenseStartTime": "授权开始时间", + "LicenseEndTime": "授权结束时间", + "AllowedDeveloperCount": "允许的开发人员数量", + "UserNameOrEmailAddress": "用户名或电子邮件地址", + "AddOwner": "添加所有者", + "UserName": "用户名", + "Email": "电子邮件地址", + "Developers": "开发者", + "AddDeveloper": "添加开发者", + "Create": "创建", + "UserNotFound": "用户不存在", + "{0}WillBeRemovedFromMembers": "{0} 将从成员中删除", + "Computers": "计算机", + "UniqueComputerId": "计算机唯一ID", + "LastSeenDate": "上次查看日期", + "{0}Computer{1}WillBeRemovedFromRecords": "计算机 {0} ({1}) 将从记录中删除", + "OrganizationDeletionWarningMessage": "组织将被删除", + "This{0}AlreadyExistInThisOrganization": "该组织中已经存在此 {0}", + "AreYouSureYouWantToDeleteAllComputers": "您确定要删除所有计算机吗?", + "DeleteAll": "删除所有" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..4787d74b25 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hant.json @@ -0,0 +1,60 @@ +{ + "culture": "zh-Hant", + "texts": { + "Permission:NpmPackages": "NPM套件", + "Permission:NugetPackages": "Nuget套件", + "Permission:Maintenance": "維護", + "Permission:Maintain": "維護", + "Permission:ClearCaches": "清除快取", + "Permission:Modules": "模組", + "Permission:Packages": "套件", + "Permission:Edit": "編輯", + "Permission:Delete": "刪除", + "Permission:Create": "建立", + "Menu:Packages": "套件", + "NpmPackageDeletionWarningMessage": "該NPM套件將會被刪除. 你確定嗎?", + "NugetPackageDeletionWarningMessage": "該Nuget套件將會被刪除. 你確定嗎?", + "ModuleDeletionWarningMessage": "該模組將會被刪除. 你確定嗎?", + "Name": "名稱", + "DisplayName": "顯示名稱", + "ShortDescription": "簡述", + "NameFilter": "名稱", + "CreationTime": "建立時間", + "IsPro": "是否為專業版", + "EfCoreConfigureMethodName": "設定方法", + "IsProFilter": "是否為專業版", + "ApplicationType": "應用程式類型", + "Target": "目標", + "TargetFilter": "目標", + "ModuleClass": "模組分類", + "NugetPackageTarget.DomainShared": "Domain Shared", + "NugetPackageTarget.Domain": "Domain", + "NugetPackageTarget.Application": "Application", + "NugetPackageTarget.ApplicationContracts": "Application Contracts", + "NugetPackageTarget.HttpApi": "Http Api", + "NugetPackageTarget.HttpApiClient": "Http Api Client", + "NugetPackageTarget.Web": "Web", + "NugetPackageTarget.EntityFrameworkCore": "EntityFramework Core", + "NugetPackageTarget.MongoDB": "MongoDB", + "Edit": "編輯", + "Delete": "刪除", + "Refresh": "刷新", + "NpmPackages": "NPM套件", + "NugetPackages": "Nuget套件", + "NpmPackageCount": "NPM套件數量", + "NugetPackageCount": "Nuget套件數量", + "Module": "模組", + "ModuleInfo": "模組信息", + "CreateANpmPackage": "建立NPM套件", + "CreateAModule": "建立模組", + "CreateANugetPackage": "建立Nuget套件", + "AddNew": "建立", + "PackageAlreadyExist{0}": "\"{0}\"已經被添加.", + "ClearCache": "清除快取", + "SuccessfullyCleared": "清除成功", + "Menu:NpmPackages": "NPM套件", + "Menu:Modules": "模組", + "Menu:Maintenance": "維護", + "Menu:NugetPackages": "Nuget套件" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..fe97ac3a6c --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hant.json @@ -0,0 +1,31 @@ +{ + "culture": "zh-Hant", + "texts": { + "Volo.AbpIo.Domain:010004": "超過最大成員數!", + "Volo.AbpIo.Domain:010005": "超過最大擁有者數!", + "Volo.AbpIo.Domain:010006": "使用者已經是該組織的擁有者!", + "Volo.AbpIo.Domain:010007": "該使用者已經是該組織的開發者!", + "Volo.AbpIo.Domain:010008": "允許的開發者數量不能低於當前開發者數量!", + "Volo.AbpIo.Domain:010009": "允許的開發者數量不能小於零!", + "Volo.AbpIo.Domain:010010": "超出了最大mac地址數!", + "Volo.AbpIo.Domain:010011": "個人許可不允許超過1個開發者!", + "Volo.AbpIo.Domain:010012": "許可過期後許可不可延長1個月!", + "Volo.AbpIo.Domain:020001": "不能刪除該NPM套件因為\"{NugetPackages}\"Nuget套件依賴此套件.", + "Volo.AbpIo.Domain:020002": "不能刪除該NPM套件因為\"{Modules}\"模組正在使用此套件.", + "Volo.AbpIo.Domain:020003": "不能刪除該NPM套件因為\"{Modules}\"模組正在使用此套件並且\"{NugetPackages}\"Nuget套件依賴此套件.", + "Volo.AbpIo.Domain:020004": "不能刪除該Nuget套件因為\"{Modules}\"模組正在使用此套件.", + "WantToLearn?": "想學習嗎?", + "ReadyToGetStarted?": "準備開始了嗎?", + "JoinOurCommunity": "加入我們的社群", + "GetStartedUpper": "開始", + "ForkMeOnGitHub": "Fork me on GitHub", + "Features": "功能", + "GetStarted": "開始", + "Documents": "文件", + "Community": "社群", + "ContributionGuide": "貢獻指南", + "Blog": "部落格", + "Commercial": "商業版", + "SeeDocuments": "查看文件" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Blog/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Blog/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..7de3798218 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Blog/Localization/Resources/zh-Hant.json @@ -0,0 +1,5 @@ +{ + "culture": "zh-Hant", + "texts": { + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index c83e5aa6a9..1b4c9a69f8 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -26,6 +26,8 @@ "MyOrganizations": "My organizations", "ApiKey": "API key", "UserNameNotFound": "There is no user with username {0}", - "SuccessfullyAddedToNewsletter": "Thanks you for subscribing to our newsletter!" + "SuccessfullyAddedToNewsletter": "Thanks you for subscribing to our newsletter!", + "ManageProfile": "Manage your profile", + "EmailNotValid": "Please enter a valid email address." } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..e39eaba846 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hant.json @@ -0,0 +1,30 @@ +{ + "culture": "zh-Hant", + "texts": { + "OrganizationManagement": "組織管理", + "OrganizationList": "組織列表", + "Volo.AbpIo.Commercial:010003": "您不是該組織的擁有者!", + "OrganizationNotFoundMessage": "找不到任何組織!", + "DeveloperCount": "開發者數量", + "Owners": "擁有者", + "AddMember": "加入成員", + "AddOwner": "加入擁有者", + "AddDeveloper": "加入開發者", + "UserName": "使用者名稱", + "Name": "名稱", + "EmailAddress": "電子信箱地址", + "Developers": "開發者", + "LicenseType": "許可證類型", + "Manage": "管理", + "StartDate": "開始日期", + "EndDate": "結束日期", + "Modules": "模組", + "LicenseExtendMessage": "您的許可已經延長至{0}", + "LicenseUpgradeMessage": "您的許可已升級為{0}", + "LicenseAddDeveloperMessage": "{0}個開發者已加入到您的許可", + "Volo.AbpIo.Commercial:010004": "不能找到指定的使用者! 使用者必須已經註冊.", + "MyOrganizations": "我的組織", + "ApiKey": "API key", + "UserNameNotFound": "沒有使用者名稱為{0}的使用者" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Docs/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Docs/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..7de3798218 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Docs/Localization/Resources/zh-Hant.json @@ -0,0 +1,5 @@ +{ + "culture": "zh-Hant", + "texts": { + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Support/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Support/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..7de3798218 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Support/Localization/Resources/zh-Hant.json @@ -0,0 +1,5 @@ +{ + "culture": "zh-Hant", + "texts": { + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hant.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..6c74dbcadd --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hant.json @@ -0,0 +1,159 @@ +{ + "culture": "zh-Hant", + "texts": { + "GetStarted": "開始", + "Create": "建立", + "NewProject": "新專案", + "DirectDownload": "直接下載", + "ProjectName": "專案名稱", + "ProjectType": "專案類型", + "DatabaseProvider": "資料庫提供者", + "NTier": "N層", + "IncludeUserInterface": "包含使用者介面", + "CreateNow": "現在建立", + "TheStartupProject": "起始專案", + "Tutorial": "教學", + "UsingCLI": "使用CLI", + "SeeDetails": "看詳細", + "AbpShortDescription": "ABP是用於建立現代Web應用程式的完整架構和強大的基礎設施! 遵循最佳實作和約定,為您提供SOLID開發經驗.", + "SourceCodeUpper": "原始碼", + "LatestReleaseLogs": "最新發佈日誌", + "Infrastructure": "基礎設施", + "Architecture": "架構", + "Modular": "模組化", + "DontRepeatYourself": "不要重複工作", + "DeveloperFocused": "專注於開發者", + "FullStackApplicationInfrastructure": "全端應用程式基礎設施", + "DomainDrivenDesign": "領域驅動設計", + "DomainDrivenDesignExplanation": "依據DDD模式和準則進行設計和開發. 為您的應用程式提供分層模型.", + "Authorization": "授權", + "AuthorizationExplanation": "具有使用者,角色和細膩度權限系統的高級授權. 建立於Microsoft Identity套件上.", + "MultiTenancy": "多租戶", + "MultiTenancyExplanationShort": "SaaS應用程式變得簡單! 從資料庫到UI的多租戶整合.", + "CrossCuttingConcerns": "橫切關注點", + "CrossCuttingConcernsExplanationShort": "完整的基礎架構,用於授權,驗證,異常處理,快取,稽核日誌,交易管理等.", + "BuiltInBundlingMinification": "內建Bundling & Minification", + "BuiltInBundlingMinificationExplanation": "無須使用外部工具進行Bundling & Minification. ABP提供了一種更簡單,動態,功能強大,模組化和內建的方式!", + "VirtualFileSystem": "虛擬文件系統", + "VirtualFileSystemExplanation": "將檢視,腳本,樣式,圖片...嵌入到套件/類別庫中,並在不同的應用程式中重複使用.", + "Theming": "主題", + "ThemingExplanationShort": "使用和訂製基於bootstrap的標準UI主題,或建立自己的主題.", + "BootstrapTagHelpersDynamicForms": "Bootstrap Tag Helpers和動態表單", + "BootstrapTagHelpersDynamicFormsExplanation": "內建的背景作業系統可以整合到Hangfire,RabbitMQ或您喜歡的任何工具中.", //TODO explanation doesn't match. + "HTTPAPIsDynamicProxies": "HTTP APIs和動態代理", + "HTTPAPIsDynamicProxiesExplanation": "自動將應用程式服務公開為REST樣式的HTTP API,並與動態JavaScript和C#代理一起使用.", + "CompleteArchitectureInfo": "現在架構用來建立可維護的軟體解決方案.", + "DomainDrivenDesignBasedLayeringModelExplanation": "幫助您實現基於DDD的分層架構並建構可維護的程式碼.", + "DomainDrivenDesignBasedLayeringModelExplanationCont": "提供啟動模板,抽象,基礎類別,服務,文件和指南以幫助您開發基於DDD模式和準則的應用程式.", + "MicroserviceCompatibleModelExplanation": "核心框架和預先建構模組在設計時就考慮了微服務架構.", + "MicroserviceCompatibleModelExplanationCont": "提供基礎結構,整合,範例和文件,以更輕鬆地實現微服務解決方案,而如果您要使用整體應用程式,也不會帶來額外的複雜性.", + "ModularInfo": "ABP提供了完整的模組化系統,使您能夠開發可重複使用的應用程式模組.", + "PreBuiltModulesThemes": "預先建構模組和主題", + "PreBuiltModulesThemesExplanation": "開源和商業模組和主題已準備好在您的業務應用程式中使用.", + "NuGetNPMPackages": "NuGet和NPM套件", + "NuGetNPMPackagesExplanation": "作為NuGet和NPM套件發佈.易於安裝和升級.", + "ExtensibleReplaceable": "可擴展/可替換", + "ExtensibleReplaceableExplanation": "所有服務和模組在設計時都考慮了可擴展性.您可以替換服務,頁面,樣式,組件...", + "CrossCuttingConcernsExplanation2": "保持原始碼整潔,專注於您自己的業務邏輯.", + "CrossCuttingConcernsExplanation3": "不要浪費時間一次又一次地實作共通用的應用程式需求.", + "AuthenticationAuthorization": "認證與授權", + "ExceptionHandling": "異常處理", + "Validation": "驗證", + "DatabaseConnection": "資料庫連接", + "TransactionManagement": "交易管理", + "AuditLogging": "稽核日誌", + "Caching": "快取", + "Multitenancy": "多租戶", + "DataFiltering": "資料過濾", + "ConventionOverConfiguration": "習慣優於設定", + "ConventionOverConfigurationExplanation": "預設情況下,ABP使用最小或零設定實現共通用的應用程式.", + "ConventionOverConfigurationExplanationList1": "自動註冊已知服務以進行依賴注入.", + "ConventionOverConfigurationExplanationList2": "通過命名習慣將應用程式服務公開為HTTP API.", + "ConventionOverConfigurationExplanationList3": "為C#和JavaScript建立動態HTTP客戶端代理.", + "ConventionOverConfigurationExplanationList4": "為您的實體提供預設Repository.", + "ConventionOverConfigurationExplanationList5": "根據Web請求或應用程式服務方法管理工作單元.", + "ConventionOverConfigurationExplanationList6": "為實體發佈建立,更新和刪除事件.", + "BaseClasses": "基礎類別", + "BaseClassesExplanation": "共通用應用程式模式的預先建構基礎類別.", + "DeveloperFocusedExplanation": "ABP是為了開發者", + "DeveloperFocusedExplanationCont": "它旨在簡化您的日常軟體開發,同時又不限制您在需要時進行底層工作。", + "SeeAllFeatures": "瀏覽所有功能", + "CLI_CommandLineInterface": "CLI (命令列介面)", + "CLI_CommandLineInterfaceExplanation": "CLI會自動建立新專案並將模組添加到您的應用程式.", + "StartupTemplates": "起始模板", + "StartupTemplatesExplanation": "各種起始模板為您提供了完整設定的解結方案,以快速啟動您的開發.", + "BasedOnFamiliarTools": "基於熟悉的工具", + "BasedOnFamiliarToolsExplanation": "建立在您已經知道的主流工具上並與其整合.學習曲線低,適應性強,舒適的開發.", + "ORMIndependent": "ORM獨立", + "ORMIndependentExplanation": "核心框架獨立於ORM/資料庫,並且可以與任何資料庫一起使用.Entity Framework Core和MongoDB提供者已經可用.", + "Features": "功能", + "ABPCLI": "ABP CLI", + "Modularity": "模組化", + "BootstrapTagHelpers": "Bootstrap Tag Helpers", + "DynamicForms": "動態表單", + "BundlingMinification": "Bundling & Minification", + "BackgroundJobs": "背景作業", + "DDDInfrastructure": "DDD基礎設施", + "DomainDrivenDesignInfrastructure": "Domain Driven Design基礎設施", + "AutoRESTAPIs": "自動REST APIs", + "DynamicClientProxies": "動態客戶端代理", + "DistributedEventBus": "分散式事件匯流排", + "DistributedEventBusWithRabbitMQIntegration": "具有RabbitMQ整合的分散式事件匯流排", + "TestInfrastructure": "測試基礎設施", + "AuditLoggingEntityHistories": "稽核日誌和實體歷史", + "ObjectToObjectMapping": "物件對應", + "EmailSMSAbstractions": "電子郵件和簡訊抽象", + "EmailSMSAbstractionsWithTemplatingSupport": "具有模板支援的電子郵件和簡訊抽象", + "Localization": "本地化", + "SettingManagement": "設定管理", + "ExtensionMethods": "擴充方法", + "ExtensionMethodsHelpers": "擴充方法和助手", + "AspectOrientedProgramming": "切面導向設計", + "DependencyInjection": "依賴注入", + "DependencyInjectionByConventions": "依照習慣的依賴注入", + "ABPCLIExplanation": "ABP CLI(命令列介面)是用於對ABP解決方案執行常見操作的命令列工具.", + "ModularityExplanation": "ABP提供了一個完整的基礎設施來建構您自己的應用程式模組,這些模組可能具有實體,服務,資料庫整合,API,UI組件等.", //TODO: strong "your own application modules",- + "MultiTenancyExplanation": "ABP框建不僅支援開發多租戶應用程式,而且使您的程式碼幾乎無須知道多租戶.", + "MultiTenancyExplanation2": "可以自動確定當前租戶,將不同租戶的資料互相隔離.", + "MultiTenancyExplanation3": "支援單一資料庫,或每個租戶單獨資料庫或者混合方式.", + "MultiTenancyExplanation4": "您專注於業務邏輯,並讓該框架為您處理多租戶.", + "BootstrapTagHelpersExplanation": "與其手動撰寫重複細節的bootstrap組件,不如使用ABP的tag helper來簡化它並利用自動完成.您當然也可以在需要時直接使用Bootstrap.", + "DynamicFormsExplanation": "動態表單和tag helpers可以利用C#類別做為模型來建立完整的表單.", + "AuthenticationAuthorizationExplanation": "整合到ASP.NET Core Identity和IdentityServer4的豐富身份驗證和授權選項.提供可擴展且詳細的權限系統.", + "CrossCuttingConcernsExplanation": "部要重複資幾一次又一次地實作所有這寫常見的東西.專注於您的業務邏輯,並讓ABP按照習慣自動執行.", + "DatabaseConnectionTransactionManagement": "資料庫連接和交易管理", + "CorrelationIdTracking": "關聯ID追蹤", + "BundlingMinificationExplanation": "ABP提供了一個簡單,動態,功能強大,模組化的內建Bundling & Minification系統.", + "VirtualFileSystemnExplanation": "虛擬文件系統使管理文件系統(硬碟)上不存在的文件成為可能.它主要用於將(js,css,image,cshtml...)文件嵌入到組件(Assembly)中,並在運行時像實體文件一樣使用他們.", + "ThemingExplanation": "主題系統允許通過基於最新的Bootstrap框架定義一組通用基礎類別庫和佈局來獨立開發應用程式和模組主題.", + "DomainDrivenDesignInfrastructureExplanation": "基於領域驅動設計模式和準則建構分層應用程式的完整基礎設施;", + "Specification": "規範", + "Repository": "倉儲", + "DomainService": "領域服務", + "ValueObject": "值對象", + "ApplicationService": "應用服務", + "DataTransferObject": "資料傳輸對象", + "AggregateRootEntity": "聚合根, 實體", + "AutoRESTAPIsExplanation": "ABP可以依照習慣自動將您的應用服務設定為API控制器.", + "DynamicClientProxiesExplanation": "從JavaScript和C#客戶端輕鬆使用您的API.", + "DistributedEventBusWithRabbitMQIntegrationExplanation": "使用帶有RabbitMQ整合的內建分散式事件匯流排,可以輕鬆發佈和使用分散式事件.", + "TestInfrastructureExplanation": "框架已經考慮了單元和整合測試.為您提供基礎類別,使其更容易.起始模板已預先設定用於測試.", + "AuditLoggingEntityHistoriesExplanation": "針對關鍵業務應用的內建稽核日誌紀錄.請求,服務,方法級別的稽核日誌紀錄以及具有屬性級別詳細資訊的實體歷史紀錄.", + "EmailSMSAbstractionsWithTemplatingSupportExplanation": "IEmailSender和ISmsSender抽象使您的應用程式邏輯與基礎設施解耦.先進的電子郵件模板系統允許建立和在地化電子郵件模板,並在需要實輕鬆使用.", + "LocalizationExplanation": "在地化系統允許在純JSON文件中建立資源,並使用它們來在地化UI.它支援繼承,擴展和JavaScript整合等高級方案,同時與AspNet Core的在地化系統完全兼容.", + "SettingManagementExplanation": "定義應用程式的設定,並根據當前設定,租戶和使用者在運行時獲取值.", + "ExtensionMethodsHelpersExplanation": "即使式瑣碎的程式碼部分,也不要重複.標準類型的擴展方法和助手使您的程式碼更加清晰和易於撰寫.", + "AspectOrientedProgrammingExplanation": "提供合適的基礎設施來建立動態代理並實現切面導向設計.攔截任何類別,並在每次方法執行之前和之後執行程式碼.", + "DependencyInjectionByConventionsExplanation": "無須手動註冊類別以進行依賴注入.按照習慣自動註冊常用服務類型.對於其他類型的服務,您可以使用介面和屬性來使其變得更輕鬆.", + "DataFilteringExplanation": "定義和使用資料過濾器,這些過濾器在您從資料庫中查詢實體時會自動應用.當您實現簡單的介面時,可立即使用軟刪除功能和多租戶過濾器.", + "PublishEvents": "發佈事件", + "HandleEvents": "處理事件", + "AndMore": "更多...", + "Code": "編碼", + "Result": "結果", + "SeeTheDocumentForMoreInformation": "查看{0} 文件獲得更多訊息", + "IndexPageHeroSection": "asp.net core的開源Web應用程式
框架
", + "UiFramework": "UI框架", + "EmailAddress": "電子信箱地址" + } +} \ No newline at end of file diff --git a/build-all-release.ps1 b/build-all-release.ps1 deleted file mode 100644 index e6555f8d6b..0000000000 --- a/build-all-release.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -# COMMON PATHS - -$rootFolder = (Get-Item -Path "./" -Verbose).FullName - -# List of solutions - -$solutionPaths = ( - "framework", - "modules/users", - "modules/permission-management", - "modules/setting-management", - "modules/feature-management", - "modules/identity", - "modules/identityserver", - "modules/tenant-management", - "modules/account", - "modules/docs", - "modules/blogging", - "modules/audit-logging", - "modules/background-jobs", - "modules/client-simulation", - "templates/module/aspnet-core", - "templates/app/aspnet-core", - "abp_io/AbpIoLocalization" -) - -# Build all solutions - -foreach ($solutionPath in $solutionPaths) { - $solutionAbsPath = (Join-Path $rootFolder $solutionPath) - Set-Location $solutionAbsPath - dotnet build --configuration Release - if (-Not $?) { - Write-Host ("Build failed for the solution: " + $solutionPath) - Set-Location $rootFolder - exit $LASTEXITCODE - } -} - -Set-Location $rootFolder diff --git a/build-all.ps1 b/build-all.ps1 deleted file mode 100644 index 649abc5f8c..0000000000 --- a/build-all.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -# COMMON PATHS - -$rootFolder = (Get-Item -Path "./" -Verbose).FullName - -# List of solutions - -$solutionPaths = ( - "framework", - "modules/users", - "modules/permission-management", - "modules/setting-management", - "modules/feature-management", - "modules/identity", - "modules/identityserver", - "modules/tenant-management", - "modules/account", - "modules/docs", - "modules/blogging", - "modules/audit-logging", - "modules/background-jobs", - "modules/client-simulation", - "templates/module/aspnet-core", - "templates/app/aspnet-core", - "abp_io/AbpIoLocalization" -) - -# Build all solutions - -foreach ($solutionPath in $solutionPaths) { - $solutionAbsPath = (Join-Path $rootFolder $solutionPath) - Set-Location $solutionAbsPath - dotnet build - if (-Not $?) { - Write-Host ("Build failed for the solution: " + $solutionPath) - Set-Location $rootFolder - exit $LASTEXITCODE - } -} - -Set-Location $rootFolder diff --git a/build/build-all-release.ps1 b/build/build-all-release.ps1 new file mode 100644 index 0000000000..1c86351379 --- /dev/null +++ b/build/build-all-release.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet build --configuration Release + if (-Not $?) { + Write-Host ("Build failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/build/build-all.ps1 b/build/build-all.ps1 new file mode 100644 index 0000000000..ffaffa67a3 --- /dev/null +++ b/build/build-all.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet build + if (-Not $?) { + Write-Host ("Build failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/build/common.ps1 b/build/common.ps1 new file mode 100644 index 0000000000..e4ba6a8adc --- /dev/null +++ b/build/common.ps1 @@ -0,0 +1,34 @@ +# COMMON PATHS + +$rootFolder = (Get-Item -Path "./" -Verbose).FullName + +# List of solutions + +$solutionPaths = ( + "../framework", + "../modules/users", + "../modules/permission-management", + "../modules/setting-management", + "../modules/feature-management", + "../modules/identity", + "../modules/identityserver", + "../modules/tenant-management", + "../modules/account", + "../modules/docs", + "../modules/blogging", + "../modules/audit-logging", + "../modules/background-jobs", + "../modules/client-simulation", + "../templates/module/aspnet-core", + "../templates/app/aspnet-core", + "../samples/BasicAspNetCoreApplication", + "../samples/BasicConsoleApplication", + "../samples/BookStore", + "../samples/BookStore-Angular-MongoDb/aspnet-core", + "../samples/BookStore-Modular/modules/book-management", + "../samples/BookStore-Modular/application", + "../samples/DashboardDemo", + "../samples/MicroserviceDemo", + "../samples/RabbitMqEventBus", + "../abp_io/AbpIoLocalization" +) \ No newline at end of file diff --git a/build/test-all.ps1 b/build/test-all.ps1 new file mode 100644 index 0000000000..1465bff6c3 --- /dev/null +++ b/build/test-all.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Test all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet test --no-build --no-restore + if (-Not $?) { + Write-Host ("Test failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/common.props b/common.props index 1a273a3efe..1cccebd015 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 2.0.0 + 2.1.0 $(NoWarn);CS1591 https://abp.io/assets/abp_nupkg.png https://abp.io diff --git a/configureawait.props b/configureawait.props new file mode 100644 index 0000000000..5247c80ae0 --- /dev/null +++ b/configureawait.props @@ -0,0 +1,9 @@ + + + + + all + runtime; build; native; contentfiles; analyzers + + + \ No newline at end of file diff --git a/docs/cs/CLI.md b/docs/cs/CLI.md index 2779ba64f3..7d2ab4c479 100644 --- a/docs/cs/CLI.md +++ b/docs/cs/CLI.md @@ -129,6 +129,24 @@ abp update [možnosti] * `--npm`: Aktualizuje pouze balíčky NPM. * `--nuget`: Aktualizuje pouze balíčky NuGet. +### login + +Některé funkce CLI vyžadují přihlášení k platformě abp.io. Chcete-li se přihlásit pomocí svého uživatelského jména, napište + +```bash +abp login +``` + +Všimněte si, že nové přihlášení s již aktivní relací ukončí předchozí relaci a vytvoří novou. + +### logout + +Odhlásí vás odebráním tokenu relace z počítače. + +``` +abp logout +``` + ### help Vypíše základní informace k používání CLI. diff --git a/docs/cs/Entity-Framework-Core-PostgreSQL.md b/docs/cs/Entity-Framework-Core-PostgreSQL.md index 9d4f685316..3a39c7485d 100644 --- a/docs/cs/Entity-Framework-Core-PostgreSQL.md +++ b/docs/cs/Entity-Framework-Core-PostgreSQL.md @@ -1,74 +1,39 @@ -## Entity Framework Core PostgreSQL integrace +# Přepnutí na EF Core PostgreSQL providera -> Podívejte se na [Entity Framework Core integrační dokument](../Entity-Framework-Core.md) pro základy integrace EF Core. +Tento dokument vysvětluje, jak přepnout na poskytovatele databáze **PostgreSQL** pro **[spouštěcí šablonu aplikace](Startup-Templates/Application.md)**, která je dodávána s předem nakonfigurovaným SQL poskytovatelem. -### Aktualizace projektu EntityFrameworkCore +## Výměna balíku Volo.Abp.EntityFrameworkCore.SqlServer -- V projektu `Acme.BookStore.EntityFrameworkCore` nahraďte balík `Volo.Abp.EntityFrameworkCore.SqlServer` za `Volo.Abp.EntityFrameworkCore.PostgreSql` -- Aktualizace pro použití PostgreSQL v `BookStoreEntityFrameworkCoreModule` - - Nahraďte `AbpEntityFrameworkCoreSqlServerModule` za `AbpEntityFrameworkCorePostgreSqlModule` - - Nahraďte `options.UseSqlServer()` za `options.UsePostgreSql()` -- V jiných projektech aktualizujte PostgreSQL connection string v nezbytných `appsettings.json` souborech - - Více informací v [PostgreSQL connection strings](https://www.connectionstrings.com/postgresql/), v tomto dokumentu věnujte pozornost sekci `Npgsql` +Projekt `.EntityFrameworkCore` v řešení závisí na NuGet balíku [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer). Odstraňte tento balík a přidejte stejnou verzi balíku [Volo.Abp.EntityFrameworkCore.PostgreSql](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.PostgreSql). -### Aktualizace projektu EntityFrameworkCore.DbMigrations -- Aktualizace pro použití PostgreSQL v `XXXMigrationsDbContextFactory` - - Nahraďte `new DbContextOptionsBuilder().UseSqlServer()` za `new DbContextOptionsBuilder().UseNpgsql()` +## Nahrazení závislosti modulu +Najděte třídu ***YourProjectName*EntityFrameworkCoreModule** v projektu `.EntityFrameworkCore`, odstraňte `typeof(AbpEntityFrameworkCoreSqlServerModule)` z atributu `DependsOn`, přidejte `typeof(AbpEntityFrameworkCorePostgreSqlModule)` (také nahraďte `using Volo.Abp.EntityFrameworkCore.SqlServer;` za `using Volo.Abp.EntityFrameworkCore.PostgreSql;`). -### Odstranění stávajících migrací +## UsePostgreSql() -Smažte všechny stavající migrační soubory (včetně `DbContextModelSnapshot`) +Najděte volání `UseSqlServer()` v *YourProjectName*EntityFrameworkCoreModule.cs uvnitř projektu `.EntityFrameworkCore` a nahraďte za `UsePostgreSql()`. -![postgresql-delete-initial-migrations](images/postgresql-delete-initial-migrations.png) +Najděte volání `UseSqlServer()` v *YourProjectName*MigrationsDbContextFactory.cs uvnitř projektu `.EntityFrameworkCore.DbMigrations` a nahraďte za `UseNpgsql()`. -### Znovu vygenerujte počáteční migraci +> V závislosti na struktuře řešení můžete najít více volání `UseSqlServer()`, které je třeba změnit. -Nastavte správný spouštěcí projekt (obvykle web projekt) +## Změna connection stringů -![set-as-startup-project](../images/set-as-startup-project.png) +PostgreSql connection stringy se od těch pro SQL Server liší. Je proto potřeba zkontrolovat všechny soubory `appsettings.json` v řešení a connection stringy v nich nahradit. Podívejte se na [connectionstrings.com](https://www.connectionstrings.com/postgresql/) pro více detailů o možnostech PostgreSql connection stringů. -Otevřete **Package Manager Console** (Tools -> Nuget Package Manager -> Package Manager Console), zvolte `.EntityFrameworkCore.DbMigrations` jako **Default project** a proveďte následující příkaz: +Typicky je potřeba změnit `appsettings.json` v projektech `.DbMigrator` a `.Web` projects, ale to záleží na vaší struktuře řešení. -Proveďte příkaz `Add-Migration`: -```` -PM> Add-Migration Initial -```` +## Regenerace migrací -### Aktualizace databáze +Startovací šablona používá [Entity Framework Core Code First migrace](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/). EF Core migrace závisí na zvoleném DBMS poskytovateli. Tudíž změna DBMS poskytovatele způsobí selhání migrace. +* Smažte složku Migrations v projektu `.EntityFrameworkCore.DbMigrations` and znovu sestavte řešení. +* Spusťte `Add-Migration "Initial"` v Package Manager Console (je nutné zvolit `.DbMigrator` (nebo `.Web`) projekt jako startovací projekt v Solution Explorer a zvolit projekt `.EntityFrameworkCore.DbMigrations` jako výchozí v Package Manager Console). -K vytvoření databáze máte dvě možnosti. +Tímto vytvoříte migraci databáze se všemi nakonfigurovanými databázovými objekty (tabulkami). -#### Použití DbMigrator aplikace +Spusťte projekt `.DbMigrator` k vytvoření databáze a vložení počátečních dat. -Řešení obsahuje konzolovou aplikaci (v tomto příkladu nazvanou `Acme.BookStore.DbMigrator`), která může vytvářet databáze, aplikovat migrace a vkládat seed data. Je užitečná jak pro vývojové, tak pro produkční prostředí. +## Spuštění aplikace -> Projekt `.DbMigrator` má vlastní `appsettings.json`. Takže pokud jste změnili connection string uvedený výše, musíte změnit také tento. - -Klikněte pravým na projekt `.DbMigrator` a vyberte **Set as StartUp Project**: - -![set-as-startup-project](images/set-as-startup-project.png) - -Zmáčkněte F5 (nebo Ctrl+F5) ke spuštění aplikace. Výstup bude vypadat následovně: - -![set-as-startup-project](images/db-migrator-app.png) - -#### Použití EF Core Update-Database příkazu - -Ef Core má `Update-Database` příkaz, který v případě potřeby vytvoří databázi a aplikuje čekající migrace. - -Nastavte správný spouštěcí projekt (obvykle web projekt) - -![set-as-startup-project](../images/set-as-startup-project.png) - -Otevřete **Package Manager Console** (Tools -> Nuget Package Manager -> Package Manager Console), vyberte projekt `.EntityFrameworkCore.DbMigrations` jako **Default Project** and spusťte následující příkaz: - -```` -PM> Update-Database -```` - -Dojde k vytvoření nové databáze na základě nakonfigurovaného connection stringu. - -![postgresql-update-database](images/postgresql-update-database.png) - -> Použití nástroje `.DbMigrator` je doporučený způsob, jelikož zároveň vloží seed data nutné k správnému běhu webové aplikace. +Vše je připraveno. Stačí už jen spustit aplikaci a užívat si kódování. diff --git a/docs/cs/docs-nav.json b/docs/cs/docs-nav.json index 2854966a10..6c05d77dcf 100644 --- a/docs/cs/docs-nav.json +++ b/docs/cs/docs-nav.json @@ -60,6 +60,10 @@ "text": "Konfigurace", "path": "Configuration.md" }, + { + "text": "Možnosti", + "path": "Options.md" + }, { "text": "Vkládání závislostí", "path": "Dependency-Injection.md", @@ -83,7 +87,14 @@ "path": "Exception-Handling.md" }, { - "text": "Validace" + "text": "Validace", + "path": "Validation.md", + "items": [ + { + "text": "FluentValidation integrace", + "path": "FluentValidation.md" + } + ] }, { "text": "Autorizace", @@ -257,24 +268,46 @@ }, { "text": "Přístup k datům", + "path": "Data-Access.md", "items": [ { - "text": "Entity Framework Core integrace", - "path": "Entity-Framework-Core.md", + "text": "Connection stringy", + "path": "Connection-Strings.md" + }, + { + "text": "Poskytovatelé databází", "items": [ { - "text": "PostgreSQL integrace", - "path": "Entity-Framework-Core-PostgreSQL.md" + "text": "Entity Framework Core", + "path": "Entity-Framework-Core.md", + "items": [ + { + "text": "Přepnutí na MySQL", + "path": "Entity-Framework-Core-MySQL.md" + }, + { + "text": "Přepnutí na PostgreSQL", + "path": "Entity-Framework-Core-PostgreSQL.md" + }, + { + "text": "Přepnutí na SQLite", + "path": "Entity-Framework-Core-SQLite.md" + }, + { + "text": "Přepnutí na jiný DBMS", + "path": "Entity-Framework-Core-Other-DBMS.md" + } + ] + }, + { + "text": "MongoDB", + "path": "MongoDB.md" + }, + { + "text": "Dapper", + "path": "Dapper.md" } ] - }, - { - "text": "MongoDB integrace", - "path": "MongoDB.md" - }, - { - "text": "Dapper integrace", - "path": "Dapper.md" } ] }, diff --git a/docs/cs/images/docs-section-ui.png b/docs/cs/images/docs-section-ui.png new file mode 100644 index 0000000000..7856454e5d Binary files /dev/null and b/docs/cs/images/docs-section-ui.png differ diff --git a/docs/en/Ambient-Context-Pattern.md b/docs/en/Ambient-Context-Pattern.md new file mode 100644 index 0000000000..d00a721ce2 --- /dev/null +++ b/docs/en/Ambient-Context-Pattern.md @@ -0,0 +1,3 @@ +## Ambient Context Pattern + +TODO \ No newline at end of file diff --git a/docs/en/AspNet-Boilerplate-Migration-Guide.md b/docs/en/AspNet-Boilerplate-Migration-Guide.md new file mode 100644 index 0000000000..b7453b9aff --- /dev/null +++ b/docs/en/AspNet-Boilerplate-Migration-Guide.md @@ -0,0 +1,316 @@ +# ASP.NET Boilerplate v5+ to ABP Framework Migration + +ABP Framework is **the successor** of the open source [ASP.NET Boilerplate](https://aspnetboilerplate.com/) framework. This guide aims to help you to **migrate your existing solutions** (you developed with the ASP.NET Boilerplate framework) to the ABP Framework. + +## Introduction + +**ASP.NET Boilerplate** is being **actively developed** [since 2013](https://github.com/aspnetboilerplate/aspnetboilerplate/graphs/contributors). It is loved, used and contributed by the community. It started as a side project of [a developer](http://halilibrahimkalkan.com/), but now it is officially maintained and improved by the company [Volosoft](https://volosoft.com/) in addition to the great community support. + +ABP Framework has the same goal of the ASP.NET Boilerplate framework: **Don't Repeat Yourself**! It provides infrastructure, tools and startup templates to make a developer's life easier while developing enterprise software solutions. + +See [the introduction blog post](https://blog.abp.io/abp/Abp-vNext-Announcement) if you wonder why we needed to re-write the ASP.NET Boilerplate framework. + +### Should I Migrate? + +No, you don't have to! + +* ASP.NET Boilerplate is still in active development and maintenance. +* It also works on the latest ASP.NET Core and related libraries and tools. It is up to date. + +However, if you want to take the advantage of the new ABP Framework [features](https://abp.io/features) and the new architecture opportunities (like support for NoSQL databases, microservice compatibility, advanced modularity), you can use this document as a guide. + +### What About the ASP.NET Zero? + +[ASP.NET Zero](https://aspnetzero.com/) is a commercial product developed by the core ASP.NET Boilerplate team, on top of the ASP.NET Boilerplate framework. It provides pre-built application [features](https://aspnetzero.com/Features), code generation tooling and a nice looking modern UI. It is trusted and used by thousands of companies from all around the World. + +We have created the [ABP Commercial](https://commercial.abp.io/) as an alternative to the ASP.NET Zero. ABP Commercial is more modular and upgradeable compared to the ASP.NET Zero. It currently has less features compared to ASP.NET Zero, but the gap will be closed by the time (it also has some features don't exist in the ASP.NET Zero). + +We think ASP.NET Zero is still a good choice while starting a new application. It is production ready and mature solution delivered as a full source code. It is being actively developed and we are constantly adding new features. + +We don't suggest to migrate your ASP.NET Zero based solution to the ABP Commercial if; + +* Your ASP.NET Zero solution is mature and it is in maintenance rather than a rapid development. +* You don't have enough development time to perform the migration. +* A monolithic solution fits in your business. +* You've customized existing ASP.NET Zero features too much based on your requirements. + +We also suggest you to compare the features of two products based on your needs. + +If you have an ASP.NET Zero based solution and want to migrate to the ABP Commercial, this guide will also help you. + +## The Migration Progress + +We've designed the ABP Framework by **getting the best parts** of the ASP.NET Boilerplate framework, so it will be familiar to you if you've developed ASP.NET Boilerplate based applications. + +In the ASP.NET Boilerplate, we have not worked much on the UI side, but used some free themes (we've used [metronic theme](https://keenthemes.com/metronic/) for ASP.NET Zero on the other side). In the ABP Framework, we worked a lot on the UI side (especially for the MVC / Razor Pages UI, because Angular already has a good modular system of its own). So, the **most challenging part** of the migration will be the **User Interface** of your solution. + +ABP Framework is (and ASP.NET Boilerplate was) designed based on the [Domain Driven Design](https://docs.abp.io/en/abp/latest/Domain-Driven-Design) patterns & principles and the startup templates are layered based on the DDD layers. So, this guide respects to that layering model and explains the migration layer by layer. + +## Creating the Solution + +First step of the migration is to create a new solution. We suggest you to create a fresh new project using [the startup templates](https://abp.io/get-started) (see [this document](https://docs.abp.io/en/commercial/latest/getting-started) for the ABP Commercial). + +After creating the project and running the application, you can copy your code from your existing solution to the new solution step by step, layer by layer. + +### About Pre-Built Modules + +The startup projects for the ABP Framework use the [pre-built modules](https://docs.abp.io/en/abp/latest/Modules/Index) (not all of them, but the essentials) and themes as NuGet/NPM packages. So, you don't see the source code of the modules/themes in your solution. This has an advantage that you can easily update these packages when a new version is released. However, you can not easily customize them as their source code in your hands. + +We suggest to continue to use these modules as package references, in this way you can get new features easily (see [abp update command](https://docs.abp.io/en/abp/latest/CLI#update)). In this case, you have a few options to customize or extend the functionality of the used modules; + +* You can create your own entity and share the same database table with an entity in a used module. An example of this is the `AppUser` entity comes in the startup template. +* You can [replace](https://docs.abp.io/en/abp/latest/Dependency-Injection#replace-a-service) a domain service, application service, controller, page model or other types of services with your own implementation. We suggest you to inherit from the existing implementation and override the method you need. +* You can replace a `.cshtml` view, page, view component, partial view... with your own one using the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). +* You can override javascript, css, image or any other type of static files using the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). + +More extend/customization options will be developed and documented by the time. However, if you need to fully change the module implementation, it is best to add the [source code](https://github.com/abpframework/abp/tree/dev/modules) of the related module into your own solution and remove the package dependencies. + +The source code of the modules and the themes are [MIT](https://opensource.org/licenses/MIT) licensed, you can fully own and customize it without any limitation (for the ABP Commercial, you can download the source code of a [module](https://commercial.abp.io/modules)/[theme](https://commercial.abp.io/themes) if you have a [license](https://commercial.abp.io/pricing) type that includes the source code). + +## The Domain Layer + +Most of your domain layer code will remain same, while you need to perform some minor changes in your domain objects. + +### Aggregate Roots & Entities + +The ABP Framework and the ASP.NET Boilerplate both have the `IEntity` and `IEntity` interfaces and `Entity` and `Entity` base classes to define entities but they have some differences. + +If you have an entity in the ASP.NET Boilerplate application like that: + +````csharp +public class Person : Entity //Default PK is int for the ASP.NET Boilerplate +{ + ... +} +```` + +Then your primary key (the `Id` property in the base class) is `int` which is the **default primary key** (PK) type for the ASP.NET Boilerplate. If you want to set another type of PK, you need to explicitly declare it: + +````csharp +public class Person : Entity //Set explicit PK in the ASP.NET Boilerplate +{ + ... +} +```` + +ABP Framework behaves differently and expects to **always explicitly set** the PK type: + +````csharp +public class Person : Entity //Set explicit PK in the ASP.NET Boilerplate +{ + ... +} +```` + +`Id` property (and the corresponding PK in the database) will be `Guid` in this case. + +#### Composite Primary Keys + +ABP Framework also has a non-generic `Entity` base class, but this time it has no `Id` property. Its purpose is to allow you to create entities with composite PKs. See [the documentation](https://docs.abp.io/en/abp/latest/Entities#entities-with-composite-keys) to learn more about the composite PKs. + +#### Aggregate Root + +It is best practice now to use the `AggregateRoot` base class instead of `Entity` for aggregate root entities. See [the documentation](https://docs.abp.io/en/abp/latest/Entities#aggregateroot-class) to learn more about the aggregate roots. + +In opposite to the ASP.NET Boilerplate, the ABP Framework creates default repositories (`IRepository`) **only for the aggregate roots**. It doesn't create for other types derived from the `Entity`. + +If you still want to create default repositories for all entity types, find the *YourProjectName*EntityFrameworkCoreModule class in your solution and change `options.AddDefaultRepositories()` to `options.AddDefaultRepositories(includeAllEntities: true)` (it may be already like that for the application startup template). + +#### Migrating the Existing Entities + +We suggest & use the GUID as the PK type for all the ABP Framework modules. However, you can continue to use your existing PK types to migrate your database tables easier. + +The challenging part will be the primary keys of the ASP.NET Boilerplate related entities, like Users, Roles, Tenants, Settings... etc. Our suggestion is to copy data from existing database to the new database tables using a tool or in a manual way (be careful about the foreign key values). + +#### Documentation + +See the documentation for details on the entities: + +* [ASP.NET Boilerplate - Entity documentation](https://aspnetboilerplate.com/Pages/Documents/Entities) +* [ABP Framework - Entity documentation](https://docs.abp.io/en/abp/latest/Entities) + +### Repositories + +> ABP Framework creates default repositories (`IRepository`) **only for the aggregate roots**. It doesn't create for other types derived from the `Entity`. See the "Aggregate Root" section above for more information. + +The ABP Framework and the ASP.NET Boilerplate both have the default generic repository system, but has some differences. + +#### Injecting the Repositories + +In the ASP.NET Boilerplate, there are two default repository interfaces you can directly inject and use: + +* `IRepository` (e.g. `IRepository`) is used for entities with `int` primary key (PK) which is the default PK type. +* `IRepository` (e.g. `IRepository`) is used for entities with other types of PKs. + +ABP Framework doesn't have a default PK type, so you need to **explicitly declare the PK type** of your entity, like `IRepository` or `IRepository`. + +ABP Framework also has the `IRepository` (without PK), but it is mostly used when your entity has a composite PK (because this repository has no methods work with the `Id` property). See [the documentation](https://docs.abp.io/en/abp/latest/Entities#entities-with-composite-keys) to learn more about the **composite PKs**. + +#### Restricted Repositories + +ABP Framework additionally provides a few repository interfaces: + +* `IBasicRepository` has the same methods with the `IRepository` except it doesn't have `IQueryable` support. It can be useful if you don't want to expose complex querying code to the application layer. In this case, you typically want to create custom repositories to encapsulate the querying logic. It is also useful for database providers those don't support `IQueryable`. +* `IReadOnlyRepository` has the methods get data from the database, but doesn't contain any method change the database. +* `IReadOnlyBasicRepository` is similar to the read only repository but also doesn't support `IQueryable`. + +All the interfaces also have versions without `TKey` (like ``IReadOnlyRepository`) those can be used for composite PKs just like explained above. + +#### GetAll() vs IQueryable + +ASP.NET Boilerplate's repository has a `GetAll()` method that is used to obtain an `IQueryable` object to execute LINQ on it. An example application service calls the `GetAll()` method: + +````csharp +public class PersonAppService : ApplicationService, IPersonAppService +{ + private readonly IRepository _personRepository; + + public PersonAppService(IRepository personRepository) + { + _personRepository = personRepository; + } + + public async Task DoIt() + { + var people = await _personRepository + .GetAll() //GetAll() returns IQueryable + .Where(p => p.BirthYear > 2000) //Use LINQ extension methods + .ToListAsync(); + } +} +```` + +ABP Framework's repository doesn't have this method. Instead, it implements the `IQueryable` itself. So, you can directly use LINQ on the repository: + +````csharp +public class PersonAppService : ApplicationService, IPersonAppService +{ + private readonly IRepository _personRepository; + + public PersonAppService(IRepository personRepository) + { + _personRepository = personRepository; + } + + public async Task DoIt() + { + var people = await _personRepository + .Where(p => p.BirthYear > 2000) //Use LINQ extension methods + .ToListAsync(); + } +} +```` + +> Note that in order to use the async LINQ extension methods (like `ToListAsync` here), you may need to depend on the database provider (like EF Core) since these methods are defined in the database provider package, they are not standard LINQ methods. + +#### FirstOrDefault(predicate), Single()... Methods + +ABP Framework repository has not such methods get predicate (expression) since the repository itself is `IQueryable` and all these methods are already standard LINQ extension methods those can be directly used. + +However, it provides the following methods those can be used to query a single entity by its Id: + +* `FindAsync(id)` returns the entity or null if not found. +* `GetAsync(id)` method returns the entity or throws an `EntityNotFoundException` (which causes HTTP 404 status code) if not found. + +#### Sync vs Async + +ABP Framework repository has no sync methods (like `Insert`). All the methods are async (like `InsertAsync`). So, if your application has sync repository method usages, convert them to async versions. + +In general, ABP Framework forces you to completely use async everywhere, because mixing async & sync methods is not a recommended approach. + +#### Documentation + +See the documentation for details on the repositories: + +* [ASP.NET Boilerplate - Repository documentation](https://aspnetboilerplate.com/Pages/Documents/Repositories) +* [ABP Framework - Repository documentation](https://docs.abp.io/en/abp/latest/Repositories) + +### Domain Services + +Your domain service logic mostly remains same on the migration. ABP Framework also defines the base `DomainService` class and the `IDomainService` interface just works like the ASP.NET Boilerplate. + +## The Application Layer + +Your application service logic remains similar on the migration. ABP Framework also defines the base `ApplicationService` class and the `IApplicationService` interface just works like the ASP.NET Boilerplate, but there are some differences in details. + +### Declarative Authorization + +ASP.NET Boilerplate has `AbpAuthorize` and `AbpMvcAuthorize` attributes for declarative authorization. Example usage: + +````csharp +[AbpAuthorize("MyUserDeletionPermissionName")] +public async Task DeleteUserAsync(...) +{ + ... +} +```` + +ABP Framework doesn't has such a custom attribute. It uses the standard `Authorize` attribute in all layers. + +````csharp +[Authorize("MyUserDeletionPermissionName")] +public async Task DeleteUserAsync(...) +{ + ... +} +```` + +This is possible with the better integration to the Microsoft Authorization Extensions libraries. See the Authorization section below for more information about the authorization system. + +### CrudAppService and AsyncCrudAppService Classes + +ASP.NET Boilerplate has `CrudAppService` (with sync service methods) and `AsyncCrudAppService` (with async service methods) classes. + +ABP Framework only has the `CrudAppService` which actually has only the async methods (instead of sync methods). + +ABP Framework's `CrudAppService` method signatures are slightly different than the old one. For example, old update method signature was ` Task UpdateAsync(TUpdateInput input) ` while the new one is ` Task UpdateAsync(TKey id, TUpdateInput input) `. The main difference is that it gets the Id of the updating entity as a separate parameter instead of including in the input DTO. + +### Data Transfer Objects (DTOs) + +There are similar base DTO classes (like `EntityDto`) in the ABP Framework too. So, you can find the corresponding DTO base class if you need. + +#### Validation + +You can continue to use the data annotation attributes to validate your DTOs just like in the ASP.NET Boilerplate. + +ABP Framework doesn't include the ` ICustomValidate ` that does exists in the ASP.NET Boilerplate. Instead, you should implement the standard `IValidatableObject` interface for your custom validation logic. + +## The Infrastructure Layer + +### IAbpSession vs ICurrentUser and ICurrentTenant + +ASP.NET Boilerplate's `IAbpSession` service is used to obtain the current user and tenant information, like ` UserId ` and `TenantId`. + +ABP Framework doesn't have the same service. Instead, use `ICurrentUser` and `ICurrentTenant` services. These services are defined as base properties in some common classes (like `ApplicationService` and `AbpController`), so you generally don't need to manually inject them. They also have much properties compared to the `IAbpSession`. + +### Authorization + +ABP Framework extends the [ASP.NET Core Authorization](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/introduction) by adding **permissions** as auto [policies](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies) and allowing the authorization system to be usable in the [application services](Application-Services.md) too. + +#### AbpAutorize vs Autorize + +Use the standard `[Autorize]` and `[AllowAnonymous]` attributes instead of ASP.NET Boilerplate's custom `[AbpAutorize]` and `[AbpAllowAnonymous]` attributes. + +#### IPermissionChecker vs IAuthorizationService + +Use the standard `IAuthorizationService` to check permissions instead of the ASP.NET Boilerplate's `IPermissionChecker` service. While `IPermissionChecker` also exists in the ABP Framework, it is used to explicitly use the permissions. Using `IAuthorizationService` is the recommended way since it covers other type of policy checks too. + +#### AuthorizationProvider vs PermissionDefinitionProvider + +You inherit from the `AuthorizationProvider` in the ASP.NET Boilerplate to define your permissions. ABP Framework replaces it by the `PermissionDefinitionProvider` base class. So, define your permissions by inheriting from the `PermissionDefinitionProvider` class. + +### Unit of Work + +TODO + +### Multi-Tenancy + +TODO + +## Missing Features + +The following features are not present for the ABP Framework. Here, a list of major missing features (and the related issue for that feature waiting on the ABP Framework GitHub repository): + +* [Multi-Lingual Entities](https://aspnetboilerplate.com/Pages/Documents/Multi-Lingual-Entities) ([#1754](https://github.com/abpframework/abp/issues/1754)) + +Most of these features will eventually be implemented. However, you can implement them yourself if they are important for you. If you want, you can [contribute](Contribution/Index.md) to the framework by implementing these yourself. \ No newline at end of file diff --git a/docs/en/Audit-Logging.md b/docs/en/Audit-Logging.md index 6b171a6c7e..610efc0451 100644 --- a/docs/en/Audit-Logging.md +++ b/docs/en/Audit-Logging.md @@ -14,6 +14,11 @@ An **audit log object** (see the Audit Log Object section below) is typically cr > [Startup templates](Startup-Templates/Index.md) are configured for the audit logging system which is suitable for most of the applications. Use this document for a detailed control over the audit log system. +### Database Provider Support + +* Fully supported by the [Entity Framework Core](Entity-Framework-Core.md) provider. +* Entity change logging is not supported by the [MongoDB](MongoDB.md) provider. Other features work as expected. + ## UseAuditing() `UseAuditing()` middleware should be added to the ASP.NET Core request pipeline in order to create and save the audit logs. If you've created your applications using [the startup templates](Startup-Templates/Index.md), it is already added. @@ -214,7 +219,7 @@ An **audit log object** is created for each **web request** by default. An audit * `ClientId`: Id of the current client, if the client has been authenticated. A client is generally a 3rd-party application using the system over an HTTP API. * `ClientName`: Name of the current client, if available. * `ClientIpAddress`: IP address of the client/user device. - * `CorrelationId`: Current [Correlation Id]((CorrelationId.md)). Correlation Id is used to relate the audit logs written by different applications (or microservices) in a single logical operation. + * `CorrelationId`: Current [Correlation Id](CorrelationId.md). Correlation Id is used to relate the audit logs written by different applications (or microservices) in a single logical operation. * `BrowserInfo`: Browser name/version info of the current user, if available. * `HttpMethod`: HTTP method of the current request (GET, POST, PUT, DELETE... etc.). * `HttpStatusCode`: HTTP response status code for this request. @@ -282,6 +287,84 @@ Configure(options => }); ```` +## IAuditLogScope & IAuditingManager + +This section explains the `IAuditLogScope` & `IAuditingManager` services for advanced use cases. + +An **audit log scope** is an [ambient scope](Ambient-Context-Pattern.md) that **builds** and **saves** an audit log object (explained before). By default, an audit log scope is created for a web request by the Audit Log Middleware (see `UseAuditing()` section above). + +### Access to the Current Audit Log Scope + +Audit log contributors, was explained above, is a global way of manipulating the audit log object. It is good if you can get a value from a service. + +If you need to manipulate the audit log object in an arbitrary point of your application, you can access to the current audit log scope and get the current audit log object (independent of how the scope is managed). Example: + +````csharp +public class MyService : ITransientDependency +{ + private readonly IAuditingManager _auditingManager; + + public MyService(IAuditingManager auditingManager) + { + _auditingManager = auditingManager; + } + + public async Task DoItAsync() + { + var currentAuditLogScope = _auditingManager.Current; + if (currentAuditLogScope != null) + { + currentAuditLogScope.Log.Comments.Add( + "Executed the MyService.DoItAsync method :)" + ); + + currentAuditLogScope.Log.SetProperty("MyCustomProperty", 42); + } + } +} +```` + +Always check if `_auditingManager.Current` is null or not, because it is controlled in an outer scope and you can't know if an audit log scope was created before calling your method. + +### Manually Create an Audit Log Scope + +You rarely need to create a manual audit log scope, but if you need, you can create an audit log scope using the `IAuditingManager` as like in the following example: + +````csharp +public class MyService : ITransientDependency +{ + private readonly IAuditingManager _auditingManager; + + public MyService(IAuditingManager auditingManager) + { + _auditingManager = auditingManager; + } + + public async Task DoItAsync() + { + using (var auditingScope = _auditingManager.BeginScope()) + { + try + { + //Call other services... + } + catch (Exception ex) + { + //Add exceptions + _auditingManager.Current.Log.Exceptions.Add(ex); + } + finally + { + //Always save the log + await auditingScope.SaveAsync(); + } + } + } +} +```` + +You can call other services, they may call others, they may change entities and so on. All these interactions are saved as a single audit log object in the finally block. + ## The Audit Logging Module The Audit Logging Module basically implements the `IAuditingStore` to save the audit log objects to a database. It supports multiple database providers. This module is added to the startup templates by default. diff --git a/docs/en/Background-Jobs-Hangfire.md b/docs/en/Background-Jobs-Hangfire.md index 031ae28589..588fcace9e 100644 --- a/docs/en/Background-Jobs-Hangfire.md +++ b/docs/en/Background-Jobs-Hangfire.md @@ -1,3 +1,43 @@ # Hangfire Background Job Manager -TODO \ No newline at end of file +[Hangfire](https://www.hangfire.io/) is an advanced background job manager. You can integrate Hangfire with the ABP Framework to use it instead of the [default background job manager](Background-Jobs.md). In this way, you can use the same background job API for Hangfire and your code will be independent of Hangfire. If you like, you can directly use Hangfire's API, too. + +> See the [background jobs document](Background-Jobs.md) to learn how to use the background job system. This document only shows how to install and configure the Hangfire integration. + +## Installation + +It is suggested to use the [ABP CLI](CLI.md) to install this package. + +### Using the ABP CLI + +Open a command line window in the folder of the project (.csproj file) and type the following command: + +````bash +abp add-package Volo.Abp.BackgroundJobs.HangFire +```` + +### Manual Installation + +If you want to manually install; + +1. Add the [Volo.Abp.BackgroundJobs.HangFire](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.HangFire) NuGet package to your project: + + ```` + Install-Package Volo.Abp.BackgroundJobs.HangFire + ```` + +2. Add the `AbpBackgroundJobsHangfireModule` to the dependency list of your module: + +````csharp +[DependsOn( + //...other dependencies + typeof(AbpBackgroundJobsHangfireModule) //Add the new module dependency + )] +public class YourModule : AbpModule +{ +} +```` + +## Configuration + +TODO... \ No newline at end of file diff --git a/docs/en/Blog-Posts/2020-01-15 v2_0_Release/Post.md b/docs/en/Blog-Posts/2020-01-15 v2_0_Release/Post.md index 77e6fbb0f6..d3a525c63f 100644 --- a/docs/en/Blog-Posts/2020-01-15 v2_0_Release/Post.md +++ b/docs/en/Blog-Posts/2020-01-15 v2_0_Release/Post.md @@ -1,6 +1,6 @@ # ABP Framework v2.0 and the ABP Commercial -ABP Framework v2.0 has been released this week. This post explains why we have released an **early major version** and what is changed with version 2.0. +ABP Framework v2.0 has been released in this week. This post explains why we have released an **early major version** and what is changed with version 2.0. In addition to the v2.0 release, we are excited to announce the **ABP Commercial**, which is a set of professional modules, tools, themes, and services built on top of the open-source ABP framework. diff --git a/docs/en/Blog-Posts/2020-01-15 v2_0_Release/abp-io-abpcommercial-release.png b/docs/en/Blog-Posts/2020-01-15 v2_0_Release/abp-io-abpcommercial-release.png new file mode 100644 index 0000000000..4366ceb986 Binary files /dev/null and b/docs/en/Blog-Posts/2020-01-15 v2_0_Release/abp-io-abpcommercial-release.png differ diff --git a/docs/en/Contribution/Localization-Text-Files.md b/docs/en/Contribution/Localization-Text-Files.md index 3932800575..2a8e5ee468 100644 --- a/docs/en/Contribution/Localization-Text-Files.md +++ b/docs/en/Contribution/Localization-Text-Files.md @@ -3,7 +3,7 @@ Here, a list of localization text files for anyone wants to contribute to localization of the texts coming from the framework. We will keep this list up to date: * https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/en.json -* https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpValidation/en.json +* https://github.com/abpframework/abp/blob/master/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/en.json * https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/en.json * https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json * https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/en.json @@ -12,29 +12,20 @@ Here, a list of localization text files for anyone wants to contribute to locali * https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en.json * https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en.json * https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/en.json -* https://github.com/abpframework/abp/tree/master/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json +* https://github.com/abpframework/abp/blob/master/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json * https://github.com/abpframework/abp/tree/master/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/en.json -* https://github.com/abpframework/abp/tree/master/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json +* https://github.com/abpframework/abp/tree/master/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json * https://github.com/abpframework/abp/tree/master/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/en.json * https://github.com/abpframework/abp/tree/master/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en.json -* https://github.com/abpframework/abp/tree/master/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json * https://github.com/abpframework/abp/tree/master/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json -* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/en.json -* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json -* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/en.json -* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/Localization/ApplicationContracts/en.json -* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/Localization/Domain/en.json -* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Web/Localization/Resources/AbpIdentity/en.json -* https://github.com/abpframework/abp/tree/master/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/en.json -* https://github.com/abpframework/abp/tree/master/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json -* https://github.com/abpframework/abp/tree/master/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/en.json -* https://github.com/abpframework/abp/tree/master/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Localization/Resources/AbpTenantManagement/Web/en.json +* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json +* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json +* https://github.com/abpframework/abp/tree/master/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/en.json +* https://github.com/abpframework/abp/tree/master/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json +* https://github.com/abpframework/abp/tree/master/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json * https://github.com/abpframework/abp/tree/master/samples/BookStore/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json -* https://github.com/abpframework/abp/tree/master/samples/DashboardDemo/src/DashboardDemo.Domain/Localization/DashboardDemo/en.json +* https://github.com/abpframework/abp/tree/master/samples/DashboardDemo/src/DashboardDemo.Domain.Shared/Localization/DashboardDemo/en.json * https://github.com/abpframework/abp/tree/master/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement/Localization/ApplicationContracts/en.json * https://github.com/abpframework/abp/tree/master/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement/Localization/Domain/en.json * https://github.com/abpframework/abp/tree/master/samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/en.json -* https://github.com/abpframework/abp/tree/master/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/Localization/MyProjectName/ApplicationContracts/en.json -* https://github.com/abpframework/abp/tree/master/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/DomainShared/en.json -* https://github.com/abpframework/abp/tree/master/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/MyProjectName/Web/en.json -* https://github.com/abpframework/abp/tree/master/templates/mvc/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json +* https://github.com/abpframework/abp/tree/master/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json diff --git a/docs/en/Entities.md b/docs/en/Entities.md index 8ae7cdf235..b5d196cccb 100644 --- a/docs/en/Entities.md +++ b/docs/en/Entities.md @@ -1,34 +1,87 @@ -## Entities +# Entities Entities are one of the core concepts of DDD (Domain Driven Design). Eric Evans describe it as "*An object that is not fundamentally defined by its attributes, but rather by a thread of continuity and identity*". An entity is generally mapped to a table in a relational database. -### Entity Class +## Entity Class -Entities are derived from `Entity` class as shown below: +Entities are derived from the `Entity` class as shown below: ```C# -public class Person : Entity +public class Book : Entity { public string Name { get; set; } - public DateTime CreationTime { get; set; } + public float Price { get; set; } +} +``` + +> If you do not want to derive your entity from the base `Entity` class, you can directly implement `IEntity` interface. + +`Entity` class just defines an `Id` property with the given primary **key type**, which is `Guid` in the example above. It can be other types like `string`, `int`, `long` or whatever you need. + +### Entities with GUID Keys + +If your entity's Id type is `Guid`, there are some good practices to implement: + +* Create a constructor that gets the Id as a parameter and passes to the base class. + * If you don't set a GUID Id, ABP Framework sets it on save, but it is good to have a valid Id on the entity even before saving it to the database. +* If you create an entity with a constructor that takes parameters, also create a `protected` empty constructor. This is used while your database provider reads your entity from the database (on deserialization). +* Don't use the `Guid.NewGuid()` to set the Id! Use [the `IGuidGenerator` service](Guid-Generation.md) while passing the Id from the code that creates the entity. `IGuidGenerator` optimized to generate sequential GUIDs, which is critical for clustered indexes in the relational databases. + +An example entity: - public Person() +````csharp +public class Book : Entity +{ + public string Name { get; set; } + + public float Price { get; set; } + + protected Book() { - CreationTime = DateTime.Now; + + } + + public Book(Guid id) + : base(id) + { + } } -``` +```` -> If you do not want to derive your entity from the base `Entity` class, you can directly implement `IEntity` interface. +Example usage in an [application service](Application-Services.md): -`Entity` class just defines an `Id` property with the given primary **key type**, which is `int` in the sample above. It can be other types like `string`, `Guid`, `long` or whatever you need. +````csharp +public class BookAppService : ApplicationService, IBookAppService +{ + private readonly IRepository _bookRepository; -Entity class also overrides the **equality** operator (==) to easily check if two entities are equal (they are equals if they are same entity type and their Ids are equals). + public BookAppService(IRepository bookRepository) + { + _bookRepository = bookRepository; + } -#### Entities with Composite Keys + public async Task CreateAsync(CreateBookDto input) + { + await _bookRepository.InsertAsync( + new Book(GuidGenerator.Create()) + { + Name = input.Name, + Price = input.Price + } + ); + } +} +```` + +* `BookAppService` injects the default [repository](Repositories.md) for the book entity and uses its `InsertAsync` method to insert a `Book` to the database. +* `GuidGenerator` is type of `IGuidGenerator` which is a property defined in the `ApplicationService` base class. ABP defines such frequently used base properties as pre-injected for you, so you don't need to manually [inject](Dependency-Injection.md) them. +* If you want to follow the DDD best practices, see the *Aggregate Example* section below. + +### Entities with Composite Keys Some entities may need to have **composite keys**. In that case, you can derive your entity from the non-generic `Entity` class. Example: @@ -53,31 +106,31 @@ public class UserRole : Entity } ```` -For the example above, the composite key is composed of `UserId` and `RoleId`. For a relational database, it is the composite primary key of the related table. - -Entities with composite keys should implement the `GetKeys()` method as shown above. +For the example above, the composite key is composed of `UserId` and `RoleId`. For a relational database, it is the composite primary key of the related table. Entities with composite keys should implement the `GetKeys()` method as shown above. -Notice that you also need to define keys of the entity in your **object-relational mapping** (ORM) configuration. +> Notice that you also need to define keys of the entity in your **object-relational mapping** (ORM) configuration. See the [Entity Framework Core](Entity-Framework-Core.md) integration document for example. -> Also note that Entities with Composite Primary Keys cannot utilize the `IRepository` interface since it requires a single unique Id property. However, you can always use `IRepository`. See [repositories documentation](Repositories.md) for more. +> Also note that Entities with Composite Primary Keys cannot utilize the `IRepository` interface since it requires a single Id property. However, you can always use `IRepository`. See [repositories documentation](Repositories.md) for more. -### AggregateRoot Class +## AggregateRoot Class "*Aggregate is a pattern in Domain-Driven Design. A DDD aggregate is a cluster of domain objects that can be treated as a single unit. An example may be an order and its line-items, these will be separate objects, but it's useful to treat the order (together with its line items) as a single aggregate.*" (see the [full description](http://martinfowler.com/bliki/DDD_Aggregate.html)) -`AggregateRoot` class extends the `Entity` class. So, it also has an `Id` property by default. +`AggregateRoot` class extends the `Entity` class. So, it also has an `Id` property by default. -> Notice that ABP creates default repositories only for aggregate roots by default. However, it's possible to include all entities. See [repositories documentation](Repositories.md) for more. +> Notice that ABP creates default repositories only for aggregate roots by default. However, it's possible to include all entities. See the [repositories documentation](Repositories.md) for more. -ABP does not force you to use aggregate roots, you can in fact use the `Entity` class as defined before. However, if you want to implement DDD and want to create aggregate root classes, there are some best practices you may want to consider: +ABP does not force you to use aggregate roots, you can in fact use the `Entity` class as defined before. However, if you want to implement the [Domain Driven Design](Domain-Driven-Design.md) and want to create aggregate root classes, there are some best practices you may want to consider: * An aggregate root is responsible to preserve it's own integrity. This is also true for all entities, but aggregate root has responsibility for it's sub entities too. So, the aggregate root must always be in a valid state. * An aggregate root can be referenced by it's Id. Do not reference it by it's navigation property. * An aggregate root is treated as a single unit. It's retrieved and updated as a single unit. It's generally considered as a transaction boundary. * Work with sub-entities over the aggregate root- do not modify them independently. -#### Aggregate Example +See the [entity design best practice guide](Best-Practices/Entities.md) if you want to implement DDD in your application. + +### Aggregate Example This is a full sample of an aggregate root with a related sub-entity collection: @@ -156,6 +209,11 @@ public class OrderLine : Entity { Count = newCount; } + + public override object[] GetKeys() + { + return new Object[] {OrderId, ProductId}; + } } ```` @@ -163,15 +221,80 @@ public class OrderLine : Entity `Order` is an **aggregate root** with `Guid` type `Id` property. It has a collection of `OrderLine` entities. `OrderLine` is another entity with a composite primary key (`OrderId` and ` ProductId`). -While this example may not implement all the best practices of an aggregate root, it still follows good practices: +While this example may not implement all the best practices of an aggregate root, it still follows some good practices: * `Order` has a public constructor that takes **minimal requirements** to construct an `Order` instance. So, it's not possible to create an order without an id and reference number. The **protected/private** constructor is only necessary to **deserialize** the object while reading from a data source. * `OrderLine` constructor is internal, so it is only allowed to be created by the domain layer. It's used inside of the `Order.AddProduct` method. * `Order.AddProduct` implements the business rule to add a product to an order. * All properties have `protected` setters. This is to prevent the entity from arbitrary changes from outside of the entity. For exmple, it would be dangerous to set `TotalItemCount` without adding a new product to the order. It's value is maintained by the `AddProduct` method. -ABP does not force you to apply any DDD rule or patterns. However, it tries to make it possible and easier when you do want to apply them. The documentation also follows the same principle. +ABP Framework does not force you to apply any DDD rule or patterns. However, it tries to make it possible and easier when you do want to apply them. The documentation also follows the same principle. -#### Aggregate Roots with Composite Keys +### Aggregate Roots with Composite Keys While it's not common (and not suggested) for aggregate roots, it is in fact possible to define composite keys in the same way as defined for the mentioned entities above. Use non-generic `AggregateRoot` base class in that case. + +## Base Classes & Interfaces for Audit Properties + +There are some properties like `CreationTime`, `CreatorId`, `LastModificationTime`... which are very common in all applications. ABP Framework provides some interfaces and base classes to **standardize** these properties and also **sets their values automatically**. + +### Auditing Interfaces + +There are a lot of auditing interfaces, so you can implement the one that you need. + +> While you can manually implement these interfaces, you can use **the base classes** defined in the next section to simplify it. + +* `IHasCreationTime` defines the following properties: + * `CreationTime` +* `IMayHaveCreator` defines the following properties: + * `CreatorId` +* `ICreationAuditedObject` inherits from the `IHasCreationTime` and the `IMayHaveCreator`, so it defines the following properties: + * `CreationTime` + * `CreatorId` +* `IHasModificationTime` defines the following properties: + * `LastModificationTime` +* `IModificationAuditedObject` extends the `IHasModificationTime` and adds the `LastModifierId` property. So, it defines the following properties: + * `LastModificationTime` + * `LastModifierId` +* `IAuditedObject` extends the `ICreationAuditedObject` and the `IModificationAuditedObject`, so it defines the following properties: + * `CreationTime` + * `CreatorId` + * `LastModificationTime` + * `LastModifierId` +* `ISoftDelete` (see the [data filtering document](Data-Filtering.md)) defines the following properties: + * `IsDeleted` +* `IHasDeletionTime` extends the `ISoftDelete` and adds the `DeletionTime` property. So, it defines the following properties: + * `IsDeleted` + * `DeletionTime` +* `IDeletionAuditedObject` extends the `IHasDeletionTime` and adds the `DeleterId` property. So, it defines the following properties: + * `IsDeleted` + * `DeletionTime` + * `DeleterId` +* `IFullAuditedObject` inherits from the `IAuditedObject` and the `IDeletionAuditedObject`, so it defines the following properties: + * `CreationTime` + * `CreatorId` + * `LastModificationTime` + * `LastModifierId` + * `IsDeleted` + * `DeletionTime` + * `DeleterId` + +Once you implement any of the interfaces, or derive from a class defined in the next section, ABP Framework automatically manages these properties wherever possible. + +> Implementing `ISoftDelete`, `IDeletionAuditedObject` or `IFullAuditedObject` makes your entity **soft-delete**. See the [data filtering document](Data-Filtering.md) to learn about the soft-delete pattern. + +### Auditing Base Classes + +While you can manually implement any of the interfaces defined above, it is suggested to inherit from the base classes defined here: + +* `CreationAuditedEntity` and `CreationAuditedAggregateRoot` implement the `ICreationAuditedObject` interface. +* `AuditedEntity` and `AuditedAggregateRoot` implement the `IAuditedObject` interface. +* `FullAuditedEntity` and `FullAuditedAggregateRoot` implement the `IFullAuditedObject` interface. + +All these base classes also have non-generic versions to take `AuditedEntity` and `FullAuditedAggregateRoot` to support the composite primary keys. + +All these base classes also have `...WithUser` pairs, like `FullAuditedAggregateRootWithUser` and`FullAuditedAggregateRootWithUser`. This makes possible to add a navigation property to your user entity. However, it is not a good practice to add navigation properties between aggregate roots, so this usage is not suggested (unless you are using an ORM, like EF Core, that well supports this scenario and you really need it - otherwise remember that this approach doesn't work for NoSQL databases like MongoDB where you must truly implement the aggregate pattern). + +## See Also + +* [Best practice guide to design the entities](Best-Practices/Entities.md) \ No newline at end of file diff --git a/docs/en/Entity-Framework-Core.md b/docs/en/Entity-Framework-Core.md index 9d29f58fd2..586c8d4a01 100644 --- a/docs/en/Entity-Framework-Core.md +++ b/docs/en/Entity-Framework-Core.md @@ -193,7 +193,7 @@ public class BookRepository : EfCoreRepository, public async Task DeleteBooksByType(BookType type) { - await DbContext.Database.ExecuteSqlCommandAsync( + await DbContext.Database.ExecuteSqlRawAsync( $"DELETE FROM Books WHERE Type = {(int)type}" ); } diff --git a/docs/en/Modules/Audit-Logging.md b/docs/en/Modules/Audit-Logging.md index a0c32699a5..922f99284b 100644 --- a/docs/en/Modules/Audit-Logging.md +++ b/docs/en/Modules/Audit-Logging.md @@ -1,3 +1,7 @@ # Audit Logging Module -TODO \ No newline at end of file +The Audit Logging Module basically implements the `IAuditingStore` to save the audit log objects to a database. + +> Audit Logging module is already installed and configured for [the startup templates](../Startup-Templates/Index.md). So, most of the times you don't need to manually add this module to your application. + +See [the audit logging system](../Audit-Logging.md) document for more about the audit logging. \ No newline at end of file diff --git a/docs/en/Modules/Docs.md b/docs/en/Modules/Docs.md index 6859caa7fa..c42a3c2bcc 100644 --- a/docs/en/Modules/Docs.md +++ b/docs/en/Modules/Docs.md @@ -16,7 +16,7 @@ Docs module is an application module and does not offer any hosting solution. Yo When you use GitHub to store your docs, Docs Module supports versioning. If you have multiple versions for your docs, there will be a combo-box on the UI to switch between versions. If you choose file system to store your docs, it does not support multiple versions. -[The documents](https://abp.io/documents/) for ABP framework is also using this module. +[The documents](docs.abp.io) for ABP framework is also using this module. > Docs module follows the [module architecture best practices](../Best-Practices/Module-Architecture.md) guide. @@ -447,7 +447,7 @@ For example, [en/docs-params.json](https://github.com/abpio/abp-commercial-docs/ Since not every single document in your projects may not have sections or may not need all of those parameters, you have to declare which of those parameters will be used for sectioning the document, as a JSON block anywhere on the document. -For example [Getting-Started.md](https://github.com/abpio/abp-commercial-docs/blob/master/en/Getting-Started.md): +For example [Getting-Started.md](https://github.com/abpio/abp-commercial-docs/blob/master/en/getting-started.md): ``` ..... @@ -466,7 +466,7 @@ For example [Getting-Started.md](https://github.com/abpio/abp-commercial-docs/bl This section will be automatically deleted during render. And f course, those key values must match with the ones in **Parameter document**. -![Interface](..\images\docs-section-ui.png) +![Interface](../images/docs-section-ui.png) Now you can use **Scriban** syntax to create sections in your document. diff --git a/docs/en/Modules/Index.md b/docs/en/Modules/Index.md index 8616ed2281..812f22e8dd 100644 --- a/docs/en/Modules/Index.md +++ b/docs/en/Modules/Index.md @@ -11,16 +11,20 @@ There are **two types of modules.** They don't have any structural difference bu There are some **free and open source** application modules developed and maintained by the ABP community: -* **Account**: Used to make user login/register to the application. -* **Audit Logging**: Used to persist audit logs to a database. -* **Background Jobs**: Used to persist background jobs when using default background job manager. -* **Blogging**: Used to create fancy blogs. ABP's [own blog](https://abp.io/blog/abp/) already using this module. +* **Account**: Provides UI for the account management and allows user to login/register to the application. +* [**Audit Logging**](Audit-Logging.md): Persists audit logs to a database. +* **Background Jobs**: Persist background jobs when using the default background job manager. +* **Blogging**: Used to create fancy blogs. ABP's [own blog](https://blog.abp.io/) already using this module. * [**Docs**](Docs.md): Used to create technical documentation pages. ABP's [own documentation](https://docs.abp.io) already using this module. -* **Identity**: Used to manage roles, users and their permissions. +* **Identity**: Manages roles, users and their permissions, based on the Microsoft Identity library. * **IdentityServer**: Integrates to IdentityServer4. * **Permission Management**: Used to persist permissions. * **[Setting Management](Setting-Management.md)**: Used to persist and manage the [settings](../Settings.md). -* **Tenant Management**: Used to manage tenants for a [multi-tenant](../Multi-Tenancy.md) application. -* **Users**: Used to abstract users, so other modules can depend on this instead of the Identity module. +* **Tenant Management**: Manages tenants for a [multi-tenant](../Multi-Tenancy.md) application. +* **Users**: Abstract users, so other modules can depend on this module instead of the Identity module. -Documenting the modules is in the progress. See [this repository](https://github.com/abpframework/abp/tree/master/modules) for source code of all modules. +See [the GitHub repository](https://github.com/abpframework/abp/tree/master/modules) for source code of all modules. + +## Commercial Application Modules + +[ABP Commercial](https://commercial.abp.io/) license provides additional pre-built application modules on top of the ABP framework. See the [module list](https://commercial.abp.io/modules) provided by the ABP Commercial. \ No newline at end of file diff --git a/docs/en/Modules/Setting-Management.md b/docs/en/Modules/Setting-Management.md index c64f1014ca..134e24aed2 100644 --- a/docs/en/Modules/Setting-Management.md +++ b/docs/en/Modules/Setting-Management.md @@ -67,6 +67,8 @@ namespace Demo So, you can get or set a setting value for different setting value providers (Default, Global, User, Tenant... etc). +> Use the `ISettingProvider` instead of the `ISettingManager` if you only need to read the setting values, because it implements caching and supports all deployment scenarios. You can use the `ISettingManager` if you are creating a setting management UI. + ### Setting Cache Setting values are cached using the [distributed cache](../Caching.md) system. Always use the `ISettingManager` to change the setting values which manages the cache for you. diff --git a/docs/en/Multi-Tenancy.md b/docs/en/Multi-Tenancy.md index 00f51d430d..26b28b0ad7 100644 --- a/docs/en/Multi-Tenancy.md +++ b/docs/en/Multi-Tenancy.md @@ -98,7 +98,7 @@ The first thing for a multi-tenant application is to determine the current tenan ##### Custom Tenant Resolvers -You can add your custom tenant resolver to **TenantResolveOptions** in your module's ConfigureServices method as like below: +You can add your custom tenant resolver to **AbpTenantResolveOptions** in your module's ConfigureServices method as like below: ````C# using Microsoft.Extensions.DependencyInjection; @@ -112,7 +112,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.TenantResolvers.Add(new MyCustomTenantResolveContributor()); }); @@ -323,7 +323,7 @@ services.Configure(options => ##### Domain Tenant Resolver -In a real application, most of times you will want to determine current tenant either by subdomain (like mytenant1.mydomain.com) or by the whole domain (like mytenant.com). If so, you can configure TenantResolveOptions to add a domain tenant resolver. +In a real application, most of times you will want to determine current tenant either by subdomain (like mytenant1.mydomain.com) or by the whole domain (like mytenant.com). If so, you can configure AbpTenantResolveOptions to add a domain tenant resolver. ###### Example: Add a subdomain resolver @@ -340,7 +340,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { //Subdomain format: {0}.mydomain.com (adding as the highest priority resolver) options.TenantResolvers.Insert(0, new DomainTenantResolver("{0}.mydomain.com")); diff --git a/docs/en/Repositories.md b/docs/en/Repositories.md index e6b55cb3de..6a60c58278 100644 --- a/docs/en/Repositories.md +++ b/docs/en/Repositories.md @@ -52,7 +52,6 @@ Generic Repositories provides some standard CRUD features out of the box: * Provides `Update` and `Delete` methods to update or delete an entity by entity object or it's id. * Provides `Delete` method to delete multiple entities by a filter. * Implements `IQueryable`, so you can use LINQ and extension methods like `FirstOrDefault`, `Where`, `OrderBy`, `ToList` and so on... -* Have **sync** and **async** versions for all methods. ### Basic Repositories diff --git a/docs/en/Tutorials/Angular/Part-I.md b/docs/en/Tutorials/Angular/Part-I.md index 46368eeecb..6d5f91bce7 100644 --- a/docs/en/Tutorials/Angular/Part-I.md +++ b/docs/en/Tutorials/Angular/Part-I.md @@ -343,7 +343,7 @@ Run `yarn start`, wait Angular to run the application and open `http://localhost Open the `app-routing.module.ts` and replace `books` as shown below: ```js -import { ApplicationLayoutComponent } from '@abp/ng.theme.basic';- +import { ApplicationLayoutComponent } from '@abp/ng.theme.basic'; //... { diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md index d113442af9..a1fbd1de54 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md @@ -50,6 +50,20 @@ namespace Acme.BookStore public DateTime PublishDate { get; set; } public float Price { get; set; } + + protected Book() + { + + } + + public Book(Guid id, string name, BookType type, DateTime publishDate, float price) + :base(id) + { + Name = name; + Type = type; + PublishDate = publishDate; + Price = price; + } } } ```` @@ -345,7 +359,7 @@ Open the `Index.cshtml` and change the content as shown below: ```` * This code changes the default inheritance of the Razor View Page Model so it **inherits** from the `BookStorePage` class (instead of `PageModel`). The `BookStorePage` class which comes with the startup template and provides some shared properties/methods used by all pages. -* Ensure that the `IndexModel` (*Index.cshtml.cs)* has the `Acme.BookStore.Pages.Books` namespace, or update it in the `Index.cshtml`. +* Ensure that the `IndexModel` (*Index.cshtml.cs)* has the `Acme.BookStore.Web.Pages.Books` namespace, or update it in the `Index.cshtml`. #### Add Books Page to the Main Menu @@ -422,7 +436,7 @@ Change the `Pages/Books/Index.cshtml` as following: ```` * `abp-script` [tag helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/intro) is used to add external **scripts** to the page. It has many additional features compared to standard `script` tag. It handles **minification** and **versioning** for example. See the [bundling & minification document](../../AspNetCore/Bundling-Minification.md) for details. -* `abp-card` and `abp-table` are **tag helpers** for Twitter Bootstrap's [card component](http://getbootstrap.com/docs/4.1/components/card/). There are many tag helpers in ABP to easily use most of the [bootstrap](https://getbootstrap.com/) components. You can also use regular HTML tags instead of these tag helpers, but using tag helpers reduces HTML code and prevents errors by help of the intellisense and compile time type checking. See the [tag helpers document](../../AspNetCore/Tag-Helpers.md). +* `abp-card` and `abp-table` are **tag helpers** for Twitter Bootstrap's [card component](http://getbootstrap.com/docs/4.1/components/card/). There are many tag helpers in ABP to easily use most of the [bootstrap](https://getbootstrap.com/) components. You can also use regular HTML tags instead of these tag helpers, but using tag helpers reduces HTML code and prevents errors by help of the intellisense and compile time type checking. See the [tag helpers document](../../AspNetCore/Tag-Helpers/Index.md). * You can **localize** the column names in the localization file as you did for the menu items above. ##### Add a Script File diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md index 1e3ec1f539..505de55adc 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md @@ -421,7 +421,8 @@ $(function () { Open the `en.json` in the `Acme.BookStore.Domain.Shared` project and add the following line: ````json -"BookDeletionConfirmationMessage": "Are you sure to delete the book {0}?" +"BookDeletionConfirmationMessage": "Are you sure to delete the book {0}?", +"SuccessfullyDeleted": "Successfully deleted" ```` Run the application and try to delete a book. diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-III.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-III.md index b115eb27ea..f207d9df0c 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-III.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-III.md @@ -57,25 +57,11 @@ namespace Acme.BookStore public async Task SeedAsync(DataSeedContext context) { await _bookRepository.InsertAsync( - new Book - { - Id = _guidGenerator.Create(), - Name = "Test book 1", - Type = BookType.Fantastic, - PublishDate = new DateTime(2015, 05, 24), - Price = 21 - } + new Book(_guidGenerator.Create(), "Test book 1", BookType.Fantastic, new DateTime(2015, 05, 24), 21) ); await _bookRepository.InsertAsync( - new Book - { - Id = _guidGenerator.Create(), - Name = "Test book 2", - Type = BookType.Science, - PublishDate = new DateTime(2014, 02, 11), - Price = 15 - } + new Book(_guidGenerator.Create(), "Test book 2", BookType.Science, new DateTime(2014, 02, 11), 15) ); } } diff --git a/docs/pt-BR/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/pt-BR/Tutorials/AspNetCore-Mvc/Part-II.md index 7e6471d3ed..ef2c28f1f1 100644 --- a/docs/pt-BR/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/pt-BR/Tutorials/AspNetCore-Mvc/Part-II.md @@ -454,7 +454,8 @@ $(function () { Abra o `en.json`no `Acme.BookStore.Domain.Shared`projeto e adicione a seguinte linha: ```json -"BookDeletionConfirmationMessage": "Are you sure to delete the book {0}?" +"BookDeletionConfirmationMessage": "Are you sure to delete the book {0}?", +"SuccessfullyDeleted": "Successfully deleted" ``` diff --git a/docs/zh-Hans/Background-Jobs-Hangfire.md b/docs/zh-Hans/Background-Jobs-Hangfire.md index 5ef9aad32d..d35d8482ca 100644 --- a/docs/zh-Hans/Background-Jobs-Hangfire.md +++ b/docs/zh-Hans/Background-Jobs-Hangfire.md @@ -1,3 +1,43 @@ -# Hangfire Background Job Manager +# Hangfire后台作业管理 -待添加 \ No newline at end of file +[Hangfire](https://www.hangfire.io/)是一个高级的后台作业管理. 你可以用ABP框架集成Hangfire代替[默认后台作业管理](Background-Jobs.md). 通过这种方式你可以使用相同的后台作业API,将你的代码独立于Hangfire. 如果你喜欢也可以直接使用Hangfire的API. + +> 参阅[后台作业文档](Background-Jobs.md),学习如何使用后台作业系统. 本文只介绍了如何安装和配置Hangfire集成. + +## 安装 + +建议使用[ABP CLI](CLI.md)安装包. + +### 使用ABP CLI + +在项目的文件夹(.csproj文件)中打开命令行窗口输入以下命令: + +````bash +abp add-package Volo.Abp.BackgroundJobs.HangFire +```` + +### 手动安装 + +如果你想手动安装; + +1. 添加 [Volo.Abp.BackgroundJobs.HangFire](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.HangFire) NuGet包添加到你的项目: + + ```` + Install-Package Volo.Abp.BackgroundJobs.HangFire + ```` + +2. 添加 `AbpBackgroundJobsHangfireModule` 到你的模块的依赖列表: + +````csharp +[DependsOn( + //...other dependencies + typeof(AbpBackgroundJobsHangfireModule) //Add the new module dependency + )] +public class YourModule : AbpModule +{ +} +```` + +## 配置 + +TODO... \ No newline at end of file diff --git a/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/Post.md b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/Post.md new file mode 100644 index 0000000000..b996bf23d3 --- /dev/null +++ b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/Post.md @@ -0,0 +1,164 @@ +# ABP框架v2.0 和 ABP商业版 + +ABP框架2.0版已经在本周公布.这篇文章解释了为什么我们发布了一个**抢先主版本**,和2.0版本中的变化. + +除了v2.0版本,我们很高兴地宣布**ABP商业版**,这是建立在开源ABP框架的之上的一套专业的模块,工具,主题和服务. + +## ABP框架V2.0 + +### 为什么2.0,而不是1.2? + +本来在[V1.1.2](https://github.com/abpframework/abp/releases/tag/1.1.2)发布后计划发布1.2版.然而,[有报告](https://github.com/abpframework/abp/issues/2026)称1.x版在Linux上有一些**性能**和**稳定性**问题,尤其是当应用程序部署在**低配CPU和内存**的**Linux**容器上. + +我们深入研究了这一问题,并已查明问题的根本原因与**拦截`async`方法**的实现有关.此外,也有一些 **`async`套`sync`** 的用法影响了线程池的优化. + +最后,在**社区**在大力协助下我们**解决了所有的问题**.但是,我们也有一些重要的**设计决策**导致了一些**破坏性变更**,因为[语义版本](https://semver.org/),我们不得不改变框架的主版号. + +大多数的应用程序不会受到[破坏性变更](https://github.com/abpframework/abp/releases)的影响,或者只需要做一些微小的修改. + +### 破坏性变更 + +#### 删除了一些同步的API + +一些拦截器需要使用`async`的API.当他们拦截`sync`方法时,他们需要调用`async`套`sync`.这最终导致了`async`套`sync`的问题.这就是为什么我们[删除了一些同步的API](https://github.com/abpframework/abp/pull/2464). + +当你需要**在`async`方法中调用`sync`方法**时, **`async`套`sync`** 这种模式是`C#`一个经典问题.虽然有一些解决方法,但是都有相应的**缺点**,并建议**不要写**这样的代码.你可以在网上找到关于这一话题的许多文档. + +为了避免这个问题,我们已经移除: + +- `sync`[仓储](https://docs.abp.io/en/abp/latest/Repositories)方法 (如`insert`, `update`, 等...), +- `sync`[工作单元](https://docs.abp.io/en/abp/latest/Unit-Of-Work)API, +- `sync`[后台作业](https://docs.abp.io/en/abp/latest/Background-Jobs)API, +- `sync`[审计日志](https://docs.abp.io/en/abp/latest/Audit-Logging)API, + - 其他一些很少使用的`sync`API. + +如果你遇到了编译错误,只需使用这些API的`async`版本. + +#### 始终async! + +从v2.0开始,ABP框架假设你以`async`方式编写你的应用程序代码.否则,一些框架的功能可能无法正常工作. + +建议你的所有[应用服务](https://docs.abp.io/en/abp/latest/Application-Services), [仓储方法](https://docs.abp.io/en/abp/latest/Repositories), 控制器动作(ontroller actions), 页面处理器(page handlers)都是`async`. + +即使你的应用服务方法并不需要是`async`,也将其设置为`async`,因为拦截器需要执行`async`操作(授权,工作单元等).你可以在不调用`async`的方法中返回`Task.Completed`. + +示例: + +````csharp +public Task GetValueAsync() +{ + //这个方法没有任何async调用 + return Task.CompletedTask(42); +} +```` + +上述例子通常并不需要是`async`因为它不执行`async`调用.然而,将它设置为`async`,这样可以帮助ABP框架运行拦截器时避免出现`async`套sync的调用. + +此规则不强制你写的每一个方法都是`async`.这样并不好而且很乏味.只在拦截的服务上需要(特别是[应用服务](https://docs.abp.io/en/abp/latest/Application-Services)和[仓库方法](https://docs.abp.io/en/abp/latest/Repositories)) + +#### 其他破坏性变更 + +查看[发行说明](https://github.com/abpframework/abp/releases/tag/2.0.0)中的破坏性变更.他们中的大多数都不会影响你的应用程序代码. + +### 新功能 + +本次发布还包含一些新的功能和一堆改进: + +- [#2597](https://github.com/abpframework/abp/pull/2597) 新的`Volo.Abp.AspNetCore.Serilog`包. +- [#2526](https://github.com/abpframework/abp/issues/2526) `C#`客户端代理的客户端验证. +- [#2374](https://github.com/abpframework/abp/issues/2374) `async`后台作业. +- [#265](https://github.com/abpframework/abp/issues/265) 管理应用程序关闭. +- [#2472](https://github.com/abpframework/abp/issues/2472) `IdentityServer`模块实现`DeviceFlowCodes`和`TokenCleanupService`. + +功能,改进和BUG修复的完整列表, 请查看[发布说明](https://github.com/abpframework/abp/releases/tag/2.0.0). + +### 文档 + +随着v2.0的发布,我们也完成了一些缺少的文档.在接下来的几周内,我们将主要关注文档和教程. + +## ABP商业版 + +[ABP商业版](https://commercial.abp.io/)是建立在开源ABP框架之上的一套专业的**模块,工具,主题和服务**. + + - 除了ABP框架免费和[开源模块](https://docs.abp.io/en/abp/latest/Modules/Index)之外, 提供[专业模块](https://commercial.abp.io/modules). +- 包含一个漂亮的[UI主题](https://commercial.abp.io/themes), 具有5种不同的样式. +- 提供[ABP套件](https://commercial.abp.io/tools/suite); 一个让开发更具有生产力的工具. 通过配置实体属性, 它可以在几秒内创建全栈的CRUD页面. 更多的功能陆续开发中. +- 为企业提供[高级支持](ttps://commercial.abp.io/support). + +除了这些标准的功能,我们会将提供定制服务.更多细节请参见[commercial.abp.io](https://commercial.abp.io/)网站. + +### ABP框架 vs ABP商业版 + +ABP商业版**不是付费版本**的ABP框架.可以把它当作为专业公司提供的**附加套餐**.你可以用它来节省时间和更快地开发产品. + +ABP框架将永远是**开源免费**的! + +一个原则是,我们创建的主要基础设施作为开源产品, 然后销售额外的预制应用程序功能,主题和工具.类似于[ASP.NET Boilerplate](https://aspnetboilerplate.com/)和[ASP.NET Zero](https://aspnetzero.com/)产品. + +购买商业版许可极大地节省你的时间和精力,你可以专注于自己的业务,此外也可获得专门的和优先的支持.同时,你也在支持ABP核心团队,因为我们花了大部分时间来开发,维护和支持开源的ABP框架. + +有了ABP商业版,ABP现在变为一个平台.我们称之为**ABP.IO平台**, 其中包括开源ABP框架和ABP商业版. + +### 演示 + +如果你想知道ABP商业版应用程序的启动模板是什么样,你可以很容易地[创建一个演示](https://commercial.abp.io/demo),并看到它的实际效果.该演示包括所有的预制模块和主题. + +下面是一张IdentityServer管理模块UI的截图: + +![abp-commercial-demo](abp-commercial-demo.png) + +这是一张来自使用material设计风格主题的演示应用程序的截图: + +![lepton-theme-material](lepton-theme-material.png) + +### 价格 + +你可以创建**无限个工程/产品**, 销售给**无限个客户**, 部署在**无限台服务器上**, 不受任何限制. 定价主要是基于**开发人员个数**,**支持等级**和**源代码**需求上.有三个标准包; + +- **团队许可**: 包括所有的模块,主题和工具.允许最多3个开发者开发产品.可购买额外的开发者许可. +- **商业许可**: 允许下载所有的模块和主题的源代码.此外,默认包含了5个开发者许可.可购买额外的开发者许可. +- **企业许可**: 在商业许可上, 提供无限的专属支持. + +请查看[价格页面](https://commercial.abp.io/pricing)了解详细信息.除了标准包以外,我们也提供定制服务和定制许可.如有任何问题,请[联系我们](https://commercial.abp.io/contact). + +#### 许可比较 + +许可价格是根据开发者数量,支持等级和源代码访问而变化的. + +##### 源代码 + +团队许可证不包括预制模块和主题的源代码.以**NuGet和NPM包**的方式使用所有这些模块.通过这种方式,你可以很容易地通过更新包的依赖得到**新功能和bug修复**仅.但是不能访问其源代码.所以不能嵌入模块的源代码到你的应用程序里,和随意修改源代码. + +预制模块提供一定等级的**定制**和**扩展**,并允许你覆盖服务,UI部分等.我们正在努力使他们更加可定制和可扩展.如果你无需在预制模块中做很大修改的话,团队许可是你理想的选择,因为它更便宜,并且可轻松获得新的功能和bug修复. + +商业和企业许可允许你在需要时**下载任何模块和主题的源代码**.它们使用与团队许可相同的启动模板,所以所有的模块都默认使用`NuGet`和`NPM`包.但是,在需要的情况下,你可以从一个模块中删除包的依赖,并嵌入它的源代码到你自己的解决方案中,然后完全定制它.在这种情况下,当一个新版本可用时, 升级模块将不会那么容易.当然, 你不必升级!但是,如果你愿意,你也可以使用一些合并工具或Git的分支系统来做到这一点. + +#### 许可周期 + +ABP商业版许可是**永久的**,这意味着你可以**永远使用**它继续开发应用程序. + +但是,下面的服务周期为一年: + +- 高级**支持**一年后结束.你可以继续得到社区支持. +- 一年后将不会得到模块和主题的**更新**.你可以继续使用最后获得的版本.甚至可以在主版本内得到BUG修复和改进. +- 你可使用**ABP套件**一年. + +如果想继续获得这些好处,可延长许可期限.续订价格比正常价格低20%. + +## NDC London 2020 + +与[去年](https://medium.com/volosoft/impressions-of-ndc-london-2019-f8f391bb7a9c)一样, 我们是著名的软件开发会议[NDC London](https://ndc-london.com/)的合作伙伴! 去年, 我们开展了[ASP.NET Boilerplate](https://aspnetboilerplate.com/)和[ASP.NET Zero](https://aspnetzero.com/)主题: + +![ndc-london-volosoft](ndc-london-volosoft.png) + +今年,我们将着重于**ABP.IO平台**(开源ABP框架和ABP商业版).我们的展位会是这样的: + +![ndc-london-volosoft](ndc-2020-volosoft-booth-wall.png) + +如果你参加会议,记得要参观我们的展位.我们将很高兴来谈一谈ABP平台的功能,目标和软件开发. + +### 你想见ABP团队吗? + +如果你在伦敦, 而且想和我们喝杯咖啡的话, 在2月1日的下午[@hibrahimkalkan](https://twitter.com/hibrahimkalkan)和[@ismcagdas](https://twitter.com/ismcagdas)会在那. + +想见面就给info@abp.io写个邮件 :) \ No newline at end of file diff --git a/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/abp-commercial-demo.png b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/abp-commercial-demo.png new file mode 100644 index 0000000000..caddce27ab Binary files /dev/null and b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/abp-commercial-demo.png differ diff --git a/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/lepton-theme-material.png b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/lepton-theme-material.png new file mode 100644 index 0000000000..72cb5c0639 Binary files /dev/null and b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/lepton-theme-material.png differ diff --git a/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/ndc-2020-volosoft-booth-wall.png b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/ndc-2020-volosoft-booth-wall.png new file mode 100644 index 0000000000..70fb9d54f7 Binary files /dev/null and b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/ndc-2020-volosoft-booth-wall.png differ diff --git a/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/ndc-london-volosoft.png b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/ndc-london-volosoft.png new file mode 100644 index 0000000000..afaed37a7a Binary files /dev/null and b/docs/zh-Hans/Blog-Posts/2020-01-15 v2_0_Release/ndc-london-volosoft.png differ diff --git a/docs/zh-Hans/Entity-Framework-Core-MySQL.md b/docs/zh-Hans/Entity-Framework-Core-MySQL.md new file mode 100644 index 0000000000..5f9d8023ab --- /dev/null +++ b/docs/zh-Hans/Entity-Framework-Core-MySQL.md @@ -0,0 +1,58 @@ +# 切换到EF Core MySql提供程序 + +本文介绍如何将预配置为SqlServer提供程序的 **[应用程序启动模板](Startup-Templates/Application.md)** 切换到 **MySql** 数据库提供程序 + +## 替换Volo.Abp.EntityFrameworkCore.SqlServer包 + +解决方案中的 `.EntityFrameworkCore` 项目依赖于 [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer) NuGet包. 删除这个包并且添加相同版本的 [Volo.Abp.EntityFrameworkCore.MySQL](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.MySQL) 包. + +## 替换模块依赖项 + +在 `.EntityFrameworkCore` 项目中找到 **YourProjectName*EntityFrameworkCoreModule** 类, 删除 `DependsOn` attribute 上的`typeof(AbpEntityFrameworkCoreSqlServerModule)`, 添加 `typeof(AbpEntityFrameworkCoreMySQLModule)` (或者替换 `using Volo.Abp.EntityFrameworkCore.SqlServer;` 为 `using Volo.Abp.EntityFrameworkCore.MySQL;`). + +## UseMySQL() + +查找你的解决方案中 `UseSqlServer()`调用,替换为 `UseMySQL()`. 检查下列文件: + +* `.EntityFrameworkCore` 项目中的*YourProjectName*EntityFrameworkCoreModule.cs. +* `.EntityFrameworkCore` 项目中的*YourProjectName*MigrationsDbContextFactory.cs. + +> 根据你的解决方案的结构,你可能发现更多需要改变代码的文件. + +## 更改连接字符串 + +MySQL连接字符串与SQL Server连接字符串不同. 所以检查你的解决方案中所有的 `appsettings.json` 文件,更改其中的连接字符串. 有关MySQL连接字符串选项的详细内容请参见[connectionstrings.com](https://www.connectionstrings.com/mysql/). + +通常需要更改 `.DbMigrator` 和 `.Web` 项目里面的 `appsettings.json` ,但它取决于你的解决方案结构. + +## 更改迁移DbContext + +MySQL DBMS与SQL Server有一些细微的差异. 某些模块数据库映射配置(尤其是字段长度)会导致MySQL出现问题. 例如某些[IdentityServer模块](Modules/IdentityServer.md)表就存在这样的问题,它提供了一个选项可以根据您的DBMS配置字段. + +启动模板包含*YourProjectName*MigrationsDbContext,它负责维护和迁移数据库架构. 此DbContext基本上调用依赖模块的扩展方法来配置其数据库表. + +打开 *YourProjectName*MigrationsDbContext 更改 `builder.ConfigureIdentityServer();` 行,如下所示: + +````csharp +builder.ConfigureIdentityServer(options => +{ + options.DatabaseProvider = EfCoreDatabaseProvider.MySql; +}); +```` + +然后 `ConfigureIdentityServer()` 方法会将字段长度设置为不超过MySQL的限制. 如果在创建或执行数据库迁移时遇到任何问题请参考相关的模块文档. + +## 重新生成迁移 + +启动模板使用[Entity Framework Core的Code First迁移](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/). EF Core迁移取决于所选的DBMS提供程序. 因此更改DBMS提供程序会导致迁移失败. + +* 删除 `.EntityFrameworkCore.DbMigrations` 项目下的Migrations文件夹,并重新生成解决方案. +* 在包管理控制台中运行 `Add-Migration "Initial"`(在解决方案资源管理器选择 `.DbMigrator` (或 `.Web`) 做为启动项目并且选择 `.EntityFrameworkCore.DbMigrations` 做为默认项目). + +这将创建一个配置所有数据库对象(表)的数据库迁移. + +运行 `.DbMigrator` 项目创建数据库和初始种子数据. + +## 运行应用程序 + +它已准备就绪, 只需要运行该应用程序与享受编码. diff --git a/docs/zh-Hans/Entity-Framework-Core-Other-DBMS.md b/docs/zh-Hans/Entity-Framework-Core-Other-DBMS.md new file mode 100644 index 0000000000..943667eb55 --- /dev/null +++ b/docs/zh-Hans/Entity-Framework-Core-Other-DBMS.md @@ -0,0 +1,90 @@ +# 切换到EF Core 其它DBMS提供程序 + +**[应用程序启动模板](Startup-Templates/Application.md)** 为EF Core预配置了Sql Server提供程序,EF Core支持许多其它DBMS,你可以在基于ABP的应用程序使用它们. + +ABP框架为一些常见的DMBS提供了简化配置的集成包(有关可用集成包的列表,请参阅[EF Core文档](Entity-Framework-Core.md)),你也可以不使用集成包配置DBMS提供程序. + +虽然总是建议使用集成包(它也使不同模块之间的依赖版本成为标准版本),但是如果没有用于DBMS提供程序的集成包,也可以手动集成. + +本文介绍了如何在不使用[MySQL集成包](Entity-Framework-Core-MySQL.md)的情况下切换到MySQL. + +## 替换SQL Server依赖 + +* 删除 `.EntityFrameworkCore` 项目依赖的 [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer) NuGet 包. +* 添加 [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/) NuGet 包到 `.EntityFrameworkCore` 项目. + +## 删除模块依赖项 + +从 ***YourProjectName*EntityFrameworkCoreModule** 类的依赖列表中删除`AbpEntityFrameworkCoreSqlServerModule`. + +## 更改UseSqlServer()调用 + +在*YourProjectName*EntityFrameworkCoreModule类中找到以下代码: + +````csharp +Configure(options => +{ + options.UseSqlServer(); +}); +```` + +替换成以下代码: + +````csharp +Configure(options => +{ + options.Configure(ctx => + { + if (ctx.ExistingConnection != null) + { + ctx.DbContextOptions.UseMySql(ctx.ExistingConnection); + } + else + { + ctx.DbContextOptions.UseMySql(ctx.ConnectionString); + } + }); +}); +```` + +* 调用的 `UseMySql` 代码是在 Pomelo.EntityFrameworkCore.MySql 包中定义的,方法还有附加选项,如果需要可以使用它. +* 这段代码首先检查当前请求中是否存在到相同数据库的现有(活动)连接,并在可能的情况下重用它. 这允许在不同的DbContext类型之间共享单个事务. ABP处理其余的事情. +* 如果没有活动的连接,它将把 `ctx.ConnectionString` 传递给UseMySql(这将创建新的数据库连接). 这里使用 `ctx.ConnectionString` 很重要. 不要传递静态连接字符串(或配置中的连接字符串). 因为ABP在多数据库或[多租户](Multi-Tenancy.md)环境中[动态确定正确的连接字符串](Connection-Strings.md). + +## 更改连接连接字符串 + +MySQL连接字符串与SQL Server连接字符串不同. 所以检查你的解决方案中所有的 `appsettings.json` 文件,更改其中的连接字符串. 有关MySQL连接字符串选项的详细内容请参见[connectionstrings.com](https://www.connectionstrings.com/mysql/). + +通常需要更改 `.DbMigrator` 和 `.Web` 项目里面的 `appsettings.json` ,但它取决于你的解决方案结构. + +## 更改迁移DbContext + +MySQL DBMS与SQL Server有一些细微的差异. 某些模块数据库映射配置(尤其是字段长度)会导致MySQL出现问题. 例如某些[IdentityServer模块](Modules/IdentityServer.md)表就存在这样的问题,它提供了一个选项可以根据您的DBMS配置字段. + +启动模板包含*YourProjectName*MigrationsDbContext,它负责维护和迁移数据库架构. 此DbContext基本上调用依赖模块的扩展方法来配置其数据库表. + +打开 *YourProjectName*MigrationsDbContext 更改 `builder.ConfigureIdentityServer();` 行,如下所示: + +````csharp +builder.ConfigureIdentityServer(options => +{ + options.DatabaseProvider = EfCoreDatabaseProvider.MySql; +}); +```` + +然后 `ConfigureIdentityServer()` 方法会将字段长度设置为超过MySQL的限制. 如果在创建或执行数据库迁移时遇到任何问题请参考相关的模块文档. + +## 重新生成迁移 + +启动模板使用[Entity Framework Core的Code First迁移](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/). EF Core迁移取决于所选的DBMS提供程序. 因此更改DBMS提供程序会导致迁移失败. + +* 删除 `.EntityFrameworkCore.DbMigrations` 项目下的Migrations文件夹,并重新生成解决方案. +* 在包管理控制台中运行 `Add-Migration "Initial"`(在解决方案资源管理器选择 `.DbMigrator` (或 `.Web`) 做为启动项目并且选择 `.EntityFrameworkCore.DbMigrations` 做为默认项目). + +这将创建一个配置所有数据库对象(表)的数据库迁移. + +运行 `.DbMigrator` 项目创建数据库和初始种子数据. + +## 运行应用程序 + +它已准备就绪, 只需要运行该应用程序与享受编码. \ No newline at end of file diff --git a/docs/zh-Hans/Entity-Framework-Core-PostgreSQL.md b/docs/zh-Hans/Entity-Framework-Core-PostgreSQL.md index 388367481f..bb1de20207 100644 --- a/docs/zh-Hans/Entity-Framework-Core-PostgreSQL.md +++ b/docs/zh-Hans/Entity-Framework-Core-PostgreSQL.md @@ -1,35 +1,41 @@ -## Entity Framework Core PostgreSQL 集成 +# 切换到EF Core PostgreSQL提供程序 -> 参阅 [Entity Framework Core 集成文档](../Entity-Framework-Core.md) 了解集成EF Core的基础知识. +本文介绍如何将预配置为SqlServer提供程序的 **[应用程序启动模板](Startup-Templates/Application.md)** 切换到 **PostgreSQL** 数据库提供程序 -### 更新 EntityFrameworkCore 项目 +## 替换Volo.Abp.EntityFrameworkCore.SqlServer包 -- 在 `Acme.BookStore.EntityFrameworkCore` 中将包 `Volo.Abp.EntityFrameworkCore.SqlServer` 替换为 `Volo.Abp.EntityFrameworkCore.PostgreSql` -- 打开 `BookStoreEntityFrameworkCoreModule` 模块类 - - 将 `AbpEntityFrameworkCoreSqlServerModule` 替换为 `AbpEntityFrameworkCorePostgreSqlModule` - - 将 `options.UseSqlServer()` 替换为 `options.UsePostgreSql()` -- 在其他的项目中将 `appsetting.json` 文件中的连接字符串更新为PostgreSQL链接字符串 +解决方案中的 `.EntityFrameworkCore` 项目依赖于 [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer) NuGet包. 删除这个包并且添加相同版本的 [Volo.Abp.EntityFrameworkCore.PostgreSql](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.PostgreSql) 包. -#### 删除现有迁移 +## 替换模块依赖项 -删除所有的现有迁移文件 (包括 `DbContextModelSnapshot`) +在 `.EntityFrameworkCore` 项目中找到 **YourProjectName*EntityFrameworkCoreModule** 类, 删除 `DependsOn` attribute 上的`typeof(AbpEntityFrameworkCoreSqlServerModule)`, 添加 `typeof(AbpEntityFrameworkCorePostgreSqlModule)` (或者替换 `using Volo.Abp.EntityFrameworkCore.SqlServer;` 为 `using Volo.Abp.EntityFrameworkCore.PostgreSql;`). -![postgresql-delete-initial-migrations](images/postgresql-delete-initial-migrations.png) +## UsePostgreSql() -#### 生成生成迁移并更新数据库 +查找你的解决方案中 `UseSqlServer()`调用,替换为 `UsePostgreSql()`. 检查下列文件: -设置正确的启动项目 (通常是Web项目), -打开 **程序包管理器控制台** (工具 -> Nuget包管理器 -> 程序包管理器控制台), 选择 `Acme.BookStore.EntityFrameworkCore.DbMigrations` 做为 **默认项目** 并执行以下命令: +* `.EntityFrameworkCore` 项目中的*YourProjectName*EntityFrameworkCoreModule.cs. +* `.EntityFrameworkCore` 项目中的*YourProjectName*MigrationsDbContextFactory.cs. -运行 `Add-Migration` 命令. -```` -PM> Add-Migration Initial -```` +> 根据你的解决方案的结构,你可能发现更多需要改变代码的文件. -然后执行 `Update-Database` 执行更新数据库: +## 更改连接字符串 -```` -PM> Update-Database -```` +PostgreSql连接字符串与SQL Server连接字符串不同. 所以检查你的解决方案中所有的 `appsettings.json` 文件,更改其中的连接字符串. 有关PostgreSql连接字符串选项的详细内容请参见[connectionstrings.com](https://www.connectionstrings.com/postgresql/). -![postgresql-update-database](images/postgresql-update-database.png) +通常需要更改 `.DbMigrator` 和 `.Web` 项目里面的 `appsettings.json` ,但它取决于你的解决方案结构. + +## 重新生成迁移 + +启动模板使用[Entity Framework Core的Code First迁移](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/). EF Core迁移取决于所选的DBMS提供程序. 因此更改DBMS提供程序会导致迁移失败. + +* 删除 `.EntityFrameworkCore.DbMigrations` 项目下的Migrations文件夹,并重新生成解决方案. +* 在包管理控制台中运行 `Add-Migration "Initial"`(在解决方案资源管理器选择 `.DbMigrator` (或 `.Web`) 做为启动项目并且选择 `.EntityFrameworkCore.DbMigrations` 做为默认项目). + +这将创建一个配置所有数据库对象(表)的数据库迁移. + +运行 `.DbMigrator` 项目创建数据库和初始种子数据. + +## 运行应用程序 + +它已准备就绪, 只需要运行该应用程序与享受编码. \ No newline at end of file diff --git a/docs/zh-Hans/Entity-Framework-Core-SQLite.md b/docs/zh-Hans/Entity-Framework-Core-SQLite.md new file mode 100644 index 0000000000..4b8e009fe4 --- /dev/null +++ b/docs/zh-Hans/Entity-Framework-Core-SQLite.md @@ -0,0 +1,41 @@ +# 切换到EF Core SQLite提供程序 + +本文介绍如何将预配置为SqlServer提供程序的 **[应用程序启动模板](Startup-Templates/Application.md)** 切换到 **SQLite** 数据库提供程序. + +## 替换Volo.Abp.EntityFrameworkCore.SqlServer包 + +解决方案中的 `.EntityFrameworkCore` 项目依赖于 [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer) NuGet包. 删除这个包并且添加相同版本的 [Volo.Abp.EntityFrameworkCore.SQLite](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SQLite) 包. + +## 替换模块依赖项 + +在 `.EntityFrameworkCore` 项目中找到 **YourProjectName*EntityFrameworkCoreModule** 类, 删除 `DependsOn` attribute 上的`typeof(AbpEntityFrameworkCoreSqlServerModule)`, 添加 `typeof(AbpEntityFrameworkCoreSqliteModule)` (或者替换 `using Volo.Abp.EntityFrameworkCore.SqlServer;` 为 `using Volo.Abp.EntityFrameworkCore.Sqlite;`). + +## UseSqlite() + +查找你的解决方案中 `UseSqlServer()`调用,替换为 `UseSqlite()`. 检查下列文件: + +* `.EntityFrameworkCore` 项目中的*YourProjectName*EntityFrameworkCoreModule.cs. +* `.EntityFrameworkCore` 项目中的*YourProjectName*MigrationsDbContextFactory.cs. + +> 根据你的解决方案的结构,你可能发现更多需要改变代码的文件. + +## 更改连接字符串 + +SQLite连接字符串与SQL Server连接字符串不同. 所以检查你的解决方案中所有的 `appsettings.json` 文件,更改其中的连接字符串. 有关SQLite连接字符串选项的详细内容请参见[connectionstrings.com](https://www.connectionstrings.com/sqlite/). + +通常需要更改 `.DbMigrator` 和 `.Web` 项目里面的 `appsettings.json` ,但它取决于你的解决方案结构. + +## 重新生成迁移 + +启动模板使用[Entity Framework Core的Code First迁移](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/). EF Core迁移取决于所选的DBMS提供程序. 因此更改DBMS提供程序会导致迁移失败. + +* 删除 `.EntityFrameworkCore.DbMigrations` 项目下的Migrations文件夹,并重新生成解决方案. +* 在包管理控制台中运行 `Add-Migration "Initial"`(在解决方案资源管理器选择 `.DbMigrator` (或 `.Web`) 做为启动项目并且选择 `.EntityFrameworkCore.DbMigrations` 做为默认项目). + +这将创建一个配置所有数据库对象(表)的数据库迁移. + +运行 `.DbMigrator` 项目创建数据库和初始种子数据. + +## 运行应用程序 + +它已准备就绪, 只需要运行该应用程序与享受编码. \ No newline at end of file diff --git a/docs/zh-Hans/Entity-Framework-Core.md b/docs/zh-Hans/Entity-Framework-Core.md index 6a7f69c2aa..328a4b74cc 100644 --- a/docs/zh-Hans/Entity-Framework-Core.md +++ b/docs/zh-Hans/Entity-Framework-Core.md @@ -1,8 +1,8 @@ -## Entity Framework Core 集成 +# Entity Framework Core 集成 本文介绍了如何将EF Core作为ORM提供程序集成到基于ABP的应用程序以及如何对其进行配置. -### 安装 +## 安装 `Volo.Abp.EntityFrameworkCore` 是EF Core 集成的主要nuget包. 将其安装到你的项目中(在分层应用程序中适用于 数据访问/基础设施层): @@ -26,7 +26,22 @@ namespace MyCompany.MyProject } ```` -### 创建 DbContext +> 注: 你可以直接下载预装EF Core的[启动模板](https://abp.io/Templates). + +### 数据库管理系统选择 + +EF Core支持多种数据库管理系统([查看全部](https://docs.microsoft.com/en-us/ef/core/providers/)). ABP框架和本文档不依赖于任何特定的DBMS. + +如果要创建一个可重用的库,应避免依赖于特定的DBMS包.但在最终的应用程序中,始终会选择一个DBMS. + +ABP框架为一些常见的DBMS提供了集成包,使配置变得更加简单. [启动模板](Startup-Templates/Index.md)附带**预先配置的SQL Server (localdb)**.请参阅以下文档,了解如何配置其他DBMS提供程序: + +* [MySQL](Entity-Framework-Core-MySQL.md) +* [PostgreSQL](Entity-Framework-Core-PostgreSQL.md) +* [SQLite](Entity-Framework-Core-SQLite.md) +* [Others](Entity-Framework-Core-Other-DBMS.md) + +## 创建 DbContext 你可以平常一样创建DbContext,它需要继承自 `AbpDbContext`. 如下所示: @@ -48,7 +63,22 @@ namespace MyCompany.MyProject } ```` -### 将DbContext注册到依赖注入 +### 配置连接字符串选择 + +如果你的应用程序有多个数据库,你可以使用 `connectionStringName]` Attribute为你的DbContext配置连接字符串名称. +例: + +```csharp +[ConnectionStringName("MySecondConnString")] +public class MyDbContext : AbpDbContext +{ + +} +``` + +如果不进行配置,则使用`Default`连接字符串. 如果你配置特定的连接字符串的名称,但在应用程序配置中没有定义这个连接字符串名称,那么它会回退到`Default`连接字符串(参阅[连接字符串文档](Connection-Strings.md)了解更多信息). + +## 将DbContext注册到依赖注入 在module中的ConfigureServices方法使用 `AddAbpDbContext` 在[依赖注入](Dependency-Injection.md)系统注册DbContext类. @@ -72,7 +102,7 @@ namespace MyCompany.MyProject } ```` -#### 添加默认仓储 +### 添加默认仓储 ABP会自动为DbContext中的实体创建[默认仓储](Repositories.md). 需要在注册的时使用options添加`AddDefaultRepositories()`: @@ -165,7 +195,7 @@ public class BookRepository : EfCoreRepository, public async Task DeleteBooksByType(BookType type) { - await DbContext.Database.ExecuteSqlCommandAsync( + await DbContext.Database.ExecuteSqlRawAsync( $"DELETE FROM Books WHERE Type = {(int)type}" ); } @@ -174,7 +204,7 @@ public class BookRepository : EfCoreRepository, 现在可以在需要时[注入](Dependency-Injection.md)`IBookRepository`并使用`DeleteBooksByType`方法. -##### 覆盖默认通用仓储 +#### 覆盖默认通用仓储 即使创建了自定义仓储,仍可以注入使用默认通用仓储(在本例中是 `IRepository`). 默认仓储实现不会使用你创建的自定义仓储类. @@ -200,7 +230,7 @@ public override async Task DeleteAsync( } ```` -#### 访问 EF Core API +### 访问 EF Core API 大多数情况下应该隐藏仓储后面的EF Core API(这也是仓储的设计目地). 但是如果想要通过仓储访问DbContext实现,则可以使用`GetDbContext()`或`GetDbSet()`扩展方法. 例: @@ -226,9 +256,9 @@ public class BookService > 要点: 你必须在使用`DbContext`的项目里引用`Volo.Abp.EntityFrameworkCore`包. 这会破坏封装,但在这种情况下,这就是你需要的. -#### 高级主题 +### 高级主题 -##### 设置默认仓储类 +#### 设置默认仓储类 默认的通用仓储的默认实现是`EfCoreRepository`类,你可以创建自己的实现,并将其做为默认实现 @@ -273,7 +303,7 @@ context.Services.AddAbpDbContext(options => }); ``` -#### 为默认仓储设置Base DbContext类或接口 +### 为默认仓储设置Base DbContext类或接口 如果你的DbContext继承了另外一个DbContext或实现了一个接口,你可以使用这个基类或接口作为默认仓储的DbContext. 例: @@ -305,7 +335,7 @@ public class BookRepository : EfCoreRepository, 使用DbContext接口的一个优点是它可以被其他实现替换. -#### 替换其他仓储 +### 替换其他仓储 正确定义并使用DbContext接口后,任何其他实现都可以使用以下ReplaceDbContext options 替换它: @@ -317,4 +347,4 @@ context.Services.AddAbpDbContext(options => }); ```` -在这个例子中,`OtherDbContext`实现了`IBookStoreDbContext`. 此功能允许你在开发时使用多个DbContext(每个模块一个),但在运行时可以使用单个DbContext(实现所有DbContext的所有接口). \ No newline at end of file +在这个例子中,`OtherDbContext`实现了`IBookStoreDbContext`. 此功能允许你在开发时使用多个DbContext(每个模块一个),但在运行时可以使用单个DbContext(实现所有DbContext的所有接口). diff --git a/docs/zh-Hans/Microservice-Architecture.md b/docs/zh-Hans/Microservice-Architecture.md index 166591e779..3b96cdc7f6 100644 --- a/docs/zh-Hans/Microservice-Architecture.md +++ b/docs/zh-Hans/Microservice-Architecture.md @@ -23,7 +23,7 @@ ABP框架的主要目标之一就是提供**便捷的基础设施来创建微服 然而开发一个良好的模块化应用程序不是那么简单,因为很难像微服务那样**保持模块之间的隔离** (参阅 [Stefan Tilkov的文章](https://martinfowler.com/articles/dont-start-monolith.html)). 微服务架构会自然的让你开发隔离的服务,但是在模块化的单体应用程序中,模块很容易彼此紧密耦合并设计出**弱模块边界**和API约定. -ABP可以帮助你,它提供了与**与微服务兼容的严格模块架构** 在这个架构中你的模块被分割成多个层/项目,在自己的VS解决方案中进行开发,该解决方案完成独立于其它模块. 这种方式开发的模块是一种天然的微服务,但是它可以很容易的插入到单体应用程序中. 请参阅**微服务优先的模块设计**的[模块开发最佳实践指南](Best-Practices/Index.md). 所有[标准的ABP模块](https://github.com/abpframework/abp/tree/master/modules)都是基于本指南开发的. 因此你可以将这些模块嵌入到单体解决方案中使用它们,也可以单独部署通过远程API调用. 它们可以共享一个数据库,也可以通过简单配置使用自己的数据库. +ABP可以帮助你,它提供了与**与微服务兼容的严格模块架构** 在这个架构中你的模块被分割成多个层/项目,在自己的VS解决方案中进行开发,该解决方案完全独立于其它模块. 这种方式开发的模块是一种天然的微服务,但是它可以很容易的插入到单体应用程序中. 请参阅**微服务优先的模块设计**的[模块开发最佳实践指南](Best-Practices/Index.md). 所有[标准的ABP模块](https://github.com/abpframework/abp/tree/master/modules)都是基于本指南开发的. 因此你可以将这些模块嵌入到单体解决方案中使用它们,也可以单独部署通过远程API调用. 它们可以共享一个数据库,也可以通过简单配置使用自己的数据库. ## 微服务解决方案示例 diff --git a/docs/zh-Hans/Multi-Tenancy.md b/docs/zh-Hans/Multi-Tenancy.md index 5f00c2c12c..83d190bb38 100644 --- a/docs/zh-Hans/Multi-Tenancy.md +++ b/docs/zh-Hans/Multi-Tenancy.md @@ -99,7 +99,7 @@ Volo.Abp.MultiTenancy只提供了用于确定当前租户的抽象(称为租户 ##### 自定义租户解析器 -你可以像下面这样,在你模块的ConfigureServices方法中将自定义解析器并添加到 **TenantResolveOptions**中: +你可以像下面这样,在你模块的ConfigureServices方法中将自定义解析器并添加到 **AbpTenantResolveOptions**中: ````C# using Microsoft.Extensions.DependencyInjection; @@ -113,7 +113,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.TenantResolvers.Add(new MyCustomTenantResolveContributor()); }); @@ -323,7 +323,7 @@ services.Configure(options => ##### 域名租户解析器 -实际项目中,大多数情况下你想通过子域名(如mytenant1.mydomain.com)或全域名(如mytenant.com)中确定当前租户.如果是这样,你可以配置TenantResolveOptions添加一个域名租户解析器. +实际项目中,大多数情况下你想通过子域名(如mytenant1.mydomain.com)或全域名(如mytenant.com)中确定当前租户.如果是这样,你可以配置AbpTenantResolveOptions添加一个域名租户解析器. ###### 例子:添加子域名解析器 @@ -340,7 +340,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { //子域名格式: {0}.mydomain.com (作为最高优先级解析器添加) options.TenantResolvers.Insert(0, new DomainTenantResolver("{0}.mydomain.com")); diff --git a/docs/zh-Hans/Options.md b/docs/zh-Hans/Options.md index a5206bce91..18ccd90bed 100644 --- a/docs/zh-Hans/Options.md +++ b/docs/zh-Hans/Options.md @@ -1,3 +1,121 @@ -# Options +# 选项 -TODO! +微软引入[选项模式](https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/configuration/options),它是用于配置框架服务使用的设置. 选项模式由[Microsoft.Extensions.Options](https://www.nuget.org/packages/Microsoft.Extensions.Options)NuGet包实现,除了ASP.NET Core应用,它还适用于任何类型的应用程序. + +ABP框架遵循选项模式,并定义了用于配置框架和模块的选项类(在相关功能文档中有详细的说明). + +由于[微软的文档](https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/configuration/options)详细解释了选项模式,本文中只会介绍ABP增加的一些功能. + +## 配置选项 + +通常配置选项在 `Startup` 类的 `ConfigureServices` 方法中. 但由于ABP框架提供了模块化基础设施,因此你可以在[模块](Module-Development-Basics.md)的`ConfigureServices` 方法配置选项. +例: + +````csharp +public override void ConfigureServices(ServiceConfigurationContext context) +{ + context.Services.Configure(options => + { + options.IsEnabled = false; + }); +} +```` + +* `AbpAuditingOptions` 是一个简单的类,定义了一些属性,例如这里使用的 `IsEnabled`. +* `AbpModule` 基类定义 `Configure` 方法简化代码. 你可以直接使用 `Configure<...>`,而不是`context.Services.Configure <...>`. + +如果你正在开发一个可重用的模块,你可能需要定义一个允许开发人员配置模块的选项类. 这时定义一个如下所示的普通类: + +````csharp +public class MyOptions +{ + public int Value1 { get; set; } + public bool Value2 { get; set; } +} +```` + +然后开发人员可以像上面 `AbpAuditingOptions` 示例一样配置你的选项: + +````csharp +public override void ConfigureServices(ServiceConfigurationContext context) +{ + Configure(options => + { + options.Value1 = 42; + options.Value2 = true; + }); +} +```` + +* 在本示例中,使用了简化的 `Configure<...>`方法. + +### 获取选项值 + +在你需要获得一个选项值时,将 `IOptions` 服务[注入](Dependency-Injection.md)到你的类中,使用它的 `.Value` 属性得到值. +例: + +````csharp +public class MyService : ITransientDependency +{ + private readonly MyOptions _options; + + public MyService(IOptions options) + { + _options = options.Value; //Notice the options.Value usage! + } + + public void DoIt() + { + var v1 = _options.Value1; + var v2 = _options.Value2; + } +} +```` + +阅读[微软文档](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options)了解选择模式的所有细节. + +## 预配置 + +选项模式的限制之一是你只能解析(注入) `IOptions ` 并在依赖注入配置完成(即所有模块的`ConfigureServices`方法完成)后获取选项值. + +如果你正在开发一个模块,可能需要让开发者能够设置一些选项,并在依赖注入注册阶段使用这些选项. 你可能需要根据选项值配置其他服务或更改依赖注入的注册代码. + +对于此类情况,ABP为 `IServiceCollection` 引入了 `PreConfigure` 和 `ExecutePreConfiguredActions` 扩展方法. 该模式的工作原理如下所述。 + +1. 你的模块中定义计划选项类. 例: + +````csharp +public class MyPreOptions +{ + public bool MyValue { get; set; } +} +```` + +然后任何依赖于模块的模块类都可以在其 `PreConfigureServices` 方法中使用 `PreConfigure` 方法. +例: + +````csharp +public override void PreConfigureServices(ServiceConfigurationContext context) +{ + PreConfigure(options => + { + options.MyValue = true; + }); +} +```` + +> 多个模块可以预配置选项,并根据它们的依赖顺序覆盖选项值. + +最后在你的模块 `ConfigureServices` 方法中执行 `ExecutePreConfiguredActions` 方法来获得配置的选项值. +例: + +````csharp +public override void ConfigureServices(ServiceConfigurationContext context) +{ + var options = context.Services.ExecutePreConfiguredActions(); + if (options.MyValue) + { + //... + } +} +```` \ No newline at end of file diff --git a/docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-II.md index dd86b5e119..2d4b344afa 100644 --- a/docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-II.md @@ -421,7 +421,8 @@ $(function () { 打开`Acme.BookStore.Domain.Shared`项目中的`en.json`并添加以下行: ````json -"BookDeletionConfirmationMessage": "Are you sure to delete the book {0}?" +"BookDeletionConfirmationMessage": "Are you sure to delete the book {0}?", +"SuccessfullyDeleted": "Successfully deleted" ```` 运行程序并尝试删除一个book实体. diff --git a/docs/zh-Hans/docs-nav.json b/docs/zh-Hans/docs-nav.json index 72f92203db..44856b34ed 100644 --- a/docs/zh-Hans/docs-nav.json +++ b/docs/zh-Hans/docs-nav.json @@ -52,6 +52,10 @@ "text": "配置", "path": "Configuration.md" }, + { + "text": "选项", + "path": "Options.md" + }, { "text": "依赖注入", "path": "Dependency-Injection.md", @@ -85,7 +89,8 @@ ] }, { - "text": "授权" + "text": "授权", + "path": "Authorization.md" }, { "text": "缓存", @@ -256,22 +261,43 @@ "path":"Data-Access.md", "items": [ { - "text": "Entity Framework Core 集成", - "path": "Entity-Framework-Core.md", - "items": [ + "text": "连接字符串", + "path": "Connection-Strings.md" + }, + { + "text": "数据库提供程序", + "items": [ + { + "text": "Entity Framework Core", + "path": "Entity-Framework-Core.md", + "items": [ + { + "text": "切换到MySql", + "path": "Entity-Framework-Core-MySQL.md" + }, + { + "text": "切换到PostgreSQL", + "path": "Entity-Framework-Core-PostgreSQL.md" + }, + { + "text": "切换到SQLite", + "path": "Entity-Framework-Core-SQLite.md" + }, + { + "text": "切换到其他DBMS", + "path": "Entity-Framework-Core-Other-DBMS.md" + } + ] + }, { - "text": "PostgreSQL 集成", - "path": "Entity-Framework-Core-PostgreSQL.md" + "text": "MongoDB", + "path": "MongoDB.md" + }, + { + "text": "Dapper", + "path": "Dapper.md" } ] - }, - { - "text": "MongoDB 集成", - "path": "MongoDB.md" - }, - { - "text": "Dapper 集成", - "path": "Dapper.md" } ] }, diff --git a/framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xml b/framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xsd b/framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj b/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj index 43ebfb8230..365450cd73 100644 --- a/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj +++ b/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs index e93f558afd..4ff54f39bf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs @@ -11,14 +11,14 @@ namespace Microsoft.AspNetCore.Builder { if (ctx.User.Identity?.IsAuthenticated != true) { - var result = await ctx.AuthenticateAsync(schema).ConfigureAwait(false); + var result = await ctx.AuthenticateAsync(schema); if (result.Succeeded && result.Principal != null) { ctx.User = result.Principal; } } - await next().ConfigureAwait(false); + await next(); }); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj index eb6908d0cd..e2392c2b53 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj index 6a5f7edb36..ae032e5b9e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj @@ -1,5 +1,6 @@ - + + @@ -19,4 +20,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj index 6688526622..e9fa75d716 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs index b260df4247..ba8802a80e 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy TenantConfiguration tenant = null; if (resolveResult.TenantIdOrName != null) { - tenant = await FindTenantAsync(resolveResult.TenantIdOrName).ConfigureAwait(false); + tenant = await FindTenantAsync(resolveResult.TenantIdOrName); if (tenant == null) { //TODO: A better exception? @@ -45,7 +45,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy using (_currentTenant.Change(tenant?.Id, tenant?.Name)) { - await next(context).ConfigureAwait(false); + await next(context); } } @@ -53,11 +53,11 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { if (Guid.TryParse(tenantIdOrName, out var parsedTenantId)) { - return await _tenantStore.FindAsync(parsedTenantId).ConfigureAwait(false); + return await _tenantStore.FindAsync(parsedTenantId); } else { - return await _tenantStore.FindAsync(tenantIdOrName).ConfigureAwait(false); + return await _tenantStore.FindAsync(tenantIdOrName); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj index aa45445c43..87641365b2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs index a4f7eb0567..1fbb72bb3e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs @@ -43,12 +43,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Client configuration = await Cache.GetOrAddAsync( cacheKey, - async () => await Proxy.Service.GetAsync().ConfigureAwait(false), + async () => await Proxy.Service.GetAsync(), () => new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(120) //TODO: Should be configurable. Default value should be higher (5 mins would be good). } - ).ConfigureAwait(false); + ); if (httpContext != null) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteFeatureChecker.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteFeatureChecker.cs index 9671703db8..f769f512a5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteFeatureChecker.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteFeatureChecker.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client public override async Task GetOrNullAsync(string name) { - var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false); + var configuration = await ConfigurationClient.GetAsync(); return configuration.Features.Values.GetOrDefault(name); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteLanguageProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteLanguageProvider.cs index 42b6eeb543..02c97c0598 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteLanguageProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteLanguageProvider.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client public async Task> GetLanguagesAsync() { - var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false); + var configuration = await ConfigurationClient.GetAsync(); return configuration.Localization.Languages; } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs index 553160029b..18f5272e7b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client public async Task IsGrantedAsync(string name) { - var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false); + var configuration = await ConfigurationClient.GetAsync(); return configuration.Auth.GrantedPolicies.ContainsKey(name); } @@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client public async Task IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name) { /* This provider always works for the current principal. */ - return await IsGrantedAsync(name).ConfigureAwait(false); + return await IsGrantedAsync(name); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteSettingProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteSettingProvider.cs index d6526a0b7b..db3ea6e9a6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteSettingProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteSettingProvider.cs @@ -17,13 +17,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client public async Task GetOrNullAsync(string name) { - var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false); + var configuration = await ConfigurationClient.GetAsync(); return configuration.Setting.Values.GetOrDefault(name); } public async Task> GetAllAsync() { - var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false); + var configuration = await ConfigurationClient.GetAsync(); return configuration .Setting.Values .Select(s => new SettingValue(s.Key, s.Value)) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs index 8e95376663..236387823c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs @@ -39,13 +39,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client tenantConfiguration = await Cache.GetOrAddAsync( cacheKey, - async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name).ConfigureAwait(false)), + async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)), () => new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5) //TODO: Should be configurable. } - ).ConfigureAwait(false); + ); if (httpContext != null) { @@ -67,13 +67,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client tenantConfiguration = await Cache.GetOrAddAsync( cacheKey, - async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id).ConfigureAwait(false)), + async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)), () => new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5) //TODO: Should be configurable. } - ).ConfigureAwait(false); + ); if (httpContext != null) { @@ -95,7 +95,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client tenantConfiguration = Cache.GetOrAdd( cacheKey, - () => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name).ConfigureAwait(false))), + () => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name))), () => new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = @@ -123,7 +123,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client tenantConfiguration = Cache.GetOrAdd( cacheKey, - () => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id).ConfigureAwait(false))), + () => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id))), () => new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj index 9d3107e90c..a979cfa637 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Breadcrumb/AbpBreadcrumbTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Breadcrumb/AbpBreadcrumbTagHelperService.cs index 4b3a4dd471..8eeeb1e929 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Breadcrumb/AbpBreadcrumbTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Breadcrumb/AbpBreadcrumbTagHelperService.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Breadcrumb { var list = InitilizeFormGroupContentsContext(context, output); - await output.GetChildContentAsync().ConfigureAwait(false); + await output.GetChildContentAsync(); SetInnerOlTag(context, output); SetInnerList(context, output, list); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs index 65cffd8cb6..ffba80fb6f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Carousel var itemList = InitilizeCarouselItemsContentsContext(context, output); - await output.GetChildContentAsync().ConfigureAwait(false); + await output.GetChildContentAsync(); SetOneItemAsActive(context, output, itemList); SetItems(context, output, itemList); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs index 509b801ba9..9dc279334b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse { SetRandomIdIfNotProvided(); - var innerContent = (await output.GetChildContentAsync().ConfigureAwait(false)).GetContent(); + var innerContent = (await output.GetChildContentAsync()).GetContent(); var html = GetAccordionHeaderItem(context, output) + GetAccordionContentItem(context, output, innerContent); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionTagHelperService.cs index c6c5c2eb5e..20e62604a9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionTagHelperService.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse var items = InitilizeFormGroupContentsContext(context, output); - await output.GetChildContentAsync().ConfigureAwait(false); + await output.GetChildContentAsync(); var content = GetContent(items); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseBodyTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseBodyTagHelperService.cs index 2b81961f67..10e49b92a7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseBodyTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseBodyTagHelperService.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse output.Attributes.AddClass("multi-collapse"); } - var innerContent = (await output.GetChildContentAsync().ConfigureAwait(false)).GetContent(); + var innerContent = (await output.GetChildContentAsync()).GetContent(); output.Content.SetHtmlContent(innerContent); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs index 459a7be318..673204b302 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs @@ -26,9 +26,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { - var content = await output.GetChildContentAsync().ConfigureAwait(false); + var content = await output.GetChildContentAsync(); - var buttonsAsHtml = await GetButtonsAsHtmlAsync(context, output, content).ConfigureAwait(false); + var buttonsAsHtml = await GetButtonsAsHtmlAsync(context, output, content); output.PreElement.SetHtmlContent(buttonsAsHtml); @@ -43,13 +43,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown { var buttonBuilder = new StringBuilder(""); - var mainButton = await GetMainButtonAsync(context, output, content).ConfigureAwait(false); + var mainButton = await GetMainButtonAsync(context, output, content); buttonBuilder.AppendLine(mainButton); if (TagHelper.DropdownStyle == DropdownStyle.Split) { - var splitButton = await GetSplitButtonAsync(context, output).ConfigureAwait(false); + var splitButton = await GetSplitButtonAsync(context, output); buttonBuilder.AppendLine(splitButton); } @@ -68,7 +68,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown abpButtonTagHelper.ButtonType = TagHelper.ButtonType; var attributes = GetAttributesForMainButton(context, output); - var buttonTag = await abpButtonTagHelper.ProcessAndGetOutputAsync(attributes, context, "button", TagMode.StartTagAndEndTag).ConfigureAwait(false); + var buttonTag = await abpButtonTagHelper.ProcessAndGetOutputAsync(attributes, context, "button", TagMode.StartTagAndEndTag); buttonTag.PreContent.SetHtmlContent(content.GetContent()); @@ -89,7 +89,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown abpButtonTagHelper.ButtonType = TagHelper.ButtonType; var attributes = GetAttributesForSplitButton(context, output); - return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag).ConfigureAwait(false); + return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag); } protected virtual TagHelperAttributeList GetAttributesForMainButton(TagHelperContext context, TagHelperOutput output) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Extensions/TagHelperExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Extensions/TagHelperExtensions.cs index 6767e2bf1d..d925fd11e8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Extensions/TagHelperExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Extensions/TagHelperExtensions.cs @@ -19,14 +19,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Extensions tagHelper.Init(context); - await tagHelper.ProcessAsync(innerContext, innerOutput).ConfigureAwait(false); + await tagHelper.ProcessAsync(innerContext, innerOutput); return innerOutput; } public static async Task RenderAsync(this TagHelper tagHelper, TagHelperAttributeList attributeList, TagHelperContext context, HtmlEncoder htmlEncoder, string tagName = "div", TagMode tagMode = TagMode.SelfClosing) { - var innerOutput = await tagHelper.ProcessAndGetOutputAsync(attributeList, context, tagName, tagMode).ConfigureAwait(false); + var innerOutput = await tagHelper.ProcessAndGetOutputAsync(attributeList, context, tagName, tagMode); return innerOutput.Render(htmlEncoder); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs index 5fb439b6f7..ee2a920980 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs @@ -37,11 +37,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form NormalizeTagMode(context, output); - var childContent = (await output.GetChildContentAsync().ConfigureAwait(false)).GetContent(); + var childContent = (await output.GetChildContentAsync()).GetContent(); - await ConvertToMvcForm(context, output).ConfigureAwait(false); + await ConvertToMvcForm(context, output); - await ProcessFieldsAsync(context, output).ConfigureAwait(false); + await ProcessFieldsAsync(context, output); SetContent(context, output, list, childContent); @@ -67,9 +67,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form ViewContext = TagHelper.ViewContext }; - var formTagOutput = await formTagHelper.ProcessAndGetOutputAsync(output.Attributes, context, "form", TagMode.StartTagAndEndTag).ConfigureAwait(false); + var formTagOutput = await formTagHelper.ProcessAndGetOutputAsync(output.Attributes, context, "form", TagMode.StartTagAndEndTag); - await formTagOutput.GetChildContentAsync().ConfigureAwait(false); + await formTagOutput.GetChildContentAsync(); output.PostContent.SetHtmlContent(output.PostContent.GetContent() + formTagOutput.PostContent.GetContent()); output.PreContent.SetHtmlContent(output.PreContent.GetContent() + formTagOutput.PreContent.GetContent()); @@ -134,11 +134,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form { if (IsSelectGroup(context, model)) { - await ProcessSelectGroupAsync(context, output, model).ConfigureAwait(false); + await ProcessSelectGroupAsync(context, output, model); } else { - await ProcessInputGroupAsync(context, output, model).ConfigureAwait(false); + await ProcessInputGroupAsync(context, output, model); } } } @@ -147,7 +147,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form { var abpSelectTagHelper = GetSelectGroupTagHelper(context, output, model); - await abpSelectTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag).ConfigureAwait(false); + await abpSelectTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag); } protected virtual AbpTagHelper GetSelectGroupTagHelper(TagHelperContext context, TagHelperOutput output, ModelExpression model) @@ -185,7 +185,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form abpButtonTagHelper.Text = "Submit"; abpButtonTagHelper.ButtonType = AbpButtonType.Primary; - return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag).ConfigureAwait(false); + return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag); } protected virtual async Task ProcessInputGroupAsync(TagHelperContext context, TagHelperOutput output, ModelExpression model) @@ -195,7 +195,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form abpInputTagHelper.ViewContext = TagHelper.ViewContext; abpInputTagHelper.DisplayRequiredSymbol = TagHelper.RequiredSymbols ?? true; - await abpInputTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag).ConfigureAwait(false); + await abpInputTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag); } protected virtual List GetModels(TagHelperContext context, TagHelperOutput output) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs index b1195b729e..75fe4f23e7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { - var (innerHtml, isCheckBox) = await GetFormInputGroupAsHtmlAsync(context, output).ConfigureAwait(false); + var (innerHtml, isCheckBox) = await GetFormInputGroupAsHtmlAsync(context, output); var order = TagHelper.AspFor.ModelExplorer.GetDisplayOrder(); @@ -57,12 +57,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form protected virtual async Task<(string, bool)> GetFormInputGroupAsHtmlAsync(TagHelperContext context, TagHelperOutput output) { - var (inputTag, isCheckBox) = await GetInputTagHelperOutputAsync(context, output).ConfigureAwait(false); + var (inputTag, isCheckBox) = await GetInputTagHelperOutputAsync(context, output); var inputHtml = inputTag.Render(_encoder); - var label = await GetLabelAsHtmlAsync(context, output, inputTag, isCheckBox).ConfigureAwait(false); + var label = await GetLabelAsHtmlAsync(context, output, inputTag, isCheckBox); var info = GetInfoAsHtml(context, output, inputTag, isCheckBox); - var validation = isCheckBox ? "" : await GetValidationAsHtmlAsync(context, output, inputTag).ConfigureAwait(false); + var validation = isCheckBox ? "" : await GetValidationAsHtmlAsync(context, output, inputTag); return (GetContent(context, output, label, inputHtml, validation, info, isCheckBox), isCheckBox); } @@ -82,7 +82,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var attributeList = new TagHelperAttributeList { { "class", "text-danger" } }; - return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag).ConfigureAwait(false); + return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag); } protected virtual string GetContent(TagHelperContext context, TagHelperOutput output, string label, string inputHtml, string validation, string infoHtml, bool isCheckbox) @@ -125,7 +125,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form { var tagHelper = GetInputTagHelper(context, output); - var inputTagHelperOutput = await tagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "input").ConfigureAwait(false); + var inputTagHelperOutput = await tagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "input"); ConvertToTextAreaIfTextArea(inputTagHelperOutput); AddDisabledAttribute(inputTagHelperOutput); @@ -227,7 +227,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form if (string.IsNullOrEmpty(TagHelper.Label)) { - return await GetLabelAsHtmlUsingTagHelperAsync(context, output, isCheckbox).ConfigureAwait(false) + GetRequiredSymbol(context, output); + return await GetLabelAsHtmlUsingTagHelperAsync(context, output, isCheckbox) + GetRequiredSymbol(context, output); } var checkboxClass = isCheckbox ? "class=\"custom-control-label\" " : ""; @@ -301,7 +301,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form attributeList.AddClass("custom-control-label"); } - return await labelTagHelper.RenderAsync(attributeList, context, _encoder, "label", TagMode.StartTagAndEndTag).ConfigureAwait(false); + return await labelTagHelper.RenderAsync(attributeList, context, _encoder, "label", TagMode.StartTagAndEndTag); } protected virtual void ConvertToTextAreaIfTextArea(TagHelperOutput tagHelperOutput) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs index f1260883ef..b18bc6ed75 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { - var innerHtml = await GetFormInputGroupAsHtmlAsync(context, output).ConfigureAwait(false); + var innerHtml = await GetFormInputGroupAsHtmlAsync(context, output); var order = TagHelper.AspFor.ModelExplorer.GetDisplayOrder(); @@ -52,10 +52,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form protected virtual async Task GetFormInputGroupAsHtmlAsync(TagHelperContext context, TagHelperOutput output) { - var selectTag = await GetSelectTagAsync(context, output).ConfigureAwait(false); + var selectTag = await GetSelectTagAsync(context, output); var selectAsHtml = selectTag.Render(_encoder); - var label = await GetLabelAsHtmlAsync(context, output, selectTag).ConfigureAwait(false); - var validation = await GetValidationAsHtmlAsync(context, output, selectTag).ConfigureAwait(false); + var label = await GetLabelAsHtmlAsync(context, output, selectTag); + var validation = await GetValidationAsHtmlAsync(context, output, selectTag); var infoText = GetInfoAsHtml(context, output, selectTag); return label + Environment.NewLine + selectAsHtml + Environment.NewLine + infoText + Environment.NewLine + validation; @@ -75,7 +75,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form ViewContext = TagHelper.ViewContext }; - var selectTagHelperOutput = await selectTagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "select", TagMode.StartTagAndEndTag).ConfigureAwait(false); + var selectTagHelperOutput = await selectTagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "select", TagMode.StartTagAndEndTag); selectTagHelperOutput.Attributes.AddClass("form-control"); selectTagHelperOutput.Attributes.AddClass(GetSize(context, output)); @@ -123,7 +123,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form return "" + GetRequiredSymbol(context, output); } - return await GetLabelAsHtmlUsingTagHelperAsync(context, output).ConfigureAwait(false) + GetRequiredSymbol(context, output); + return await GetLabelAsHtmlUsingTagHelperAsync(context, output) + GetRequiredSymbol(context, output); } protected virtual string GetRequiredSymbol(TagHelperContext context, TagHelperOutput output) @@ -242,7 +242,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form ViewContext = TagHelper.ViewContext }; - return await labelTagHelper.RenderAsync(new TagHelperAttributeList(), context, _encoder, "label", TagMode.StartTagAndEndTag).ConfigureAwait(false); + return await labelTagHelper.RenderAsync(new TagHelperAttributeList(), context, _encoder, "label", TagMode.StartTagAndEndTag); } protected virtual async Task GetValidationAsHtmlAsync(TagHelperContext context, TagHelperOutput output, TagHelperOutput inputTag) @@ -255,7 +255,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var attributeList = new TagHelperAttributeList { { "class", "text-danger" } }; - return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag).ConfigureAwait(false); + return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag); } protected virtual string GetSize(TagHelperContext context, TagHelperOutput output) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs index e78d59ee82..bb8107bc52 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs @@ -8,6 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid public override void Process(TagHelperContext context, TagHelperOutput output) { output.TagName = "div"; + output.Attributes.AddClass("col"); ProcessSizeClasses(context, output); @@ -52,6 +53,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid classString += "-" + size.ToString("D"); } + output.Attributes.RemoveClass("col"); output.Attributes.AddClass(classString); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs index f1d2f5c02f..25307c3fee 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination } ProcessMainTag(context, output); - await SetContentAsHtmlAsync(context, output).ConfigureAwait(false); + await SetContentAsHtmlAsync(context, output); } protected virtual async Task SetContentAsHtmlAsync(TagHelperContext context, TagHelperOutput output) @@ -39,9 +39,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination var html = new StringBuilder(""); html.AppendLine(GetOpeningTags(context, output)); - html.AppendLine(await GetPreviousButtonAsync(context, output).ConfigureAwait(false)); - html.AppendLine(await GetPagesAsync(context, output).ConfigureAwait(false)); - html.AppendLine(await GetNextButton(context, output).ConfigureAwait(false)); + html.AppendLine(await GetPreviousButtonAsync(context, output)); + html.AppendLine(await GetPagesAsync(context, output)); + html.AppendLine(await GetNextButton(context, output)); html.AppendLine(GetClosingTags(context, output)); output.Content.SetHtmlContent(html.ToString()); @@ -61,7 +61,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination foreach (var page in TagHelper.Model.Pages) { - pagesHtml.AppendLine(await GetPageAsync(context, output, page).ConfigureAwait(false)); + pagesHtml.AppendLine(await GetPageAsync(context, output, page)); } return pagesHtml.ToString(); @@ -86,7 +86,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination } else { - pageHtml.AppendLine(await RenderAnchorTagHelperLinkHtmlAsync(context, output, page.Index.ToString(), page.Index.ToString()).ConfigureAwait(false)); + pageHtml.AppendLine(await RenderAnchorTagHelperLinkHtmlAsync(context, output, page.Index.ToString(), page.Index.ToString())); } pageHtml.AppendLine(""); @@ -102,7 +102,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination : (TagHelper.Model.CurrentPage - 1).ToString(); return "
  • \r\n" + - (await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey).ConfigureAwait(false)) + "
  • "; + (await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey)) + " "; } protected virtual async Task GetNextButton(TagHelperContext context, TagHelperOutput output) @@ -111,7 +111,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination var currentPage = (TagHelper.Model.CurrentPage + 1).ToString(); return "
  • = TagHelper.Model.TotalPageCount ? "disabled" : "") + "\">\r\n" + - (await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey).ConfigureAwait(false)) + + (await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey)) + "
  • "; } @@ -121,7 +121,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination var anchorTagHelper = GetAnchorTagHelper(currentPage, out var attributeList); - var tagHelperOutput = await anchorTagHelper.ProcessAndGetOutputAsync(attributeList, context, "a", TagMode.StartTagAndEndTag).ConfigureAwait(false); + var tagHelperOutput = await anchorTagHelper.ProcessAndGetOutputAsync(attributeList, context, "a", TagMode.StartTagAndEndTag); tagHelperOutput.Content.SetHtmlContent(localizer[localizationKey]); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs index 1b74a338dd..fb724af9c8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab throw new Exception("Name of tab dropdown tag can not bu null or empty."); } - await output.GetChildContentAsync().ConfigureAwait(false); + await output.GetChildContentAsync(); var tabHeader = GetTabHeaderItem(context, output); var tabHeaderItems = context.GetValue>(TabItems); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs index 7d8dc7224c..2de18d0592 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab { SetPlaceholderForNameIfNotProvided(); - var innerContent = await output.GetChildContentAsync().ConfigureAwait(false); + var innerContent = await output.GetChildContentAsync(); var tabHeader = GetTabHeaderItem(context, output); var tabContent = GetTabContentItem(context, output, innerContent.GetContent()); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs index 37d307ac05..a28e0c7057 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab var items = InitilizeFormGroupContentsContext(context, output); - await output.GetChildContentAsync().ConfigureAwait(false); + await output.GetChildContentAsync(); var headers = GetHeaders(context, output, items); var contents = GetConents(context, output, items); @@ -45,8 +45,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab var headerColumnSize = GetHeaderColumnSize(); var contentColumnSize = 12 - headerColumnSize; - headers = PlaceInsideColunm(headers, headerColumnSize); - contents = PlaceInsideColunm(contents, contentColumnSize); + headers = PlaceInsideColumn(headers, headerColumnSize); + contents = PlaceInsideColumn(contents, contentColumnSize); } @@ -79,9 +79,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab return surroundedContents; } - protected virtual string PlaceInsideColunm(string contents, int columnSize) + protected virtual string PlaceInsideColumn(string contents, int columnSize) { - var surroundedContents = "
    " + Environment.NewLine + + var surroundedContents = "
    " + Environment.NewLine + contents + "
    "; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj index c6ad85408b..2fb94ac218 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj index a1b83cbaef..84ea011233 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs index 5683a2039f..f5806364f3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs @@ -61,12 +61,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling public virtual async Task> GetStyleBundleFilesAsync(string bundleName) { - return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler).ConfigureAwait(false); + return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler); } public virtual async Task> GetScriptBundleFilesAsync(string bundleName) { - return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler).ConfigureAwait(false); + return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler); } protected virtual async Task> GetBundleFilesAsync(BundleConfigurationCollection bundles, string bundleName, IBundler bundler) @@ -185,17 +185,17 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling foreach (var contributor in contributors) { - await contributor.PreConfigureBundleAsync(context).ConfigureAwait(false); + await contributor.PreConfigureBundleAsync(context); } foreach (var contributor in contributors) { - await contributor.ConfigureBundleAsync(context).ConfigureAwait(false); + await contributor.ConfigureBundleAsync(context); } foreach (var contributor in contributors) { - await contributor.PostConfigureBundleAsync(context).ConfigureAwait(false); + await contributor.PostConfigureBundleAsync(context); } return context.Files; @@ -207,7 +207,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling foreach (var contributor in contributors) { - await contributor.ConfigureDynamicResourcesAsync(context).ConfigureAwait(false); + await contributor.ConfigureDynamicResourcesAsync(context); } return context.Files; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleItemTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleItemTagHelperService.cs index a7c504054c..fc59051720 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleItemTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleItemTagHelperService.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers TagHelper.CreateBundleTagHelperItem() }, TagHelper.GetNameOrNull() - ).ConfigureAwait(false); + ); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleTagHelperService.cs index 45aeffaf92..a8eadce1e8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleTagHelperService.cs @@ -20,16 +20,16 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers await ResourceService.ProcessAsync( context, output, - await GetBundleItems(context, output).ConfigureAwait(false), + await GetBundleItems(context, output), TagHelper.GetNameOrNull() - ).ConfigureAwait(false); + ); } protected virtual async Task> GetBundleItems(TagHelperContext context, TagHelperOutput output) { var bundleItems = new List(); context.Items[AbpTagHelperConsts.ContextBundleItemListKey] = bundleItems; - await output.GetChildContentAsync().ConfigureAwait(false); //TODO: Is there a way of executing children without getting content? + await output.GetChildContentAsync(); //TODO: Is there a way of executing children without getting content? return bundleItems; } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs index 9095fdf335..73b6e025ea 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs @@ -56,7 +56,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers CreateBundle(bundleName, bundleItems); - var bundleFiles = await GetBundleFilesAsync(bundleName).ConfigureAwait(false); + var bundleFiles = await GetBundleFilesAsync(bundleName); output.Content.Clear(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs index 8ab0dffc15..b087db517f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers protected override async Task> GetBundleFilesAsync(string bundleName) { - return await BundleManager.GetScriptBundleFilesAsync(bundleName).ConfigureAwait(false); + return await BundleManager.GetScriptBundleFilesAsync(bundleName); } protected override void AddHtmlTag(TagHelperContext context, TagHelperOutput output, string file) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs index f82606fa03..2d273345cb 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers protected override async Task> GetBundleFilesAsync(string bundleName) { - return await BundleManager.GetStyleBundleFilesAsync(bundleName).ConfigureAwait(false); + return await BundleManager.GetStyleBundleFilesAsync(bundleName); } protected override void AddHtmlTag(TagHelperContext context, TagHelperOutput output, string file) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs index 7cb02623f1..d0bea87196 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs @@ -17,7 +17,7 @@ namespace Pages.Abp.MultiTenancy public async Task FindTenantByNameAsync(string name) { - var tenant = await TenantStore.FindAsync(name).ConfigureAwait(false); + var tenant = await TenantStore.FindAsync(name); if (tenant == null) { @@ -34,7 +34,7 @@ namespace Pages.Abp.MultiTenancy public async Task FindTenantByIdAsync(Guid id) { - var tenant = await TenantStore.FindAsync(id).ConfigureAwait(false); + var tenant = await TenantStore.FindAsync(id); if (tenant == null) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs index c36d36f61f..b84ffc421f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs @@ -17,18 +17,17 @@ namespace Pages.Abp.MultiTenancy } [HttpGet] - [Route("find-tenant/{name}")] //TODO: Remove on v1.0 [Route("tenants/by-name/{name}")] public async Task FindTenantByNameAsync(string name) { - return await _abpTenantAppService.FindTenantByNameAsync(name).ConfigureAwait(false); + return await _abpTenantAppService.FindTenantByNameAsync(name); } [HttpGet] [Route("tenants/by-id/{id}")] public async Task FindTenantByIdAsync(Guid id) { - return await _abpTenantAppService.FindTenantByIdAsync(id).ConfigureAwait(false); + return await _abpTenantAppService.FindTenantByIdAsync(id); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs index da4d6d207d..bfdbb98db8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs @@ -34,7 +34,7 @@ namespace Pages.Abp.MultiTenancy if (CurrentTenant.IsAvailable) { - var tenant = await TenantStore.FindAsync(CurrentTenant.GetId()).ConfigureAwait(false); + var tenant = await TenantStore.FindAsync(CurrentTenant.GetId()); Input.Name = tenant?.Name; } } @@ -47,7 +47,7 @@ namespace Pages.Abp.MultiTenancy } else { - var tenant = await TenantStore.FindAsync(Input.Name).ConfigureAwait(false); + var tenant = await TenantStore.FindAsync(Input.Name); if (tenant == null) { throw new UserFriendlyException(L["GivenTenantIsNotAvailable", Input.Name]); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj index 7a31569dda..2400b9c291 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/zh-Hant.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/zh-Hant.json new file mode 100644 index 0000000000..12eea67007 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/zh-Hant.json @@ -0,0 +1,12 @@ +{ + "culture": "zh-Hant", + "texts": { + "GivenTenantIsNotAvailable": "指定的租戶不可用: {0}", + "SwitchTenant": "切換租戶", + "Name": "名稱", + "SwitchTenantHint": "將name欄位留空以切換到主控端.", + "Tenant": "租戶", + "Switch": "切換", + "NotSelected": "尚未選定" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj index 7a86cbb464..6cb0a02153 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs index bccd8e00de..0369457165 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu public async Task InvokeAsync() { - var menu = await _menuManager.GetAsync(StandardMenus.Main).ConfigureAwait(false); + var menu = await _menuManager.GetAsync(StandardMenus.Main); return View("~/Themes/Basic/Components/Menu/Default.cshtml", menu); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs index e58190060b..c6921d3210 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar public async Task InvokeAsync() { - var languages = await _languageProvider.GetLanguagesAsync().ConfigureAwait(false); + var languages = await _languageProvider.GetLanguagesAsync(); var currentLanguage = languages.FindByCulture( CultureInfo.CurrentCulture.Name, CultureInfo.CurrentUICulture.Name diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs index 862dbe7e2f..bfd02bbf4a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar public async Task InvokeAsync() { - var toolbar = await _toolbarManager.GetAsync(StandardToolbars.Main).ConfigureAwait(false); + var toolbar = await _toolbarManager.GetAsync(StandardToolbars.Main); return View("~/Themes/Basic/Components/Toolbar/Default.cshtml", toolbar); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs index feb7fb09a5..cde4208578 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar public async Task InvokeAsync() { - var menu = await _menuManager.GetAsync(StandardMenus.User).ConfigureAwait(false); + var menu = await _menuManager.GetAsync(StandardMenus.User); return View("~/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml", menu); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs index 01e812adfe..1ed1d2d5d3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Toolbars var languageProvider = context.ServiceProvider.GetService(); //TODO: This duplicates GetLanguages() usage. Can we eleminate this? - var languages = await languageProvider.GetLanguagesAsync().ConfigureAwait(false); + var languages = await languageProvider.GetLanguagesAsync(); if (languages.Count > 1) { context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitchViewComponent))); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj index 168ca481fd..43f5bc20bf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj @@ -1,5 +1,6 @@ - + + @@ -36,4 +37,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css index 4f25e603b8..c252bf55ef 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css @@ -56,4 +56,8 @@ .field-validation-error { font-size: 0.8em; } - \ No newline at end of file + + +.dataTables_scrollBody { + min-height: 248px; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs index e2d66a7d11..f1ac30779a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars foreach (var contributor in Options.Contributors) { - await contributor.ConfigureToolbarAsync(context).ConfigureAwait(false); + await contributor.ConfigureToolbarAsync(context); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj index 0962057909..7c4147bba5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj @@ -1,5 +1,6 @@ - + + @@ -39,4 +40,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj index d26c12fc7a..06afcf3f3e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs index e148947c77..826c7635cf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs @@ -33,10 +33,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets var widget = Options.Widgets.Find(name); if (widget == null) { - return await DefaultViewComponentHelper.InvokeAsync(name, arguments).ConfigureAwait(false); + return await DefaultViewComponentHelper.InvokeAsync(name, arguments); } - return await InvokeWidgetAsync(arguments, widget).ConfigureAwait(false); + return await InvokeWidgetAsync(arguments, widget); } public virtual async Task InvokeAsync(Type componentType, object arguments) @@ -44,10 +44,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets var widget = Options.Widgets.Find(componentType); if (widget == null) { - return await DefaultViewComponentHelper.InvokeAsync(componentType, arguments).ConfigureAwait(false); + return await DefaultViewComponentHelper.InvokeAsync(componentType, arguments); } - return await InvokeWidgetAsync(arguments, widget).ConfigureAwait(false); + return await InvokeWidgetAsync(arguments, widget); } public virtual void Contextualize(ViewContext viewContext) @@ -68,7 +68,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets return new HtmlContentBuilder() .AppendHtml($"
    ") - .AppendHtml(await DefaultViewComponentHelper.InvokeAsync(widget.ViewComponentType, arguments).ConfigureAwait(false)) + .AppendHtml(await DefaultViewComponentHelper.InvokeAsync(widget.ViewComponentType, arguments)) .AppendHtml("
    "); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs index 2249090bd8..ffd03d28dc 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs @@ -27,14 +27,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets { var widget = Options.Widgets.Find(widgetComponentType); - return await IsGrantedAsyncInternal(widget, widgetComponentType.FullName).ConfigureAwait(false); + return await IsGrantedAsyncInternal(widget, widgetComponentType.FullName); } public async Task IsGrantedAsync(string name) { var widget = Options.Widgets.Find(name); - return await IsGrantedAsyncInternal(widget, name).ConfigureAwait(false); + return await IsGrantedAsyncInternal(widget, name); } private async Task IsGrantedAsyncInternal(WidgetDefinition widget, string wantedWidgetName) @@ -48,7 +48,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets { foreach (var requiredPolicy in widget.RequiredPolicies) { - if (!(await AuthorizationService.AuthorizeAsync(requiredPolicy).ConfigureAwait(false)).Succeeded) + if (!(await AuthorizationService.AuthorizeAsync(requiredPolicy)).Succeeded) { return false; } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj index fb784efd44..ffdaf02d94 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj index 0778c57747..dabe2e30d4 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs index 1744658d41..69f75a31b2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs @@ -56,12 +56,12 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations return new ApplicationConfigurationDto { - Auth = await GetAuthConfigAsync().ConfigureAwait(false), - Features = await GetFeaturesConfigAsync().ConfigureAwait(false), - Localization = await GetLocalizationConfigAsync().ConfigureAwait(false), + Auth = await GetAuthConfigAsync(), + Features = await GetFeaturesConfigAsync(), + Localization = await GetLocalizationConfigAsync(), CurrentUser = GetCurrentUser(), Setting = await GetSettingConfigAsync() -.ConfigureAwait(false) + }; } @@ -82,7 +82,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations var authConfig = new ApplicationAuthConfigurationDto(); - var policyNames = await _abpAuthorizationPolicyProvider.GetPoliciesNamesAsync().ConfigureAwait(false); + var policyNames = await _abpAuthorizationPolicyProvider.GetPoliciesNamesAsync(); Logger.LogDebug($"GetPoliciesNamesAsync returns {policyNames.Count} items."); @@ -92,7 +92,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations Logger.LogDebug($"_authorizationService.IsGrantedAsync? {policyName}"); - if (await _authorizationService.IsGrantedAsync(policyName).ConfigureAwait(false)) + if (await _authorizationService.IsGrantedAsync(policyName)) { authConfig.GrantedPolicies[policyName] = true; } @@ -175,7 +175,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations continue; } - result.Values[settingDefinition.Name] = await _settingProvider.GetOrNullAsync(settingDefinition.Name).ConfigureAwait(false); + result.Values[settingDefinition.Name] = await _settingProvider.GetOrNullAsync(settingDefinition.Name); } Logger.LogDebug("Executed AbpApplicationConfigurationAppService.GetSettingConfigAsync()"); @@ -196,7 +196,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations continue; } - result.Values[featureDefinition.Name] = await FeatureChecker.GetOrNullAsync(featureDefinition.Name).ConfigureAwait(false); + result.Values[featureDefinition.Name] = await FeatureChecker.GetOrNullAsync(featureDefinition.Name); } Logger.LogDebug("Executed AbpApplicationConfigurationAppService.GetFeaturesConfigAsync()"); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs index ae41e579c9..67672986be 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations [HttpGet] public async Task GetAsync() { - return await _applicationConfigurationAppService.GetAsync().ConfigureAwait(false); + return await _applicationConfigurationAppService.GetAsync(); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs index 00cef65179..6cc01966a5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations [Produces(MimeTypes.Application.Javascript, MimeTypes.Text.Plain)] public async Task Get() { - var script = CreateAbpExtendScript(await _configurationAppService.GetAsync().ConfigureAwait(false)); + var script = CreateAbpExtendScript(await _configurationAppService.GetAsync()); return Content( _options.MinifyGeneratedScript == true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index d9cb936326..3069d72e9d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -175,7 +175,10 @@ namespace Volo.Abp.AspNetCore.Mvc parameterDescription.RouteInfo?.IsOptional ?? false, parameterDescription.RouteInfo?.DefaultValue, parameterDescription.RouteInfo?.Constraints?.Select(c => c.GetType().Name).ToArray(), - parameterDescription.Source.Id + parameterDescription.Source.Id, + parameterDescription.ModelMetadata?.ContainerType != null + ? parameterDescription.ParameterDescriptor?.Name ?? string.Empty + : string.Empty ) ); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Auditing/AbpAuditActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Auditing/AbpAuditActionFilter.cs index 4699689d76..33932137cb 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Auditing/AbpAuditActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Auditing/AbpAuditActionFilter.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Auditing { if (!ShouldSaveAudit(context, out var auditLog, out var auditLogAction)) { - await next().ConfigureAwait(false); + await next(); return; } @@ -37,7 +37,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Auditing try { - var result = await next().ConfigureAwait(false); + var result = await next(); if (result.Exception != null && !result.ExceptionHandled) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs index d3a8025813..36e0bebfd6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs @@ -8,10 +8,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication public abstract class ChallengeAccountController : AbpController { protected string[] ChallengeAuthenticationSchemas { get; } + protected string AuthenticationType { get; } protected ChallengeAccountController(string[] challengeAuthenticationSchemas = null) { - ChallengeAuthenticationSchemas = challengeAuthenticationSchemas ?? new[]{ "oidc" }; + ChallengeAuthenticationSchemas = challengeAuthenticationSchemas ?? new[] { "oidc" }; + AuthenticationType = "Identity.Application"; } [HttpGet] @@ -40,9 +42,14 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication [HttpGet] public async Task Logout(string returnUrl = "", string returnUrlHash = "") { - await HttpContext.SignOutAsync().ConfigureAwait(false); + await HttpContext.SignOutAsync(); - return RedirectSafely(returnUrl, returnUrlHash); + if (HttpContext.User.Identity.AuthenticationType == AuthenticationType) + { + return RedirectSafely(returnUrl, returnUrlHash); + } + + return new SignOutResult(ChallengeAuthenticationSchemas); } protected RedirectResult RedirectSafely(string returnUrl, string returnUrlHash = null) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Features/AbpFeatureActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Features/AbpFeatureActionFilter.cs index ffca5b12ee..577acda339 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Features/AbpFeatureActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Features/AbpFeatureActionFilter.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Features { if (!context.ActionDescriptor.IsControllerAction()) { - await next().ConfigureAwait(false); + await next(); return; } @@ -33,9 +33,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Features { await _methodInvocationAuthorizationService.CheckAsync( new MethodInvocationFeatureCheckerContext(methodInfo) - ).ConfigureAwait(false); + ); - await next().ConfigureAwait(false); + await next(); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinder.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinder.cs index 1e31da90f8..1916b9aa16 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinder.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinder.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding public async Task BindModelAsync(ModelBindingContext bindingContext) { - await _simpleTypeModelBinder.BindModelAsync(bindingContext).ConfigureAwait(false); + await _simpleTypeModelBinder.BindModelAsync(bindingContext); if (!bindingContext.Result.IsModelSet) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs index 56153fedea..552ce7e04e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow { if (!context.ActionDescriptor.IsControllerAction()) { - await next().ConfigureAwait(false); + await next(); return; } @@ -39,7 +39,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow if (unitOfWorkAttr?.IsDisabled == true) { - await next().ConfigureAwait(false); + await next(); return; } @@ -48,10 +48,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow //Trying to begin a reserved UOW by AbpUnitOfWorkMiddleware if (_unitOfWorkManager.TryBeginReserved(AbpUnitOfWorkMiddleware.UnitOfWorkReservationName, options)) { - var result = await next().ConfigureAwait(false); + var result = await next(); if (!Succeed(result)) { - await RollbackAsync(context).ConfigureAwait(false); + await RollbackAsync(context); } return; @@ -60,10 +60,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow //Begin a new, independent unit of work using (var uow = _unitOfWorkManager.Begin(options)) { - var result = await next().ConfigureAwait(false); + var result = await next(); if (Succeed(result)) { - await uow.CompleteAsync(context.HttpContext.RequestAborted).ConfigureAwait(false); + await uow.CompleteAsync(context.HttpContext.RequestAborted); } } } @@ -89,7 +89,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow var currentUow = _unitOfWorkManager.Current; if (currentUow != null) { - await currentUow.RollbackAsync(context.HttpContext.RequestAborted).ConfigureAwait(false); + await currentUow.RollbackAsync(context.HttpContext.RequestAborted); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs index ae047fa30a..8fe699f4ba 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs @@ -21,12 +21,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation if (!context.ActionDescriptor.IsControllerAction() || !context.ActionDescriptor.HasObjectResult()) { - await next().ConfigureAwait(false); + await next(); return; } _validator.Validate(context.ModelState); - await next().ConfigureAwait(false); + await next(); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj index f450e04423..b0bb8930df 100644 --- a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo/Abp/AspNetCore/Serilog/AbpSerilogMiddleware.cs b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo/Abp/AspNetCore/Serilog/AbpSerilogMiddleware.cs index 8a8f032766..be84d552ad 100644 --- a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo/Abp/AspNetCore/Serilog/AbpSerilogMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo/Abp/AspNetCore/Serilog/AbpSerilogMiddleware.cs @@ -62,7 +62,7 @@ namespace Volo.Abp.AspNetCore.Serilog using (LogContext.Push(enrichers.ToArray())) { - await next(context).ConfigureAwait(false); + await next(context); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj index 2a9b1d394b..38d9a34867 100644 --- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore/FodyWeavers.xsd b/framework/src/Volo.Abp.AspNetCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs index 32fed42dc2..2a8c48b1c5 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs @@ -27,11 +27,11 @@ namespace Microsoft.AspNetCore.RequestLocalization next, new OptionsWrapper( await _requestLocalizationOptionsProvider.GetLocalizationOptionsAsync() -.ConfigureAwait(false)), +), _loggerFactory ); - await middleware.Invoke(context).ConfigureAwait(false); + await middleware.Invoke(context); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationOptionsFactory.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationOptionsFactory.cs new file mode 100644 index 0000000000..10cce6a776 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationOptionsFactory.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.Options; +using Volo.Abp.Options; + +namespace Microsoft.AspNetCore.RequestLocalization +{ + public class AbpRequestLocalizationOptionsFactory : AbpOptionsFactory + { + private readonly IAbpRequestLocalizationOptionsProvider _abpRequestLocalizationOptionsProvider; + + public AbpRequestLocalizationOptionsFactory( + IAbpRequestLocalizationOptionsProvider abpRequestLocalizationOptionsProvider, + IEnumerable> setups, + IEnumerable> postConfigures) + : base( + setups, + postConfigures) + { + _abpRequestLocalizationOptionsProvider = abpRequestLocalizationOptionsProvider; + } + + public override RequestLocalizationOptions Create(string name) + { + return _abpRequestLocalizationOptionsProvider.GetLocalizationOptions(); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs index 51932953ed..64f339ffce 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs @@ -5,12 +5,14 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Localization; using Microsoft.Extensions.DependencyInjection; using Nito.AsyncEx; using Volo.Abp.DependencyInjection; using Volo.Abp.Localization; using Volo.Abp.Settings; +using Volo.Abp.Threading; namespace Microsoft.AspNetCore.RequestLocalization { @@ -32,19 +34,29 @@ namespace Microsoft.AspNetCore.RequestLocalization _optionsAction = optionsAction; } + public RequestLocalizationOptions GetLocalizationOptions() + { + if (_requestLocalizationOptions != null) + { + return _requestLocalizationOptions; + } + + return AsyncHelper.RunSync(GetLocalizationOptionsAsync); + } + public async Task GetLocalizationOptionsAsync() { if (_requestLocalizationOptions == null) { - using (await _syncSemaphore.LockAsync().ConfigureAwait(false)) + using (await _syncSemaphore.LockAsync()) { using (var serviceScope = _serviceProviderFactory.CreateScope()) { var languageProvider = serviceScope.ServiceProvider.GetRequiredService(); var settingProvider = serviceScope.ServiceProvider.GetRequiredService(); - var languages = await languageProvider.GetLanguagesAsync().ConfigureAwait(false); - var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage).ConfigureAwait(false); + var languages = await languageProvider.GetLanguagesAsync(); + var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage); var options = !languages.Any() ? new RequestLocalizationOptions() diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/IAbpRequestLocalizationOptionsProvider.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/IAbpRequestLocalizationOptionsProvider.cs index 86cd3153f7..cb4daec7f2 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/IAbpRequestLocalizationOptionsProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/IAbpRequestLocalizationOptionsProvider.cs @@ -8,6 +8,8 @@ namespace Microsoft.AspNetCore.RequestLocalization { void InitLocalizationOptions(Action optionsAction = null); + RequestLocalizationOptions GetLocalizationOptions(); + Task GetLocalizationOptionsAsync(); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj index 3ae691a1fc..a3089646d2 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj +++ b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs index 298fffd20e..279601387d 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs @@ -1,5 +1,8 @@ using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.RequestLocalization; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Auditing; using Volo.Abp.Auditing; using Volo.Abp.Authorization; @@ -38,6 +41,8 @@ namespace Volo.Abp.AspNetCore AddAspNetServices(context.Services); context.Services.AddObjectAccessor(); + + context.Services.Replace(ServiceDescriptor.Transient, AbpRequestLocalizationOptionsFactory>()); } private static void AddAspNetServices(IServiceCollection services) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs index eee629e969..b634892029 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs @@ -33,49 +33,49 @@ namespace Volo.Abp.AspNetCore.Auditing { try { - await next(context).ConfigureAwait(false); - } - catch (Exception) - { - hasError = true; - if (!Options.HideErrors) - { - throw; - } + await next(context); + } + catch (Exception) + { + hasError = true; + if (!Options.HideErrors) + { + throw; + } } finally { - if (ShouldWriteAuditLog(context, hasError)) - { - await scope.SaveAsync().ConfigureAwait(false); - } + if (ShouldWriteAuditLog(context, hasError)) + { + await scope.SaveAsync(); + } } } } private bool ShouldWriteAuditLog(HttpContext httpContext, bool hasError = false) { - if (!Options.IsEnabled) - { - return false; + if (!Options.IsEnabled) + { + return false; + } + + if (Options.AlwaysLogOnException && hasError) + { + return true; + } + + if (!Options.IsEnabledForAnonymousUsers && !CurrentUser.IsAuthenticated) + { + return false; + } + + if (!Options.IsEnabledForGetRequests && + string.Equals(httpContext.Request.Method, HttpMethods.Get, StringComparison.OrdinalIgnoreCase)) + { + return false; } - if (Options.AlwaysLogOnException && hasError) - { - return true; - } - - if (!Options.IsEnabledForAnonymousUsers && !CurrentUser.IsAuthenticated) - { - return false; - } - - if (!Options.IsEnabledForGetRequests && - string.Equals(httpContext.Request.Method, HttpMethods.Get, StringComparison.OrdinalIgnoreCase)) - { - return false; - } - return true; } } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs index d9954dc424..cdd921dae4 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling { try { - await next(context).ConfigureAwait(false); + await next(context); } catch (Exception ex) { @@ -44,7 +44,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling { if (actionInfo.IsObjectResult) //TODO: Align with AbpExceptionFilter.ShouldHandleException! { - await HandleAndWrapException(context, ex).ConfigureAwait(false); + await HandleAndWrapException(context, ex); return; } } @@ -72,7 +72,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling errorInfoConverter.Convert(exception) ) ) - ).ConfigureAwait(false); + ); } private Task ClearCacheHeaders(object state) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs index 068adffefb..b3ee565100 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Tracing try { - await next(context).ConfigureAwait(false); + await next(context); } finally { diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs index 46572b4450..c9ac1be509 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs @@ -20,8 +20,8 @@ namespace Volo.Abp.AspNetCore.Uow { using (var uow = _unitOfWorkManager.Reserve(UnitOfWorkReservationName)) { - await next(context).ConfigureAwait(false); - await uow.CompleteAsync(context.RequestAborted).ConfigureAwait(false); + await next(context); + await uow.CompleteAsync(context.RequestAborted); } } } diff --git a/framework/src/Volo.Abp.Auditing/FodyWeavers.xml b/framework/src/Volo.Abp.Auditing/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Auditing/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Auditing/FodyWeavers.xsd b/framework/src/Volo.Abp.Auditing/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Auditing/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj b/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj index cca8e99545..4ac2420c8f 100644 --- a/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj +++ b/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs b/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs index a49145298a..5a401a218e 100644 --- a/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs +++ b/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Auditing { if (!ShouldIntercept(invocation, out var auditLog, out var auditLogAction)) { - await invocation.ProceedAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); return; } @@ -30,7 +30,7 @@ namespace Volo.Abp.Auditing try { - await invocation.ProceedAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); } catch (Exception ex) { diff --git a/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs b/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs index 409084ac6f..7315c86e79 100644 --- a/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs +++ b/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs @@ -23,8 +23,8 @@ namespace Volo.Abp.Auditing private readonly IAuditingStore _auditingStore; public AuditingManager( - IAmbientScopeProvider ambientScopeProvider, - IAuditingHelper auditingHelper, + IAmbientScopeProvider ambientScopeProvider, + IAuditingHelper auditingHelper, IAuditingStore auditingStore, IServiceProvider serviceProvider, IOptions options) @@ -116,7 +116,7 @@ namespace Volo.Abp.Auditing if (ShouldSave(saveHandle.AuditLog)) { - await _auditingStore.SaveAsync(saveHandle.AuditLog).ConfigureAwait(false); + await _auditingStore.SaveAsync(saveHandle.AuditLog); } } @@ -141,7 +141,7 @@ namespace Volo.Abp.Auditing public DisposableSaveHandle( AuditingManager auditingManager, IDisposable scope, - AuditLogInfo auditLog, + AuditLogInfo auditLog, Stopwatch stopWatch) { _auditingManager = auditingManager; @@ -151,18 +151,19 @@ namespace Volo.Abp.Auditing } public async Task SaveAsync() - { - await _auditingManager.SaveAsync(this).ConfigureAwait(false); + { + await _auditingManager.SaveAsync(this); } - public void AddException(Exception exception) - { - this.AuditLog.Exceptions.Add(exception); + + public void AddException(Exception exception) + { + this.AuditLog.Exceptions.Add(exception); } - + public void Dispose() { _scope.Dispose(); - } + } } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Authorization/FodyWeavers.xml b/framework/src/Volo.Abp.Authorization/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Authorization/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Authorization/FodyWeavers.xsd b/framework/src/Volo.Abp.Authorization/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Authorization/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AbpAuthorizationServiceExtensions.cs b/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AbpAuthorizationServiceExtensions.cs index ef033170f6..45650b06a4 100644 --- a/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AbpAuthorizationServiceExtensions.cs +++ b/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AbpAuthorizationServiceExtensions.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Authorization authorizationService, null, policyName - ).ConfigureAwait(false); + ); } public static async Task AuthorizeAsync(this IAuthorizationService authorizationService, object resource, IAuthorizationRequirement requirement) @@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Authorization authorizationService.AsAbpAuthorizationService().CurrentPrincipal, resource, requirement - ).ConfigureAwait(false); + ); } public static async Task AuthorizeAsync(this IAuthorizationService authorizationService, object resource, AuthorizationPolicy policy) @@ -31,16 +31,16 @@ namespace Microsoft.AspNetCore.Authorization authorizationService.AsAbpAuthorizationService().CurrentPrincipal, resource, policy - ).ConfigureAwait(false); + ); } public static async Task AuthorizeAsync(this IAuthorizationService authorizationService, AuthorizationPolicy policy) { return await AuthorizeAsync( - authorizationService, + authorizationService, null, policy - ).ConfigureAwait(false); + ); } public static async Task AuthorizeAsync(this IAuthorizationService authorizationService, object resource, IEnumerable requirements) @@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Authorization authorizationService.AsAbpAuthorizationService().CurrentPrincipal, resource, requirements - ).ConfigureAwait(false); + ); } public static async Task AuthorizeAsync(this IAuthorizationService authorizationService, object resource, string policyName) @@ -58,42 +58,42 @@ namespace Microsoft.AspNetCore.Authorization authorizationService.AsAbpAuthorizationService().CurrentPrincipal, resource, policyName - ).ConfigureAwait(false); + ); } public static async Task IsGrantedAsync(this IAuthorizationService authorizationService, string policyName) { - return (await authorizationService.AuthorizeAsync(policyName).ConfigureAwait(false)).Succeeded; + return (await authorizationService.AuthorizeAsync(policyName)).Succeeded; } public static async Task IsGrantedAsync(this IAuthorizationService authorizationService, object resource, IAuthorizationRequirement requirement) { - return (await authorizationService.AuthorizeAsync(resource, requirement).ConfigureAwait(false)).Succeeded; + return (await authorizationService.AuthorizeAsync(resource, requirement)).Succeeded; } public static async Task IsGrantedAsync(this IAuthorizationService authorizationService, object resource, AuthorizationPolicy policy) { - return (await authorizationService.AuthorizeAsync(resource, policy).ConfigureAwait(false)).Succeeded; + return (await authorizationService.AuthorizeAsync(resource, policy)).Succeeded; } public static async Task IsGrantedAsync(this IAuthorizationService authorizationService, AuthorizationPolicy policy) { - return (await authorizationService.AuthorizeAsync(policy).ConfigureAwait(false)).Succeeded; + return (await authorizationService.AuthorizeAsync(policy)).Succeeded; } public static async Task IsGrantedAsync(this IAuthorizationService authorizationService, object resource, IEnumerable requirements) { - return (await authorizationService.AuthorizeAsync(resource, requirements).ConfigureAwait(false)).Succeeded; + return (await authorizationService.AuthorizeAsync(resource, requirements)).Succeeded; } public static async Task IsGrantedAsync(this IAuthorizationService authorizationService, object resource, string policyName) { - return (await authorizationService.AuthorizeAsync(resource, policyName).ConfigureAwait(false)).Succeeded; + return (await authorizationService.AuthorizeAsync(resource, policyName)).Succeeded; } public static async Task CheckAsync(this IAuthorizationService authorizationService, string policyName) { - if (!await authorizationService.IsGrantedAsync(policyName).ConfigureAwait(false)) + if (!await authorizationService.IsGrantedAsync(policyName)) { throw new AbpAuthorizationException("Authorization failed! Given policy has not granted: " + policyName); } @@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.Authorization public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, IAuthorizationRequirement requirement) { - if (!await authorizationService.IsGrantedAsync(resource, requirement).ConfigureAwait(false)) + if (!await authorizationService.IsGrantedAsync(resource, requirement)) { throw new AbpAuthorizationException("Authorization failed! Given requirement has not granted for given resource: " + resource); } @@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Authorization public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, AuthorizationPolicy policy) { - if (!await authorizationService.IsGrantedAsync(resource, policy).ConfigureAwait(false)) + if (!await authorizationService.IsGrantedAsync(resource, policy)) { throw new AbpAuthorizationException("Authorization failed! Given policy has not granted for given resource: " + resource); } @@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Authorization public static async Task CheckAsync(this IAuthorizationService authorizationService, AuthorizationPolicy policy) { - if (!await authorizationService.IsGrantedAsync(policy).ConfigureAwait(false)) + if (!await authorizationService.IsGrantedAsync(policy)) { throw new AbpAuthorizationException("Authorization failed! Given policy has not granted."); } @@ -125,7 +125,7 @@ namespace Microsoft.AspNetCore.Authorization public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, IEnumerable requirements) { - if (!await authorizationService.IsGrantedAsync(resource, requirements).ConfigureAwait(false)) + if (!await authorizationService.IsGrantedAsync(resource, requirements)) { throw new AbpAuthorizationException("Authorization failed! Given requirements have not granted for given resource: " + resource); } @@ -133,7 +133,7 @@ namespace Microsoft.AspNetCore.Authorization public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, string policyName) { - if (!await authorizationService.IsGrantedAsync(resource, policyName).ConfigureAwait(false)) + if (!await authorizationService.IsGrantedAsync(resource, policyName)) { throw new AbpAuthorizationException("Authorization failed! Given polist has not granted for given resource: " + resource); } diff --git a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj index 616436707f..8c6482837f 100644 --- a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj +++ b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationPolicyProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationPolicyProvider.cs index 61454b76e1..f636877fc1 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationPolicyProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationPolicyProvider.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization public override async Task GetPolicyAsync(string policyName) { - var policy = await base.GetPolicyAsync(policyName).ConfigureAwait(false); + var policy = await base.GetPolicyAsync(policyName); if (policy != null) { return policy; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs index 5c7afbd7c7..44466884dd 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs @@ -15,8 +15,8 @@ namespace Volo.Abp.Authorization public override async Task InterceptAsync(IAbpMethodInvocation invocation) { - await AuthorizeAsync(invocation).ConfigureAwait(false); - await invocation.ProceedAsync().ConfigureAwait(false); + await AuthorizeAsync(invocation); + await invocation.ProceedAsync(); } protected virtual async Task AuthorizeAsync(IAbpMethodInvocation invocation) @@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization new MethodInvocationAuthorizationContext( invocation.Method ) - ).ConfigureAwait(false); + ); } } } diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs index 1e063f1f0e..56baba8ce4 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.Authorization foreach (var authorizationAttribute in GetAuthorizationDataAttributes(context.Method)) { - await CheckAsync(authorizationAttribute).ConfigureAwait(false); + await CheckAsync(authorizationAttribute); } } @@ -74,7 +74,7 @@ namespace Volo.Abp.Authorization } else { - await _authorizationService.CheckAsync(authorizationAttribute.Policy).ConfigureAwait(false); + await _authorizationService.CheckAsync(authorizationAttribute.Policy); } //TODO: What about roles and other props? diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/PermissionRequirementHandler.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/PermissionRequirementHandler.cs index 89c0a1f71b..d4ec7c1d3c 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/PermissionRequirementHandler.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/PermissionRequirementHandler.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.Authorization AuthorizationHandlerContext context, PermissionRequirement requirement) { - if (await _permissionChecker.IsGrantedAsync(context.User, requirement.PermissionName).ConfigureAwait(false)) + if (await _permissionChecker.IsGrantedAsync(context.User, requirement.PermissionName)) { context.Succeed(requirement); } diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs index 33aeb568b2..38c29b1ddf 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs @@ -24,8 +24,8 @@ namespace Volo.Abp.Authorization.Permissions return PermissionGrantResult.Undefined; } - return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId) -.ConfigureAwait(false) ? PermissionGrantResult.Granted + return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId) + ? PermissionGrantResult.Granted : PermissionGrantResult.Undefined; } } diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs index 165a354743..51c8530ee6 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.Authorization.Permissions public virtual async Task IsGrantedAsync(string name) { - return await IsGrantedAsync(PrincipalAccessor.Principal, name).ConfigureAwait(false); + return await IsGrantedAsync(PrincipalAccessor.Principal, name); } public virtual async Task IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name) @@ -56,7 +56,7 @@ namespace Volo.Abp.Authorization.Permissions continue; } - var result = await provider.CheckAsync(context).ConfigureAwait(false); + var result = await provider.CheckAsync(context); if (result == PermissionGrantResult.Granted) { diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs index f5322b4f12..b98867a78e 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.Authorization.Permissions foreach (var role in roles) { - if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role).ConfigureAwait(false)) + if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role)) { return PermissionGrantResult.Granted; } diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs index 49a1eec366..c7f327c40c 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization.Permissions } return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, userId) -.ConfigureAwait(false) ? PermissionGrantResult.Granted + ? PermissionGrantResult.Granted : PermissionGrantResult.Undefined; } } diff --git a/framework/src/Volo.Abp.AutoMapper/FodyWeavers.xml b/framework/src/Volo.Abp.AutoMapper/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.AutoMapper/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AutoMapper/FodyWeavers.xsd b/framework/src/Volo.Abp.AutoMapper/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.AutoMapper/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj b/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj index ae6d39c61c..e6146fedde 100644 --- a/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj +++ b/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj @@ -1,5 +1,6 @@ - + + @@ -21,4 +22,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Autofac/FodyWeavers.xml b/framework/src/Volo.Abp.Autofac/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Autofac/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Autofac/FodyWeavers.xsd b/framework/src/Volo.Abp.Autofac/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Autofac/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj index 8caf74b672..868f7e6719 100644 --- a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj +++ b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj @@ -1,5 +1,6 @@ - + + @@ -23,4 +24,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xml b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xsd b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj index f85081f15a..1788867e39 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj @@ -1,5 +1,6 @@ - + + @@ -17,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs index c9b5790003..d4ce5cd03a 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.BackgroundJobs { if (jobExecuteMethod.Name == nameof(IAsyncBackgroundJob.ExecuteAsync)) { - await ((Task) jobExecuteMethod.Invoke(job, new[] {context.JobArgs})).ConfigureAwait(false); + await ((Task) jobExecuteMethod.Invoke(job, new[] {context.JobArgs})); } else { diff --git a/framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xml b/framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xsd b/framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj index e47408ca4b..9a197ef095 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xml b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xsd b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj index 8ee2c499b6..a74903bad4 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs index fb18ca00f9..4cb4f04a09 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs @@ -72,11 +72,11 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ { CheckDisposed(); - using (await SyncObj.LockAsync().ConfigureAwait(false)) + using (await SyncObj.LockAsync()) { - await EnsureInitializedAsync().ConfigureAwait(false); + await EnsureInitializedAsync(); - await PublishAsync(args, priority, delay).ConfigureAwait(false); + await PublishAsync(args, priority, delay); return null; } @@ -91,9 +91,9 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ return; } - using (await SyncObj.LockAsync().ConfigureAwait(false)) + using (await SyncObj.LockAsync()) { - await EnsureInitializedAsync().ConfigureAwait(false); + await EnsureInitializedAsync(); } } diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs index 6c50460003..f07564ad5a 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ foreach (var jobConfiguration in Options.GetJobs()) { var jobQueue = (IRunnable)ServiceProvider.GetRequiredService(typeof(IJobQueue<>).MakeGenericType(jobConfiguration.ArgsType)); - await jobQueue.StartAsync(cancellationToken).ConfigureAwait(false); + await jobQueue.StartAsync(cancellationToken); JobQueues[jobConfiguration.JobName] = jobQueue; } } @@ -49,7 +49,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ { foreach (var jobQueue in JobQueues.Values) { - await jobQueue.StopAsync(cancellationToken).ConfigureAwait(false); + await jobQueue.StopAsync(cancellationToken); } JobQueues.Clear(); @@ -64,7 +64,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ return (IJobQueue)jobQueue; } - using (await SyncSemaphore.LockAsync().ConfigureAwait(false)) + using (await SyncSemaphore.LockAsync()) { if (JobQueues.TryGetValue(jobConfiguration.JobName, out jobQueue)) { @@ -74,7 +74,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ jobQueue = (IJobQueue)ServiceProvider .GetRequiredService(typeof(IJobQueue<>).MakeGenericType(typeof(TArgs))); - await jobQueue.StartAsync().ConfigureAwait(false); + await jobQueue.StartAsync(); JobQueues.TryAdd(jobConfiguration.JobName, jobQueue); diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobManager.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobManager.cs index 8945beb6cb..f70d553128 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobManager.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobManager.cs @@ -19,8 +19,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null) { - var jobQueue = await _jobQueueManager.GetAsync().ConfigureAwait(false); - return await jobQueue.EnqueueAsync(args, priority, delay).ConfigureAwait(false); + var jobQueue = await _jobQueueManager.GetAsync(); + return await jobQueue.EnqueueAsync(args, priority, delay); } } } diff --git a/framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xml b/framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xsd b/framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj b/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj index a39b8bbbee..858038e5df 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj @@ -1,5 +1,6 @@ - + + @@ -21,4 +22,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs index a16690f346..fdf0b8c90d 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.BackgroundJobs { var store = workerContext.ServiceProvider.GetRequiredService(); - var waitingJobs = await store.GetWaitingJobsAsync(WorkerOptions.MaxJobFetchCount).ConfigureAwait(false); + var waitingJobs = await store.GetWaitingJobsAsync(WorkerOptions.MaxJobFetchCount); if (!waitingJobs.Any()) { @@ -58,9 +58,9 @@ namespace Volo.Abp.BackgroundJobs try { - await jobExecuter.ExecuteAsync(context).ConfigureAwait(false); + await jobExecuter.ExecuteAsync(context); - await store.DeleteAsync(jobInfo.Id).ConfigureAwait(false); + await store.DeleteAsync(jobInfo.Id); } catch (BackgroundJobExecutionException) { @@ -75,14 +75,14 @@ namespace Volo.Abp.BackgroundJobs jobInfo.IsAbandoned = true; } - await TryUpdateAsync(store, jobInfo).ConfigureAwait(false); + await TryUpdateAsync(store, jobInfo); } } catch (Exception ex) { Logger.LogException(ex); jobInfo.IsAbandoned = true; - await TryUpdateAsync(store, jobInfo).ConfigureAwait(false); + await TryUpdateAsync(store, jobInfo); } } } @@ -91,7 +91,7 @@ namespace Volo.Abp.BackgroundJobs { try { - await store.UpdateAsync(jobInfo).ConfigureAwait(false); + await store.UpdateAsync(jobInfo); } catch (Exception updateEx) { diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs index 266bb37fde..0994029f70 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.BackgroundJobs public virtual async Task EnqueueAsync(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null) { var jobName = BackgroundJobNameAttribute.GetName(); - var jobId = await EnqueueAsync(jobName, args, priority, delay).ConfigureAwait(false); + var jobId = await EnqueueAsync(jobName, args, priority, delay); return jobId.ToString(); } @@ -53,7 +53,7 @@ namespace Volo.Abp.BackgroundJobs jobInfo.NextTryTime = Clock.Now.Add(delay.Value); } - await Store.InsertAsync(jobInfo).ConfigureAwait(false); + await Store.InsertAsync(jobInfo); return jobInfo.Id; } diff --git a/framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xml b/framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xsd b/framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj b/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj index 61bc5af316..c8e518c4d3 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj @@ -1,5 +1,6 @@ - + + @@ -17,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AsyncPeriodicBackgroundWorkerBase.cs b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AsyncPeriodicBackgroundWorkerBase.cs index cd8474e654..62da163eb9 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AsyncPeriodicBackgroundWorkerBase.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AsyncPeriodicBackgroundWorkerBase.cs @@ -23,14 +23,14 @@ namespace Volo.Abp.BackgroundWorkers public override async Task StartAsync(CancellationToken cancellationToken = default) { - await base.StartAsync(cancellationToken).ConfigureAwait(false); + await base.StartAsync(cancellationToken); Timer.Start(cancellationToken); } public override async Task StopAsync(CancellationToken cancellationToken = default) { Timer.Stop(cancellationToken); - await base.StopAsync(cancellationToken).ConfigureAwait(false); + await base.StopAsync(cancellationToken); } private void Timer_Elapsed(object sender, System.EventArgs e) diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerManager.cs b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerManager.cs index 27a0b05173..a8b884e096 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerManager.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerManager.cs @@ -56,7 +56,7 @@ namespace Volo.Abp.BackgroundWorkers foreach (var worker in _backgroundWorkers) { - await worker.StartAsync(cancellationToken).ConfigureAwait(false); + await worker.StartAsync(cancellationToken); } } @@ -66,7 +66,7 @@ namespace Volo.Abp.BackgroundWorkers foreach (var worker in _backgroundWorkers) { - await worker.StopAsync(cancellationToken).ConfigureAwait(false); + await worker.StopAsync(cancellationToken); } } } diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/PeriodicBackgroundWorkerBase.cs b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/PeriodicBackgroundWorkerBase.cs index 863657ab79..091bcc917f 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/PeriodicBackgroundWorkerBase.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/PeriodicBackgroundWorkerBase.cs @@ -26,14 +26,14 @@ namespace Volo.Abp.BackgroundWorkers public override async Task StartAsync(CancellationToken cancellationToken = default) { - await base.StartAsync(cancellationToken).ConfigureAwait(false); + await base.StartAsync(cancellationToken); Timer.Start(cancellationToken); } public override async Task StopAsync(CancellationToken cancellationToken = default) { Timer.Stop(cancellationToken); - await base.StopAsync(cancellationToken).ConfigureAwait(false); + await base.StopAsync(cancellationToken); } private void Timer_Elapsed(object sender, System.EventArgs e) diff --git a/framework/src/Volo.Abp.Caching/FodyWeavers.xml b/framework/src/Volo.Abp.Caching/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Caching/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Caching/FodyWeavers.xsd b/framework/src/Volo.Abp.Caching/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Caching/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj index 054f41c28e..f59d9fe116 100644 --- a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj +++ b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs index daa64060f7..c23fb05aa7 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs @@ -41,7 +41,7 @@ namespace Volo.Abp.Caching /// The type of cache key being used. public class DistributedCache : IDistributedCache where TCacheItem : class - { + { public ILogger> Logger { get; set; } protected string CacheName { get; set; } @@ -124,7 +124,7 @@ namespace Volo.Abp.Caching /// Indicates to throw or hide the exceptions for the distributed cache. /// The cache item, or null. public virtual TCacheItem Get( - TCacheKey key, + TCacheKey key, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -162,8 +162,8 @@ namespace Volo.Abp.Caching /// The for the task. /// The cache item, or null. public virtual async Task GetAsync( - TCacheKey key, - bool? hideErrors = null, + TCacheKey key, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -175,7 +175,7 @@ namespace Volo.Abp.Caching cachedBytes = await Cache.GetAsync( NormalizeKey(key), CancellationTokenProvider.FallbackToProvider(token) - ).ConfigureAwait(false); + ); } catch (Exception ex) { @@ -206,9 +206,9 @@ namespace Volo.Abp.Caching /// Indicates to throw or hide the exceptions for the distributed cache. /// The cache item. public virtual TCacheItem GetOrAdd( - TCacheKey key, - Func factory, - Func optionsFactory = null, + TCacheKey key, + Func factory, + Func optionsFactory = null, bool? hideErrors = null) { var value = Get(key, hideErrors); @@ -243,29 +243,29 @@ namespace Volo.Abp.Caching /// The for the task. /// The cache item. public virtual async Task GetOrAddAsync( - TCacheKey key, - Func> factory, - Func optionsFactory = null, - bool? hideErrors = null, + TCacheKey key, + Func> factory, + Func optionsFactory = null, + bool? hideErrors = null, CancellationToken token = default) { token = CancellationTokenProvider.FallbackToProvider(token); - var value = await GetAsync(key, hideErrors, token).ConfigureAwait(false); + var value = await GetAsync(key, hideErrors, token); if (value != null) { return value; } - using (await SyncSemaphore.LockAsync(token).ConfigureAwait(false)) + using (await SyncSemaphore.LockAsync(token)) { - value = await GetAsync(key, hideErrors, token).ConfigureAwait(false); + value = await GetAsync(key, hideErrors, token); if (value != null) { return value; } - value = await factory().ConfigureAwait(false); - await SetAsync(key, value, optionsFactory?.Invoke(), hideErrors, token).ConfigureAwait(false); + value = await factory(); + await SetAsync(key, value, optionsFactory?.Invoke(), hideErrors, token); } return value; @@ -279,9 +279,9 @@ namespace Volo.Abp.Caching /// The cache options for the value. /// Indicates to throw or hide the exceptions for the distributed cache. public virtual void Set( - TCacheKey key, - TCacheItem value, - DistributedCacheEntryOptions options = null, + TCacheKey key, + TCacheItem value, + DistributedCacheEntryOptions options = null, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -316,10 +316,10 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. public virtual async Task SetAsync( - TCacheKey key, - TCacheItem value, - DistributedCacheEntryOptions options = null, - bool? hideErrors = null, + TCacheKey key, + TCacheItem value, + DistributedCacheEntryOptions options = null, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -331,7 +331,7 @@ namespace Volo.Abp.Caching Serializer.Serialize(value), options ?? DefaultCacheOptions, CancellationTokenProvider.FallbackToProvider(token) - ).ConfigureAwait(false); + ); } catch (Exception ex) { @@ -351,7 +351,7 @@ namespace Volo.Abp.Caching /// The key of cached item to be retrieved from the cache. /// Indicates to throw or hide the exceptions for the distributed cache. public virtual void Refresh( - TCacheKey key, bool? + TCacheKey key, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -379,15 +379,15 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. public virtual async Task RefreshAsync( - TCacheKey key, - bool? hideErrors = null, + TCacheKey key, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; try { - await Cache.RefreshAsync(NormalizeKey(key), CancellationTokenProvider.FallbackToProvider(token)).ConfigureAwait(false); + await Cache.RefreshAsync(NormalizeKey(key), CancellationTokenProvider.FallbackToProvider(token)); } catch (Exception ex) { @@ -407,7 +407,7 @@ namespace Volo.Abp.Caching /// The key of cached item to be retrieved from the cache. /// Indicates to throw or hide the exceptions for the distributed cache. public virtual void Remove( - TCacheKey key, + TCacheKey key, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -435,15 +435,15 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. public virtual async Task RemoveAsync( - TCacheKey key, - bool? hideErrors = null, + TCacheKey key, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; try { - await Cache.RemoveAsync(NormalizeKey(key), CancellationTokenProvider.FallbackToProvider(token)).ConfigureAwait(false); + await Cache.RemoveAsync(NormalizeKey(key), CancellationTokenProvider.FallbackToProvider(token)); } catch (Exception ex) { @@ -455,6 +455,6 @@ namespace Volo.Abp.Caching throw; } - } - } + } + } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Castle.Core/FodyWeavers.xml b/framework/src/Volo.Abp.Castle.Core/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Castle.Core/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Castle.Core/FodyWeavers.xsd b/framework/src/Volo.Abp.Castle.Core/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Castle.Core/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj b/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj index 3d01363064..24f7fbe682 100644 --- a/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj +++ b/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj @@ -1,5 +1,6 @@ - + + @@ -22,4 +23,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapter.cs b/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapter.cs index 7fbc9fdf0a..89f3713521 100644 --- a/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapter.cs +++ b/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapter.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Castle.DynamicProxy public override async Task ProceedAsync() { - await Proceed(Invocation, ProceedInfo).ConfigureAwait(false); + await Proceed(Invocation, ProceedInfo); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAsyncAbpInterceptorAdapter.cs b/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAsyncAbpInterceptorAdapter.cs index bd379f442d..8a0c4fdd45 100644 --- a/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAsyncAbpInterceptorAdapter.cs +++ b/framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAsyncAbpInterceptorAdapter.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Castle.DynamicProxy { await _abpInterceptor.InterceptAsync( new CastleAbpMethodInvocationAdapter(invocation, proceedInfo, proceed) - ).ConfigureAwait(false); + ); } protected override async Task InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func> proceed) @@ -28,7 +28,7 @@ namespace Volo.Abp.Castle.DynamicProxy await _abpInterceptor.InterceptAsync( adapter - ).ConfigureAwait(false); + ); return (TResult)adapter.ReturnValue; } diff --git a/framework/src/Volo.Abp.Cli.Core/FodyWeavers.xml b/framework/src/Volo.Abp.Cli.Core/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/FodyWeavers.xsd b/framework/src/Volo.Abp.Cli.Core/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index 1ddfe2abec..0b9306be91 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -1,5 +1,6 @@ - + + @@ -30,4 +31,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs index a8ac0e0357..9125a0c8ab 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Cli.Auth { var configuration = new IdentityClientConfiguration( CliUrls.AccountAbpIo, - "role email abpio abpio_www abpio_commercial", + "role email abpio abpio_www abpio_commercial offline_access", "abp-cli", "1q2w3e*", OidcConstants.GrantTypes.Password, @@ -35,7 +35,7 @@ namespace Volo.Abp.Cli.Auth configuration["[o]abp-organization-name"] = organizationName; } - var accessToken = await AuthenticationService.GetAccessTokenAsync(configuration).ConfigureAwait(false); + var accessToken = await AuthenticationService.GetAccessTokenAsync(configuration); File.WriteAllText(CliPaths.AccessToken, accessToken, Encoding.UTF8); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliConsts.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliConsts.cs index e4ddf2a3ee..b062388c7a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliConsts.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliConsts.cs @@ -5,5 +5,7 @@ public const string Command = "AbpCliCommand"; public const string BranchPrefix = "branch@"; + + public const string DocsLink = "https://docs.abp.io"; } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index b53327cba3..436e169aad 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -41,7 +41,7 @@ namespace Volo.Abp.Cli { Logger.LogInformation("ABP CLI (https://abp.io)"); - await CheckCliVersionAsync().ConfigureAwait(false); + await CheckCliVersionAsync(); var commandLineArgs = CommandLineArgumentParser.Parse(args); var commandType = CommandSelector.Select(commandLineArgs); @@ -52,7 +52,7 @@ namespace Volo.Abp.Cli try { - await command.ExecuteAsync(commandLineArgs).ConfigureAwait(false); + await command.ExecuteAsync(commandLineArgs); } catch (CliUsageException usageException) { @@ -69,14 +69,14 @@ namespace Volo.Abp.Cli { var assembly = typeof(CliService).Assembly; var toolPath = GetToolPath(assembly); - var currentCliVersion = await GetCurrentCliVersion(assembly).ConfigureAwait(false); + var currentCliVersion = await GetCurrentCliVersion(assembly); var updateChannel = GetUpdateChannel(currentCliVersion); Logger.LogInformation($"Version {currentCliVersion} ({updateChannel} channel)"); try { - var latestVersion = await GetLatestVersion(updateChannel).ConfigureAwait(false); + var latestVersion = await GetLatestVersion(updateChannel); if (latestVersion != null && latestVersion > currentCliVersion) { @@ -106,7 +106,7 @@ namespace Volo.Abp.Cli var consoleOutput = new StringReader(CmdHelper.RunCmdAndGetOutput($"dotnet tool list -g")); string line; - while ((line = await consoleOutput.ReadLineAsync().ConfigureAwait(false)) != null) + while ((line = await consoleOutput.ReadLineAsync()) != null) { if (line.StartsWith("volo.abp.cli", StringComparison.InvariantCultureIgnoreCase)) { @@ -155,13 +155,13 @@ namespace Volo.Abp.Cli switch (updateChannel) { case UpdateChannel.Stable: - return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli").ConfigureAwait(false); + return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli"); case UpdateChannel.Prerelease: - return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli", includePreviews: true).ConfigureAwait(false); + return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli", includePreviews: true); case UpdateChannel.Nightly: - return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli", includeNightly: true).ConfigureAwait(false); + return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli", includeNightly: true); default: return default; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs index d8715c2700..58adc65fc4 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs @@ -42,7 +42,7 @@ namespace Volo.Abp.Cli.Commands commandLineArgs.Target, commandLineArgs.Options.GetOrNull(Options.StartupProject.Short, Options.StartupProject.Long), skipDbMigrations - ).ConfigureAwait(false); + ); } public string GetUsageInfo() diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs index cbfde5610f..03e228f255 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Cli.Commands await ProjectNugetPackageAdder.AddAsync( GetProjectFile(commandLineArgs), commandLineArgs.Target - ).ConfigureAwait(false); + ); } public string GetUsageInfo() diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs index edd7bd985a..e1536c2973 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs @@ -79,7 +79,7 @@ namespace Volo.Abp.Cli.Commands gitHubLocalRepositoryPath, commandLineArgs.Options ) - ).ConfigureAwait(false); + ); using (var templateFileStream = new MemoryStream(result.ZipContent)) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs index 175f45aa75..fe9ed2d98f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs @@ -48,7 +48,7 @@ namespace Volo.Abp.Cli.Commands commandLineArgs.Target, password, commandLineArgs.Options.GetOrNull(Options.Organization.Short, Options.Organization.Long) - ).ConfigureAwait(false); + ); Logger.LogInformation($"Successfully logged in as '{commandLineArgs.Target}'"); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index 1314f058c2..9cfa702fd7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -97,7 +97,7 @@ namespace Volo.Abp.Cli.Commands gitHubLocalRepositoryPath, commandLineArgs.Options ) - ).ConfigureAwait(false); + ); using (var templateFileStream = new MemoryStream(result.ZipContent)) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs index 1697489d71..a47a865617 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs @@ -36,12 +36,12 @@ namespace Volo.Abp.Cli.Commands case "install": Logger.LogInformation("Installing ABP Suite..."); - await InstallSuiteAsync().ConfigureAwait(false); + await InstallSuiteAsync(); break; case "update": Logger.LogInformation("Updating ABP Suite..."); - await UpdateSuiteAsync().ConfigureAwait(false); + await UpdateSuiteAsync(); break; case "remove": @@ -53,7 +53,7 @@ namespace Volo.Abp.Cli.Commands private async Task InstallSuiteAsync() { - var nugetIndexUrl = await GetNuGetIndexUrlAsync().ConfigureAwait(false); + var nugetIndexUrl = await GetNuGetIndexUrlAsync(); if (nugetIndexUrl == null) { @@ -71,7 +71,7 @@ namespace Volo.Abp.Cli.Commands private async Task UpdateSuiteAsync() { - var nugetIndexUrl = await GetNuGetIndexUrlAsync().ConfigureAwait(false); + var nugetIndexUrl = await GetNuGetIndexUrlAsync(); if (nugetIndexUrl == null) { @@ -106,7 +106,7 @@ namespace Volo.Abp.Cli.Commands private async Task GetNuGetIndexUrlAsync() { - var apiKeyResult = await _apiKeyService.GetApiKeyOrNullAsync().ConfigureAwait(false); + var apiKeyResult = await _apiKeyService.GetApiKeyOrNullAsync(); if (apiKeyResult == null || string.IsNullOrEmpty(apiKeyResult.ApiKey)) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs index 166720c64e..d201790c94 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Cli.Commands if (updateNuget || !updateNpm) { - await UpdateNugetPackages(commandLineArgs, directory).ConfigureAwait(false); + await UpdateNugetPackages(commandLineArgs, directory); } if (updateNpm || !updateNuget) @@ -62,7 +62,7 @@ namespace Volo.Abp.Cli.Commands { var solutionName = Path.GetFileName(solution).RemovePostFix(".sln"); - await _nugetPackagesVersionUpdater.UpdateSolutionAsync(solution, includePreviews).ConfigureAwait(false); + await _nugetPackagesVersionUpdater.UpdateSolutionAsync(solution, includePreviews); Logger.LogInformation($"Volo packages are updated in {solutionName} solution."); return; @@ -74,7 +74,7 @@ namespace Volo.Abp.Cli.Commands { var projectName = Path.GetFileName(project).RemovePostFix(".csproj"); - await _nugetPackagesVersionUpdater.UpdateProjectAsync(project, includePreviews).ConfigureAwait(false); + await _nugetPackagesVersionUpdater.UpdateProjectAsync(project, includePreviews); Logger.LogInformation($"Volo packages are updated in {projectName} project."); return; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs index a22b6bba4a..cddead548f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs @@ -75,16 +75,16 @@ namespace Volo.Abp.Cli.Licensing $"Waiting {timeSpan.TotalSeconds} secs for the next try..."); } }) - .ExecuteAsync(async () => await client.GetAsync(url).ConfigureAwait(false)).ConfigureAwait(false); + .ExecuteAsync(async () => await client.GetAsync(url)); if (!response.IsSuccessStatusCode) { throw new Exception($"ERROR: Remote server returns '{response.StatusCode}'"); } - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response).ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response); - var responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var responseContent = await response.Content.ReadAsStringAsync(); var apiKeyResult = JsonSerializer.Deserialize(responseContent); return apiKeyResult; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/DeveloperApiKeyResult.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/DeveloperApiKeyResult.cs index 481aa6f404..fb3622f6eb 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/DeveloperApiKeyResult.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/DeveloperApiKeyResult.cs @@ -8,6 +8,7 @@ namespace Volo.Abp.Cli.Licensing public string OrganizationName { get; set; } public string ApiKey { get; set; } public DateTime? LicenseEndTime { get; set; } + public bool CanDownloadSourceCode { get; set; } public string LicenseCode { get; set; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs index 37d487f106..3cdd658403 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs @@ -50,12 +50,12 @@ namespace Volo.Abp.Cli.NuGet using (var client = new CliHttpClient(setBearerToken: false)) { - var responseMessage = await GetHttpResponseMessageWithRetryAsync(client, url).ConfigureAwait(false); + var responseMessage = await GetHttpResponseMessageWithRetryAsync(client, url); if (responseMessage.StatusCode == HttpStatusCode.NotFound) { - var commercialNuGetUrl = await GetNuGetUrlForCommercialPackage(packageId).ConfigureAwait(false); - responseMessage = await GetHttpResponseMessageWithRetryAsync(client, commercialNuGetUrl).ConfigureAwait(false); + var commercialNuGetUrl = await GetNuGetUrlForCommercialPackage(packageId); + responseMessage = await GetHttpResponseMessageWithRetryAsync(client, commercialNuGetUrl); } if (!responseMessage.IsSuccessStatusCode) @@ -63,9 +63,9 @@ namespace Volo.Abp.Cli.NuGet throw new Exception($"ERROR: Remote server returns '{responseMessage.StatusCode}'"); } - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage).ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage); - var responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); + var responseContent = await responseMessage.Content.ReadAsStringAsync(); var versions = JsonSerializer .Deserialize(responseContent) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs index a422f0ff44..fd0a0e5246 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs @@ -49,7 +49,7 @@ namespace Volo.Abp.Cli.ProjectBuilding string version = null) { - var latestVersion = await GetLatestSourceCodeVersionAsync(name, type).ConfigureAwait(false); + var latestVersion = await GetLatestSourceCodeVersionAsync(name, type); if (version == null) { version = latestVersion; @@ -73,7 +73,7 @@ namespace Volo.Abp.Cli.ProjectBuilding Type = type, Version = version } - ).ConfigureAwait(false); + ); if (Options.CacheTemplates) { @@ -98,11 +98,11 @@ namespace Volo.Abp.Cli.ProjectBuilding MimeTypes.Application.Json ), CancellationTokenProvider.Token - ).ConfigureAwait(false); + ); - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response).ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response); - var result = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var result = await response.Content.ReadAsStringAsync(); return JsonSerializer.Deserialize(result).Version; } @@ -118,11 +118,11 @@ namespace Volo.Abp.Cli.ProjectBuilding $"{CliUrls.WwwAbpIo}api/download/{input.Type}/", new StringContent(postData, Encoding.UTF8, MimeTypes.Application.Json), CancellationTokenProvider.Token - ).ConfigureAwait(false); + ); - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage).ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage); - return await responseMessage.Content.ReadAsByteArrayAsync().ConfigureAwait(false); + return await responseMessage.Content.ReadAsByteArrayAsync(); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Analyticses/CliAnalyticsCollect.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Analyticses/CliAnalyticsCollect.cs index 79fc70cfcc..fdfbb8b5d3 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Analyticses/CliAnalyticsCollect.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Analyticses/CliAnalyticsCollect.cs @@ -38,12 +38,12 @@ namespace Volo.Abp.Cli.ProjectBuilding.Analyticses $"{CliUrls.WwwAbpIo}api/clianalytics/collect", new StringContent(postData, Encoding.UTF8, MimeTypes.Application.Json), _cancellationTokenProvider.Token - ).ConfigureAwait(false); + ); if (!responseMessage.IsSuccessStatusCode) { var exceptionMessage = "Remote server returns '" + (int)responseMessage.StatusCode + "-" + responseMessage.ReasonPhrase + "'. "; - var remoteServiceErrorMessage = await _remoteServiceExceptionHandler.GetAbpRemoteServiceErrorAsync(responseMessage).ConfigureAwait(false); + var remoteServiceErrorMessage = await _remoteServiceExceptionHandler.GetAbpRemoteServiceErrorAsync(responseMessage); if (remoteServiceErrorMessage != null) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ModuleInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ModuleInfo.cs index dfeabf6aed..fadd830c93 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ModuleInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ModuleInfo.cs @@ -7,5 +7,19 @@ public string Namespace { get; set; } public string DocumentUrl { get; set; } + + public string DisplayName { get; set; } + + public string ShortDescription { get; set; } + + public bool IsPro { get; set; } + + public bool EfCoreSupport { get; set; } + + public bool MongoDBSupport { get; set; } + + public bool AngularUi { get; set; } + + public bool MvcUi { get; set; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/IModuleInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/IModuleInfoProvider.cs index bb8d0d72cb..e9504ca3ef 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/IModuleInfoProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/IModuleInfoProvider.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Collections.Generic; +using System.Threading.Tasks; using Volo.Abp.Cli.ProjectBuilding.Building; namespace Volo.Abp.Cli.ProjectBuilding @@ -6,5 +7,7 @@ namespace Volo.Abp.Cli.ProjectBuilding public interface IModuleInfoProvider { Task GetAsync(string name); + + Task> GetModuleListAsync(); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleInfoProvider.cs index 8f8310977e..f0472ad4df 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleInfoProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleInfoProvider.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.Cli.ProjectBuilding public async Task GetAsync(string name) { - var moduleList = await GetModuleListAsync().ConfigureAwait(false); + var moduleList = await GetModuleListInternalAsync(); var module = moduleList.FirstOrDefault(m => m.Name == name); @@ -40,17 +40,22 @@ namespace Volo.Abp.Cli.ProjectBuilding return module; } - private async Task> GetModuleListAsync() + public async Task> GetModuleListAsync() + { + return await GetModuleListInternalAsync(); + } + + private async Task> GetModuleListInternalAsync() { using (var client = new CliHttpClient()) { var responseMessage = await client.GetAsync( $"{CliUrls.WwwAbpIo}api/download/modules/", CancellationTokenProvider.Token - ).ConfigureAwait(false); + ); - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage).ConfigureAwait(false); - var result = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage); + var result = await responseMessage.Content.ReadAsStringAsync(); return JsonSerializer.Deserialize>(result); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs index f853a9ec15..48f109e1d3 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs @@ -43,15 +43,15 @@ namespace Volo.Abp.Cli.ProjectBuilding public async Task BuildAsync(ProjectBuildArgs args) { - var moduleInfo = await GetModuleInfoAsync(args).ConfigureAwait(false); + var moduleInfo = await GetModuleInfoAsync(args); var templateFile = await SourceCodeStore.GetAsync( args.TemplateName, SourceCodeTypes.Module, args.Version - ).ConfigureAwait(false); + ); - var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync().ConfigureAwait(false); + var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync(); if (apiKeyResult?.ApiKey != null) { args.ExtraProperties["api-key"] = apiKeyResult.ApiKey; @@ -96,14 +96,14 @@ namespace Volo.Abp.Cli.ProjectBuilding ProjectName = null, TemplateName = args.TemplateName, TemplateVersion = templateFile.Version - }).ConfigureAwait(false); + }); return new ProjectBuildResult(context.Result.ZipContent, args.TemplateName); } private async Task GetModuleInfoAsync(ProjectBuildArgs args) { - return await ModuleInfoProvider.GetAsync(args.TemplateName).ConfigureAwait(false); + return await ModuleInfoProvider.GetAsync(args.TemplateName); } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs index 8a1af93f23..744641bb8a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.Cli.ProjectBuilding var exceptionMessage = "Remote server returns '" + (int) responseMessage.StatusCode + "-" + responseMessage.ReasonPhrase + "'. "; - var remoteServiceErrorMessage = await GetAbpRemoteServiceErrorAsync(responseMessage).ConfigureAwait(false); + var remoteServiceErrorMessage = await GetAbpRemoteServiceErrorAsync(responseMessage); if (remoteServiceErrorMessage != null) { exceptionMessage += remoteServiceErrorMessage; @@ -52,7 +52,7 @@ namespace Volo.Abp.Cli.ProjectBuilding errorResult = _jsonSerializer.Deserialize ( await responseMessage.Content.ReadAsStringAsync() -.ConfigureAwait(false)); + ); } catch (JsonReaderException) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs index 87c399181d..9d31e10200 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs @@ -51,9 +51,9 @@ namespace Volo.Abp.Cli.ProjectBuilding args.TemplateName, SourceCodeTypes.Template, args.Version - ).ConfigureAwait(false); + ); - var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync().ConfigureAwait(false); + var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync(); if (apiKeyResult?.ApiKey != null) { args.ExtraProperties["api-key"] = apiKeyResult.ApiKey; @@ -103,7 +103,7 @@ namespace Volo.Abp.Cli.ProjectBuilding ProjectName = args.SolutionName.FullName, TemplateName = args.TemplateName, TemplateVersion = templateFile.Version - }).ConfigureAwait(false); + }); return new ProjectBuildResult(context.Result.ZipContent, args.SolutionName.ProjectName); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppProTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppProTemplate.cs index 1b05b887c5..20f7fb84c9 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppProTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppProTemplate.cs @@ -10,7 +10,7 @@ public AppProTemplate() : base(TemplateName) { - + DocumentUrl = CliConsts.DocsLink + "/en/commercial/latest"; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplate.cs index 030a0a8752..c4a9f7b6da 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplate.cs @@ -10,7 +10,7 @@ public AppTemplate() : base(TemplateName) { - + DocumentUrl = CliConsts.DocsLink + "/en/abp/latest/Startup-Templates/Application"; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs index 1ca4a7f287..254e8d80ae 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs @@ -10,7 +10,6 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App protected AppTemplateBase(string templateName) : base(templateName, DatabaseProvider.EntityFrameworkCore, UiFramework.Mvc) { - DocumentUrl = "https://docs.abp.io/en/abp/latest/Startup-Templates/Application"; } public static bool IsAppTemplate(string templateName) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/EfCoreMigrationAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/EfCoreMigrationAdder.cs index 1c8727852b..b125c55648 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/EfCoreMigrationAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/EfCoreMigrationAdder.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Cli.ProjectModification var moduleName = ParseModuleName(module); var migrationName = "Added_" + moduleName + "_Module" + GetUniquePostFix(); - CmdHelper.RunCmd("cd \"" + Path.GetDirectoryName(csprojFile) + "\" & dotnet ef migrations add " + migrationName + GetStartupProjectOption(startupProject)); + CmdHelper.RunCmd("cd \"" + Path.GetDirectoryName(csprojFile) + "\" && dotnet ef migrations add " + migrationName + GetStartupProjectOption(startupProject)); if (updateDatabase) { @@ -22,7 +22,7 @@ namespace Volo.Abp.Cli.ProjectModification protected void UpdateDatabase(string csprojFile, string startupProject) { - CmdHelper.RunCmd("cd \"" + Path.GetDirectoryName(csprojFile) + "\" & dotnet ef database update" + GetStartupProjectOption(startupProject)); + CmdHelper.RunCmd("cd \"" + Path.GetDirectoryName(csprojFile) + "\" && dotnet ef database update" + GetStartupProjectOption(startupProject)); } protected virtual string ParseModuleName(string fullModuleName) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs index 76b7584ae8..62dee30344 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs @@ -45,7 +45,7 @@ namespace Volo.Abp.Cli.ProjectModification await AddAsync( projectFile, await FindNugetPackageInfoAsync(packageName) -.ConfigureAwait(false)).ConfigureAwait(false); + ); } public Task AddAsync(string projectFile, NugetPackageInfo package) @@ -81,7 +81,7 @@ namespace Volo.Abp.Cli.ProjectModification { var url = $"{CliUrls.WwwAbpIo}api/app/nugetPackage/byName/?name=" + moduleName; - var response = await client.GetAsync(url).ConfigureAwait(false); + var response = await client.GetAsync(url); if (!response.IsSuccessStatusCode) { @@ -90,10 +90,10 @@ namespace Volo.Abp.Cli.ProjectModification throw new CliUsageException($"'{moduleName}' nuget package could not be found!"); } - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response).ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response); } - var responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var responseContent = await response.Content.ReadAsStringAsync(); return JsonSerializer.Deserialize(responseContent); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs index 012d5e7bcf..d8a376eb02 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs @@ -57,7 +57,7 @@ namespace Volo.Abp.Cli.ProjectModification Check.NotNull(solutionFile, nameof(solutionFile)); Check.NotNull(moduleName, nameof(moduleName)); - var module = await FindModuleInfoAsync(moduleName).ConfigureAwait(false); + var module = await FindModuleInfoAsync(moduleName); Logger.LogInformation($"Installing module '{module.Name}' to the solution '{Path.GetFileNameWithoutExtension(solutionFile)}'"); @@ -72,7 +72,7 @@ namespace Volo.Abp.Cli.ProjectModification continue; } - await ProjectNugetPackageAdder.AddAsync(targetProjectFile, nugetPackage).ConfigureAwait(false); + await ProjectNugetPackageAdder.AddAsync(targetProjectFile, nugetPackage); } if (!module.NpmPackages.IsNullOrEmpty()) @@ -86,7 +86,7 @@ namespace Volo.Abp.Cli.ProjectModification { foreach (var npmPackage in module.NpmPackages.Where(p => p.ApplicationType.HasFlag(NpmApplicationType.Mvc))) { - await ProjectNpmPackageAdder.AddAsync(Path.GetDirectoryName(targetProject), npmPackage).ConfigureAwait(false); + await ProjectNpmPackageAdder.AddAsync(Path.GetDirectoryName(targetProject), npmPackage); } } } @@ -106,6 +106,11 @@ namespace Volo.Abp.Cli.ProjectModification return; } + if (string.IsNullOrWhiteSpace(startupProject)) + { + startupProject = projectFiles.FirstOrDefault(p => p.EndsWith(".DbMigrator.csproj")); + } + var dbMigrationsProject = projectFiles.FirstOrDefault(p => p.EndsWith(".DbMigrations.csproj")); if (dbMigrationsProject == null) @@ -137,7 +142,7 @@ namespace Volo.Abp.Cli.ProjectModification { var url = $"{CliUrls.WwwAbpIo}api/app/module/byName/?name=" + moduleName; - var response = await client.GetAsync(url).ConfigureAwait(false); + var response = await client.GetAsync(url); if (!response.IsSuccessStatusCode) { @@ -146,10 +151,10 @@ namespace Volo.Abp.Cli.ProjectModification throw new CliUsageException($"ERROR: '{moduleName}' module could not be found!"); } - await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response).ConfigureAwait(false); + await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response); } - var responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var responseContent = await response.Content.ReadAsStringAsync(); return JsonSerializer.Deserialize(responseContent); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs index 4137c7b645..d5756a4566 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs @@ -27,20 +27,20 @@ namespace Volo.Abp.Cli.ProjectModification foreach (var filePath in projectPaths) { - await UpdateInternalAsync(filePath, includePreviews).ConfigureAwait(false); + await UpdateInternalAsync(filePath, includePreviews); } } public async Task UpdateProjectAsync(string projectPath, bool includePreviews) { - await UpdateInternalAsync(projectPath, includePreviews).ConfigureAwait(false); + await UpdateInternalAsync(projectPath, includePreviews); } protected virtual async Task UpdateInternalAsync(string projectPath, bool includePreviews) { var fileContent = File.ReadAllText(projectPath); - File.WriteAllText(projectPath, await UpdateVoloPackagesAsync(fileContent, includePreviews).ConfigureAwait(false)); + File.WriteAllText(projectPath, await UpdateVoloPackagesAsync(fileContent, includePreviews)); } private async Task UpdateVoloPackagesAsync(string content, bool includePreviews) @@ -74,7 +74,7 @@ namespace Volo.Abp.Cli.ProjectModification Logger.LogDebug("Checking package: \"{0}\" - Current version: {1}", packageId, packageVersion); - var latestVersion = await _nuGetService.GetLatestVersionOrNullAsync(packageId, includePreviews).ConfigureAwait(false); + var latestVersion = await _nuGetService.GetLatestVersionOrNullAsync(packageId, includePreviews); if (latestVersion != null && packageVersion < latestVersion) { diff --git a/framework/src/Volo.Abp.Cli/FodyWeavers.xml b/framework/src/Volo.Abp.Cli/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/FodyWeavers.xsd b/framework/src/Volo.Abp.Cli/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index 333311afd2..f6bcbd5def 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Core/FodyWeavers.xml b/framework/src/Volo.Abp.Core/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Core/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/FodyWeavers.xsd b/framework/src/Volo.Abp.Core/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Core/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/System/IO/AbpStreamExtensions.cs b/framework/src/Volo.Abp.Core/System/IO/AbpStreamExtensions.cs index 206de7be0d..e87ab67527 100644 --- a/framework/src/Volo.Abp.Core/System/IO/AbpStreamExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/IO/AbpStreamExtensions.cs @@ -17,7 +17,7 @@ namespace System.IO { using (var memoryStream = new MemoryStream()) { - await stream.CopyToAsync(memoryStream).ConfigureAwait(false); + await stream.CopyToAsync(memoryStream); return memoryStream.ToArray(); } } diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index 42c60785ba..5ffc15d19f 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -1,5 +1,6 @@ - - + + + netstandard2.0 Volo.Abp.Core @@ -29,4 +30,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs index 49a86c388a..21ca7c2086 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs @@ -54,7 +54,7 @@ namespace Volo.Abp.IO { using (var reader = File.OpenText(path)) { - return await reader.ReadToEndAsync().ConfigureAwait(false); + return await reader.ReadToEndAsync(); } } @@ -68,7 +68,7 @@ namespace Volo.Abp.IO using (var stream = File.Open(path, FileMode.Open)) { var result = new byte[stream.Length]; - await stream.ReadAsync(result, 0, (int)stream.Length).ConfigureAwait(false); + await stream.ReadAsync(result, 0, (int)stream.Length); return result; } } diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Threading/AsyncOneTimeRunner.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Threading/AsyncOneTimeRunner.cs index 44bd73c074..7b440ebfe6 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Threading/AsyncOneTimeRunner.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Threading/AsyncOneTimeRunner.cs @@ -21,14 +21,14 @@ namespace Volo.Abp.Threading return; } - using (await _semaphore.LockAsync().ConfigureAwait(false)) + using (await _semaphore.LockAsync()) { if (_runBefore) { return; } - await action().ConfigureAwait(false); + await action(); _runBefore = true; } diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Threading/InternalAsyncHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Threading/InternalAsyncHelper.cs index ce04a02479..3697d59e3f 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Threading/InternalAsyncHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Threading/InternalAsyncHelper.cs @@ -14,8 +14,8 @@ namespace Volo.Abp.Threading Exception exception = null; try - { - await actualReturnValue.ConfigureAwait(false); + { + await actualReturnValue; } catch (Exception ex) { @@ -33,9 +33,9 @@ namespace Volo.Abp.Threading Exception exception = null; try - { - await actualReturnValue.ConfigureAwait(false); - await postAction().ConfigureAwait(false); + { + await actualReturnValue; + await postAction(); } catch (Exception ex) { @@ -55,15 +55,15 @@ namespace Volo.Abp.Threading try { if (preAction != null) - { - await preAction().ConfigureAwait(false); - } - - await actualReturnValue().ConfigureAwait(false); + { + await preAction(); + } + + await actualReturnValue(); if (postAction != null) - { - await postAction().ConfigureAwait(false); + { + await postAction(); } } catch (Exception ex) @@ -86,7 +86,7 @@ namespace Volo.Abp.Threading try { - return await actualReturnValue.ConfigureAwait(false); + return await actualReturnValue; } catch (Exception ex) { @@ -114,8 +114,8 @@ namespace Volo.Abp.Threading try { - var result = await actualReturnValue.ConfigureAwait(false); - await postAction().ConfigureAwait(false); + var result = await actualReturnValue; + await postAction(); return result; } catch (Exception ex) @@ -145,15 +145,15 @@ namespace Volo.Abp.Threading try { if (preAction != null) - { - await preAction().ConfigureAwait(false); + { + await preAction(); } - var result = await actualReturnValue().ConfigureAwait(false); + var result = await actualReturnValue(); if (postAction != null) - { - await postAction().ConfigureAwait(false); + { + await postAction(); } return result; diff --git a/framework/src/Volo.Abp.Dapper/FodyWeavers.xml b/framework/src/Volo.Abp.Dapper/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Dapper/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Dapper/FodyWeavers.xsd b/framework/src/Volo.Abp.Dapper/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Dapper/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj index f7b9d76169..27a92976e5 100644 --- a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj +++ b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.Dapper Volo.Abp.Dapper $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -21,4 +22,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Data/FodyWeavers.xml b/framework/src/Volo.Abp.Data/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Data/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Data/FodyWeavers.xsd b/framework/src/Volo.Abp.Data/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Data/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj b/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj index d2734cb119..7a53782ae1 100644 --- a/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj +++ b/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs index a6a073b67b..c20badbeb7 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.Data .ServiceProvider .GetRequiredService(contributorType); - await contributor.SeedAsync(context).ConfigureAwait(false); + await contributor.SeedAsync(context); } } } diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/FodyWeavers.xml b/framework/src/Volo.Abp.Ddd.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/FodyWeavers.xsd b/framework/src/Volo.Abp.Ddd.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj index 6f1674f8ce..6668f9c649 100644 --- a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + @@ -15,12 +16,12 @@ + - - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/zh-Hant.json b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/zh-Hant.json new file mode 100644 index 0000000000..97a615e901 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "MaxResultCountExceededExceptionMessage": "{0}禁止超過{1}! 請在伺服器端增加{2}.{3}以獲得更多結果." + } +} diff --git a/framework/src/Volo.Abp.Ddd.Application/FodyWeavers.xml b/framework/src/Volo.Abp.Ddd.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application/FodyWeavers.xsd b/framework/src/Volo.Abp.Ddd.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj b/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj index 09198e47f6..f88e0f4795 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj +++ b/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs index 038ba0cf29..32c90677b8 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Aspects; using Volo.Abp.Auditing; -using Volo.Abp.Authorization; using Volo.Abp.DependencyInjection; using Volo.Abp.Features; using Volo.Abp.Guids; @@ -146,7 +145,7 @@ namespace Volo.Abp.Application.Services return; } - await AuthorizationService.CheckAsync(policyName).ConfigureAwait(false); + await AuthorizationService.CheckAsync(policyName); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs index e5febca25b..4134b59a4c 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs @@ -93,24 +93,24 @@ namespace Volo.Abp.Application.Services public virtual async Task GetAsync(TKey id) { - await CheckGetPolicyAsync().ConfigureAwait(false); + await CheckGetPolicyAsync(); - var entity = await GetEntityByIdAsync(id).ConfigureAwait(false); + var entity = await GetEntityByIdAsync(id); return MapToGetOutputDto(entity); } public virtual async Task> GetListAsync(TGetListInput input) { - await CheckGetListPolicyAsync().ConfigureAwait(false); + await CheckGetListPolicyAsync(); var query = CreateFilteredQuery(input); - var totalCount = await AsyncQueryableExecuter.CountAsync(query).ConfigureAwait(false); + var totalCount = await AsyncQueryableExecuter.CountAsync(query); query = ApplySorting(query, input); query = ApplyPaging(query, input); - var entities = await AsyncQueryableExecuter.ToListAsync(query).ConfigureAwait(false); + var entities = await AsyncQueryableExecuter.ToListAsync(query); return new PagedResultDto( totalCount, @@ -120,34 +120,34 @@ namespace Volo.Abp.Application.Services public virtual async Task CreateAsync(TCreateInput input) { - await CheckCreatePolicyAsync().ConfigureAwait(false); + await CheckCreatePolicyAsync(); var entity = MapToEntity(input); TryToSetTenantId(entity); - await Repository.InsertAsync(entity, autoSave: true).ConfigureAwait(false); + await Repository.InsertAsync(entity, autoSave: true); return MapToGetOutputDto(entity); } public virtual async Task UpdateAsync(TKey id, TUpdateInput input) { - await CheckUpdatePolicyAsync().ConfigureAwait(false); + await CheckUpdatePolicyAsync(); - var entity = await GetEntityByIdAsync(id).ConfigureAwait(false); + var entity = await GetEntityByIdAsync(id); //TODO: Check if input has id different than given id and normalize if it's default value, throw ex otherwise MapToEntity(input, entity); - await Repository.UpdateAsync(entity, autoSave: true).ConfigureAwait(false); + await Repository.UpdateAsync(entity, autoSave: true); return MapToGetOutputDto(entity); } public virtual async Task DeleteAsync(TKey id) { - await CheckDeletePolicyAsync().ConfigureAwait(false); + await CheckDeletePolicyAsync(); - await Repository.DeleteAsync(id).ConfigureAwait(false); + await Repository.DeleteAsync(id); } protected virtual Task GetEntityByIdAsync(TKey id) @@ -157,27 +157,27 @@ namespace Volo.Abp.Application.Services protected virtual async Task CheckGetPolicyAsync() { - await CheckPolicyAsync(GetPolicyName).ConfigureAwait(false); + await CheckPolicyAsync(GetPolicyName); } protected virtual async Task CheckGetListPolicyAsync() { - await CheckPolicyAsync(GetListPolicyName).ConfigureAwait(false); + await CheckPolicyAsync(GetListPolicyName); } protected virtual async Task CheckCreatePolicyAsync() { - await CheckPolicyAsync(CreatePolicyName).ConfigureAwait(false); + await CheckPolicyAsync(CreatePolicyName); } protected virtual async Task CheckUpdatePolicyAsync() { - await CheckPolicyAsync(UpdatePolicyName).ConfigureAwait(false); + await CheckPolicyAsync(UpdatePolicyName); } protected virtual async Task CheckDeletePolicyAsync() { - await CheckPolicyAsync(DeletePolicyName).ConfigureAwait(false); + await CheckPolicyAsync(DeletePolicyName); } /// diff --git a/framework/src/Volo.Abp.Ddd.Domain/FodyWeavers.xml b/framework/src/Volo.Abp.Ddd.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Domain/FodyWeavers.xsd b/framework/src/Volo.Abp.Ddd.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj b/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj index cc1cb1494f..ab162e60c7 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs index 47e3571ffd..c9219feffc 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs @@ -36,14 +36,14 @@ namespace Volo.Abp.Domain.Entities.Events public async Task TriggerEventsAsync(EntityChangeReport changeReport) { - await TriggerEventsInternalAsync(changeReport).ConfigureAwait(false); + await TriggerEventsInternalAsync(changeReport); if (changeReport.IsEmpty() || UnitOfWorkManager.Current == null) { return; } - await UnitOfWorkManager.Current.SaveChangesAsync().ConfigureAwait(false); + await UnitOfWorkManager.Current.SaveChangesAsync(); } public virtual async Task TriggerEntityCreatingEventAsync(object entity) @@ -53,7 +53,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityCreatingEventData<>), entity, true - ).ConfigureAwait(false); + ); } public virtual async Task TriggerEntityCreatedEventOnUowCompletedAsync(object entity) @@ -63,7 +63,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityCreatedEventData<>), entity, false - ).ConfigureAwait(false); + ); var eto = EntityToEtoMapper.Map(entity); if (eto != null) @@ -73,7 +73,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityCreatedEto<>), eto, false - ).ConfigureAwait(false); + ); } } @@ -84,7 +84,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityUpdatingEventData<>), entity, true - ).ConfigureAwait(false); + ); } public virtual async Task TriggerEntityUpdatedEventOnUowCompletedAsync(object entity) @@ -94,7 +94,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityUpdatedEventData<>), entity, false - ).ConfigureAwait(false); + ); var eto = EntityToEtoMapper.Map(entity); if (eto != null) @@ -104,7 +104,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityUpdatedEto<>), eto, false - ).ConfigureAwait(false); + ); } } @@ -115,7 +115,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityDeletingEventData<>), entity, true - ).ConfigureAwait(false); + ); } public virtual async Task TriggerEntityDeletedEventOnUowCompletedAsync(object entity) @@ -125,7 +125,7 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityDeletedEventData<>), entity, false - ).ConfigureAwait(false); + ); var eto = EntityToEtoMapper.Map(entity); if (eto != null) @@ -135,15 +135,15 @@ namespace Volo.Abp.Domain.Entities.Events typeof(EntityDeletedEto<>), EntityToEtoMapper.Map(entity), false - ).ConfigureAwait(false); + ); } } protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport) { - await TriggerEntityChangeEvents(changeReport.ChangedEntities).ConfigureAwait(false); - await TriggerLocalEvents(changeReport.DomainEvents).ConfigureAwait(false); - await TriggerDistributedEvents(changeReport.DistributedEvents).ConfigureAwait(false); + await TriggerEntityChangeEvents(changeReport.ChangedEntities); + await TriggerLocalEvents(changeReport.DomainEvents); + await TriggerDistributedEvents(changeReport.DistributedEvents); } protected virtual async Task TriggerEntityChangeEvents(List changedEntities) @@ -153,16 +153,16 @@ namespace Volo.Abp.Domain.Entities.Events switch (changedEntity.ChangeType) { case EntityChangeType.Created: - await TriggerEntityCreatingEventAsync(changedEntity.Entity).ConfigureAwait(false); - await TriggerEntityCreatedEventOnUowCompletedAsync(changedEntity.Entity).ConfigureAwait(false); + await TriggerEntityCreatingEventAsync(changedEntity.Entity); + await TriggerEntityCreatedEventOnUowCompletedAsync(changedEntity.Entity); break; case EntityChangeType.Updated: - await TriggerEntityUpdatingEventAsync(changedEntity.Entity).ConfigureAwait(false); - await TriggerEntityUpdatedEventOnUowCompletedAsync(changedEntity.Entity).ConfigureAwait(false); + await TriggerEntityUpdatingEventAsync(changedEntity.Entity); + await TriggerEntityUpdatedEventOnUowCompletedAsync(changedEntity.Entity); break; case EntityChangeType.Deleted: - await TriggerEntityDeletingEventAsync(changedEntity.Entity).ConfigureAwait(false); - await TriggerEntityDeletedEventOnUowCompletedAsync(changedEntity.Entity).ConfigureAwait(false); + await TriggerEntityDeletingEventAsync(changedEntity.Entity); + await TriggerEntityDeletedEventOnUowCompletedAsync(changedEntity.Entity); break; default: throw new AbpException("Unknown EntityChangeType: " + changedEntity.ChangeType); @@ -174,7 +174,7 @@ namespace Volo.Abp.Domain.Entities.Events { foreach (var localEvent in localEvents) { - await LocalEventBus.PublishAsync(localEvent.EventData.GetType(), localEvent.EventData).ConfigureAwait(false); + await LocalEventBus.PublishAsync(localEvent.EventData.GetType(), localEvent.EventData); } } @@ -182,7 +182,7 @@ namespace Volo.Abp.Domain.Entities.Events { foreach (var distributedEvent in distributedEvents) { - await DistributedEventBus.PublishAsync(distributedEvent.EventData.GetType(), distributedEvent.EventData).ConfigureAwait(false); + await DistributedEventBus.PublishAsync(distributedEvent.EventData.GetType(), distributedEvent.EventData); } } @@ -193,7 +193,7 @@ namespace Volo.Abp.Domain.Entities.Events if (triggerInCurrentUnitOfWork || UnitOfWorkManager.Current == null) { - await eventPublisher.PublishAsync(eventType, Activator.CreateInstance(eventType, entity)).ConfigureAwait(false); + await eventPublisher.PublishAsync(eventType, Activator.CreateInstance(eventType, entity)); return; } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs index ae438fdd01..d13d52ed97 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs @@ -46,7 +46,7 @@ namespace Volo.Abp.Domain.Repositories { public virtual async Task GetAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, includeDetails, cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, includeDetails, cancellationToken); if (entity == null) { @@ -60,13 +60,13 @@ namespace Volo.Abp.Domain.Repositories public virtual async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, cancellationToken: cancellationToken); if (entity == null) { return; } - await DeleteAsync(entity, autoSave, cancellationToken).ConfigureAwait(false); + await DeleteAsync(entity, autoSave, cancellationToken); } } } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs index 358d36733e..29814f4de6 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs @@ -75,13 +75,13 @@ namespace Volo.Abp.Domain.Repositories public virtual async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, cancellationToken: cancellationToken); if (entity == null) { return; } - await DeleteAsync(entity, autoSave, cancellationToken).ConfigureAwait(false); + await DeleteAsync(entity, autoSave, cancellationToken); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs index 915b97a7d4..40ebca015e 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Domain.Repositories var repo = ProxyHelper.UnProxy(repository) as ISupportsExplicitLoading; if (repo != null) { - await repo.EnsureCollectionLoadedAsync(entity, propertyExpression, cancellationToken).ConfigureAwait(false); + await repo.EnsureCollectionLoadedAsync(entity, propertyExpression, cancellationToken); } } @@ -38,7 +38,7 @@ namespace Volo.Abp.Domain.Repositories var repo = ProxyHelper.UnProxy(repository) as ISupportsExplicitLoading; if (repo != null) { - await repo.EnsurePropertyLoadedAsync(entity, propertyExpression, cancellationToken).ConfigureAwait(false); + await repo.EnsurePropertyLoadedAsync(entity, propertyExpression, cancellationToken); } } } diff --git a/framework/src/Volo.Abp.Emailing/FodyWeavers.xml b/framework/src/Volo.Abp.Emailing/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/FodyWeavers.xsd b/framework/src/Volo.Abp.Emailing/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj b/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj index 40fe0b3610..be953a1f26 100644 --- a/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj +++ b/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderBase.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderBase.cs index aa38f874d6..f6588de9fb 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderBase.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderBase.cs @@ -32,29 +32,29 @@ namespace Volo.Abp.Emailing Subject = subject, Body = body, IsBodyHtml = isBodyHtml - }).ConfigureAwait(false); + }); } public virtual async Task SendAsync(string from, string to, string subject, string body, bool isBodyHtml = true) { - await SendAsync(new MailMessage(from, to, subject, body) { IsBodyHtml = isBodyHtml }).ConfigureAwait(false); + await SendAsync(new MailMessage(from, to, subject, body) { IsBodyHtml = isBodyHtml }); } public virtual async Task SendAsync(MailMessage mail, bool normalize = true) { if (normalize) { - await NormalizeMailAsync(mail).ConfigureAwait(false); + await NormalizeMailAsync(mail); } - await SendEmailAsync(mail).ConfigureAwait(false); + await SendEmailAsync(mail); } public virtual async Task QueueAsync(string to, string subject, string body, bool isBodyHtml = true) { if (!BackgroundJobManager.IsAvailable()) { - await SendAsync(to, subject, body, isBodyHtml).ConfigureAwait(false); + await SendAsync(to, subject, body, isBodyHtml); return; } @@ -66,7 +66,7 @@ namespace Volo.Abp.Emailing Body = body, IsBodyHtml = isBodyHtml } - ).ConfigureAwait(false); + ); } /// @@ -86,8 +86,8 @@ namespace Volo.Abp.Emailing if (mail.From == null || mail.From.Address.IsNullOrEmpty()) { mail.From = new MailAddress( - await Configuration.GetDefaultFromAddressAsync().ConfigureAwait(false), - await Configuration.GetDefaultFromDisplayNameAsync().ConfigureAwait(false), + await Configuration.GetDefaultFromAddressAsync(), + await Configuration.GetDefaultFromDisplayNameAsync(), Encoding.UTF8 ); } diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderConfiguration.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderConfiguration.cs index dafd5b8a4f..e02b78badd 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderConfiguration.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderConfiguration.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Emailing /// Value of the setting protected async Task GetNotEmptySettingValueAsync(string name) { - var value = await SettingProvider.GetOrNullAsync(name).ConfigureAwait(false); + var value = await SettingProvider.GetOrNullAsync(name); if (value.IsNullOrEmpty()) { diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/cs.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/cs.json new file mode 100644 index 0000000000..c4b1aaad40 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/cs.json @@ -0,0 +1,24 @@ +{ + "culture": "cs", + "texts": { + "DisplayName:Abp.Mailing.DefaultFromAddress": "Výchozí adresa odesílatele", + "DisplayName:Abp.Mailing.DefaultFromDisplayName": "Výchozí zobrazované jméno odesilátele", + "DisplayName:Abp.Mailing.Smtp.Host": "Hostitel", + "DisplayName:Abp.Mailing.Smtp.Port": "Port", + "DisplayName:Abp.Mailing.Smtp.UserName": "Uživatelské jméno", + "DisplayName:Abp.Mailing.Smtp.Password": "Heslo", + "DisplayName:Abp.Mailing.Smtp.Domain": "Doména", + "DisplayName:Abp.Mailing.Smtp.EnableSsl": "Povolit SSL", + "DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Použít výchozí přihlašovací údaje", + "Description:Abp.Mailing.DefaultFromAddress": "Výchozí adresa odesílatele", + "Description:Abp.Mailing.DefaultFromDisplayName": "Výchozí zobrazované jméno odesilátele", + "Description:Abp.Mailing.Smtp.Host": "Název nebo IP adresa hostitele použitého pro SMTP transakce.", + "Description:Abp.Mailing.Smtp.Port": "Port použitý pro SMTP tansakce", + "Description:Abp.Mailing.Smtp.UserName": "Uživatelské jméno spojené s přihlašovacími údaji.", + "Description:Abp.Mailing.Smtp.Password": "Heslo pro uživatelské jméno spojené s přihlašovacími údaji.", + "Description:Abp.Mailing.Smtp.Domain": "Název domény nebo počítače, který ověřuje přihlašovací údaje.", + "Description:Abp.Mailing.Smtp.EnableSsl": "Zda SmtpClient používá SSL k šifrování připojení.", + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Zda jsou výchozí přihlašovací údaje odesílány s požadavky." + } +} + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hant.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hant.json new file mode 100644 index 0000000000..a66a6d2ff8 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hant.json @@ -0,0 +1,23 @@ +{ + "culture": "zh-Hant", + "texts": { + "DisplayName:Abp.Mailing.DefaultFromAddress": "預設發信者地址", + "DisplayName:Abp.Mailing.DefaultFromDisplayName": "預設發信者名稱", + "DisplayName:Abp.Mailing.Smtp.Host": "主機", + "DisplayName:Abp.Mailing.Smtp.Port": "埠號", + "DisplayName:Abp.Mailing.Smtp.UserName": "使用者名稱", + "DisplayName:Abp.Mailing.Smtp.Password": "密碼", + "DisplayName:Abp.Mailing.Smtp.Domain": "網域", + "DisplayName:Abp.Mailing.Smtp.EnableSsl": "啟用SSL", + "DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "使用預設憑證", + "Description:Abp.Mailing.DefaultFromAddress": "預設的發信者地址.", + "Description:Abp.Mailing.DefaultFromDisplayName": "預設的發信者名稱.", + "Description:Abp.Mailing.Smtp.Host": "SMTP 服務的主機名稱或主機IP位址.", + "Description:Abp.Mailing.Smtp.Port": "SMTP 服務的埠號.", + "Description:Abp.Mailing.Smtp.UserName": "憑證使用者名稱.", + "Description:Abp.Mailing.Smtp.Password": "憑證使用者密碼.", + "Description:Abp.Mailing.Smtp.Domain": "驗證憑證的網域名稱或電腦名稱.", + "Description:Abp.Mailing.Smtp.EnableSsl": "設定 SmtpClient 是否使用安全通訊協定.", + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "設定是否使用預設憑證." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Smtp/SmtpEmailSender.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Smtp/SmtpEmailSender.cs index 84af1bf348..f97fd57b18 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Smtp/SmtpEmailSender.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Smtp/SmtpEmailSender.cs @@ -28,19 +28,19 @@ namespace Volo.Abp.Emailing.Smtp public async Task BuildClientAsync() { - var host = await SmtpConfiguration.GetHostAsync().ConfigureAwait(false); - var port = await SmtpConfiguration.GetPortAsync().ConfigureAwait(false); + var host = await SmtpConfiguration.GetHostAsync(); + var port = await SmtpConfiguration.GetPortAsync(); var smtpClient = new SmtpClient(host, port); try { - if (await SmtpConfiguration.GetEnableSslAsync().ConfigureAwait(false)) + if (await SmtpConfiguration.GetEnableSslAsync()) { smtpClient.EnableSsl = true; } - if (await SmtpConfiguration.GetUseDefaultCredentialsAsync().ConfigureAwait(false)) + if (await SmtpConfiguration.GetUseDefaultCredentialsAsync()) { smtpClient.UseDefaultCredentials = true; } @@ -48,11 +48,11 @@ namespace Volo.Abp.Emailing.Smtp { smtpClient.UseDefaultCredentials = false; - var userName = await SmtpConfiguration.GetUserNameAsync().ConfigureAwait(false); + var userName = await SmtpConfiguration.GetUserNameAsync(); if (!userName.IsNullOrEmpty()) { - var password = await SmtpConfiguration.GetPasswordAsync().ConfigureAwait(false); - var domain = await SmtpConfiguration.GetDomainAsync().ConfigureAwait(false); + var password = await SmtpConfiguration.GetPasswordAsync(); + var domain = await SmtpConfiguration.GetDomainAsync(); smtpClient.Credentials = !domain.IsNullOrEmpty() ? new NetworkCredential(userName, password, domain) : new NetworkCredential(userName, password); @@ -70,9 +70,9 @@ namespace Volo.Abp.Emailing.Smtp protected override async Task SendEmailAsync(MailMessage mail) { - using (var smtpClient = await BuildClientAsync().ConfigureAwait(false)) + using (var smtpClient = await BuildClientAsync()) { - await smtpClient.SendMailAsync(mail).ConfigureAwait(false); + await smtpClient.SendMailAsync(mail); } } } diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs index 61db6dec2e..29fcf08664 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs @@ -27,12 +27,12 @@ namespace Volo.Abp.Emailing.Templates public async Task GetAsync(string name) { - return await GetAsync(name, CultureInfo.CurrentUICulture.Name).ConfigureAwait(false); + return await GetAsync(name, CultureInfo.CurrentUICulture.Name); } public async Task GetAsync(string name, string cultureName) { - return await GetInternalAsync(name, cultureName).ConfigureAwait(false); + return await GetInternalAsync(name, cultureName); } protected virtual async Task GetInternalAsync(string name, string cultureName) @@ -59,11 +59,11 @@ namespace Volo.Abp.Emailing.Templates { var emailTemplate = new EmailTemplate(emailTemplateString, emailTemplateDefinition); - await SetLayoutAsync(emailTemplateDefinition, emailTemplate, cultureName).ConfigureAwait(false); + await SetLayoutAsync(emailTemplateDefinition, emailTemplate, cultureName); if (emailTemplateDefinition.SingleTemplateFile) { - await LocalizeAsync(emailTemplateDefinition, emailTemplate, cultureName).ConfigureAwait(false); + await LocalizeAsync(emailTemplateDefinition, emailTemplate, cultureName); } return emailTemplate; @@ -87,7 +87,7 @@ namespace Volo.Abp.Emailing.Templates layout = Options.DefaultLayout; } - var layoutTemplate = await GetInternalAsync(layout, cultureName).ConfigureAwait(false); + var layoutTemplate = await GetInternalAsync(layout, cultureName); emailTemplate.SetLayout(layoutTemplate); } diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/TemplateRender.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/TemplateRender.cs index 1713cf9f3f..8c4e24017c 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/TemplateRender.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/TemplateRender.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.Emailing.Templates public async Task RenderAsync(string template, object model = null) { var scribanTemplate = Template.Parse(template); - return await scribanTemplate.RenderAsync(model).ConfigureAwait(false); + return await scribanTemplate.RenderAsync(model); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/FodyWeavers.xml b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/FodyWeavers.xsd b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj index b63a2ae7cb..ebad209a50 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj @@ -1,9 +1,10 @@ - - + + + - netstandard2.1 + netstandard2.0 Volo.Abp.EntityFrameworkCore.MySQL Volo.Abp.EntityFrameworkCore.MySQL $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -18,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/FodyWeavers.xml b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/FodyWeavers.xsd b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj index 0154d1b773..ced9c624ad 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.EntityFrameworkCore.PostgreSql Volo.Abp.EntityFrameworkCore.PostgreSql $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/FodyWeavers.xml b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/FodyWeavers.xsd b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj index d0d338be9d..bc88ef83d1 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.EntityFrameworkCore.SqlServer Volo.Abp.EntityFrameworkCore.SqlServer $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/FodyWeavers.xml b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/FodyWeavers.xsd b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj index d3c5313898..7747d7faf2 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.EntityFrameworkCore.Sqlite Volo.Abp.EntityFrameworkCore.Sqlite $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/FodyWeavers.xml b/framework/src/Volo.Abp.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/FodyWeavers.xsd b/framework/src/Volo.Abp.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj index 3e83001eb2..d0d0c58601 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.EntityFrameworkCore Volo.Abp.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index 7890b9b50d..6c3eb689d8 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -46,7 +46,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } return savedEntity; @@ -60,7 +60,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } return updatedEntity; @@ -72,7 +72,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } } @@ -80,12 +80,12 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { return includeDetails ? await WithDetails().ToListAsync(GetCancellationToken(cancellationToken)) -.ConfigureAwait(false) : await DbSet.ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + : await DbSet.ToListAsync(GetCancellationToken(cancellationToken)); } public override async Task GetCountAsync(CancellationToken cancellationToken = default) { - return await DbSet.LongCountAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await DbSet.LongCountAsync(GetCancellationToken(cancellationToken)); } protected override IQueryable GetQueryable() @@ -97,7 +97,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { var entities = await GetQueryable() .Where(predicate) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); foreach (var entity in entities) { @@ -106,7 +106,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } } @@ -119,7 +119,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore await DbContext .Entry(entity) .Collection(propertyExpression) - .LoadAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .LoadAsync(GetCancellationToken(cancellationToken)); } public virtual async Task EnsurePropertyLoadedAsync( @@ -131,7 +131,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore await DbContext .Entry(entity) .Reference(propertyExpression) - .LoadAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .LoadAsync(GetCancellationToken(cancellationToken)); } public override IQueryable WithDetails() @@ -187,7 +187,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public virtual async Task GetAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, includeDetails, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + var entity = await FindAsync(id, includeDetails, GetCancellationToken(cancellationToken)); if (entity == null) { @@ -208,18 +208,18 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { return includeDetails ? await WithDetails().FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) -.ConfigureAwait(false) : await DbSet.FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + : await DbSet.FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); } public virtual async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, cancellationToken: cancellationToken); if (entity == null) { return; } - await DeleteAsync(entity, autoSave, cancellationToken).ConfigureAwait(false); + await DeleteAsync(entity, autoSave, cancellationToken); } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs index 422bca7d67..16c5c38389 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs @@ -117,9 +117,9 @@ namespace Volo.Abp.EntityFrameworkCore var changeReport = ApplyAbpConcepts(); - var result = await base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken).ConfigureAwait(false); + var result = await base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken); - await EntityChangeEventHelper.TriggerEventsAsync(changeReport).ConfigureAwait(false); + await EntityChangeEventHelper.TriggerEventsAsync(changeReport); if (auditLog != null) { diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs index d28468f306..155e639bff 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs @@ -224,18 +224,18 @@ namespace Volo.Abp.EntityFrameworkCore.EntityHistory return true; } - if (entityType.IsDefined(typeof(DisableAuditingAttribute), true)) + if (entityEntry.Metadata.GetProperties() + .Any(p => p.PropertyInfo?.IsDefined(typeof(AuditedAttribute)) ?? false)) { - return false; + return true; } - if (Options.EntityHistorySelectors.Any(selector => selector.Predicate(entityType))) + if (entityType.IsDefined(typeof(DisableAuditingAttribute), true)) { - return true; + return false; } - var properties = entityEntry.Metadata.GetProperties(); - if (properties.Any(p => p.PropertyInfo?.IsDefined(typeof(AuditedAttribute)) ?? false)) + if (Options.EntityHistorySelectors.Any(selector => selector.Predicate(entityType))) { return true; } @@ -265,8 +265,7 @@ namespace Volo.Abp.EntityFrameworkCore.EntityHistory } } - var isModified = !(propertyEntry.OriginalValue?.Equals(propertyEntry.CurrentValue) ?? propertyEntry.CurrentValue == null); - if (isModified) + if (propertyEntry.IsModified) { return true; } diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/FodyWeavers.xml b/framework/src/Volo.Abp.EventBus.RabbitMQ/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/FodyWeavers.xsd b/framework/src/Volo.Abp.EventBus.RabbitMQ/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj index c9bab15898..40787f3fb2 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index 9df352837a..c530437e6f 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -85,7 +85,7 @@ namespace Volo.Abp.EventBus.RabbitMq var eventData = Serializer.Deserialize(ea.Body, eventType); - await TriggerHandlersAsync(eventType, eventData).ConfigureAwait(false); + await TriggerHandlersAsync(eventType, eventData); } public IDisposable Subscribe(IDistributedEventHandler handler) where TEvent : class diff --git a/framework/src/Volo.Abp.EventBus/FodyWeavers.xml b/framework/src/Volo.Abp.EventBus/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus/FodyWeavers.xsd b/framework/src/Volo.Abp.EventBus/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj b/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj index ccce953cce..566767e111 100644 --- a/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj +++ b/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/ActionEventHandler.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/ActionEventHandler.cs index 3594ce3c96..a8763edd89 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/ActionEventHandler.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/ActionEventHandler.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.EventBus /// public async Task HandleEventAsync(TEvent eventData) { - await Action(eventData).ConfigureAwait(false); + await Action(eventData); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs index b77ed00945..a7883950d1 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs @@ -89,7 +89,7 @@ namespace Volo.Abp.EventBus { var exceptions = new List(); - await TriggerHandlersAsync(eventType, eventData, exceptions).ConfigureAwait(false); + await TriggerHandlersAsync(eventType, eventData, exceptions); if (exceptions.Any()) { @@ -110,7 +110,7 @@ namespace Volo.Abp.EventBus { foreach (var handlerFactory in handlerFactories.EventHandlerFactories) { - await TriggerHandlerAsync(handlerFactory, handlerFactories.EventType, eventData, exceptions).ConfigureAwait(false); + await TriggerHandlerAsync(handlerFactory, handlerFactories.EventType, eventData, exceptions); } } @@ -126,7 +126,7 @@ namespace Volo.Abp.EventBus var baseEventType = eventType.GetGenericTypeDefinition().MakeGenericType(baseArg); var constructorArgs = ((IEventDataWithInheritableGenericArgument)eventData).GetConstructorArgs(); var baseEventData = Activator.CreateInstance(baseEventType, constructorArgs); - await PublishAsync(baseEventType, baseEventData).ConfigureAwait(false); + await PublishAsync(baseEventType, baseEventData); } } } @@ -171,7 +171,7 @@ namespace Volo.Abp.EventBus new[] { eventType } ); - await ((Task)method.Invoke(eventHandlerWrapper.EventHandler, new[] { eventData })).ConfigureAwait(false); + await ((Task)method.Invoke(eventHandlerWrapper.EventHandler, new[] { eventData })); } else if (ReflectionHelper.IsAssignableToGenericType(handlerType, typeof(IDistributedEventHandler<>))) { @@ -182,7 +182,7 @@ namespace Volo.Abp.EventBus new[] { eventType } ); - await ((Task)method.Invoke(eventHandlerWrapper.EventHandler, new[] { eventData })).ConfigureAwait(false); + await ((Task)method.Invoke(eventHandlerWrapper.EventHandler, new[] { eventData })); } else { diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs index 117eeeb06f..7db5c18f01 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs @@ -119,7 +119,7 @@ namespace Volo.Abp.EventBus.Local { var exceptions = new List(); - await TriggerHandlersAsync(eventType, eventData, exceptions).ConfigureAwait(false); + await TriggerHandlersAsync(eventType, eventData, exceptions); if (exceptions.Any()) { diff --git a/framework/src/Volo.Abp.Features/FodyWeavers.xml b/framework/src/Volo.Abp.Features/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Features/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Features/FodyWeavers.xsd b/framework/src/Volo.Abp.Features/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Features/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj b/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj index 269f447fdf..a2d098f970 100644 --- a/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj +++ b/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs index 75c9c7ae5f..49ea1b3f4c 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.Features return null; } - return await FeatureStore.GetOrNullAsync(feature.Name, Name, editionId.Value.ToString()).ConfigureAwait(false); + return await FeatureStore.GetOrNullAsync(feature.Name, Name, editionId.Value.ToString()); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs index 0c90ea7573..0c653c3448 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs @@ -46,7 +46,7 @@ namespace Volo.Abp.Features providers = providers.Where(p => featureDefinition.AllowedProviders.Contains(p.Name)); } - return await GetOrNullValueFromProvidersAsync(providers, featureDefinition).ConfigureAwait(false); + return await GetOrNullValueFromProvidersAsync(providers, featureDefinition); } protected virtual async Task GetOrNullValueFromProvidersAsync( @@ -55,7 +55,7 @@ namespace Volo.Abp.Features { foreach (var provider in providers) { - var value = await provider.GetOrNullAsync(feature).ConfigureAwait(false); + var value = await provider.GetOrNullAsync(feature); if (value != null) { return value; diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerBase.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerBase.cs index 23c5c37431..a24e0901f7 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerBase.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerBase.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.Features public virtual async Task IsEnabledAsync(string name) { - var value = await GetOrNullAsync(name).ConfigureAwait(false); + var value = await GetOrNullAsync(name); if (value == null) { return false; diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerExtensions.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerExtensions.cs index d26f7be841..8850408df0 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerExtensions.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerExtensions.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.Features Check.NotNull(featureChecker, nameof(featureChecker)); Check.NotNull(name, nameof(name)); - var value = await featureChecker.GetOrNullAsync(name).ConfigureAwait(false); + var value = await featureChecker.GetOrNullAsync(name); return value?.To() ?? defaultValue; } @@ -32,7 +32,7 @@ namespace Volo.Abp.Features { foreach (var featureName in featureNames) { - if (!(await featureChecker.IsEnabledAsync(featureName).ConfigureAwait(false))) + if (!(await featureChecker.IsEnabledAsync(featureName))) { return false; } @@ -43,7 +43,7 @@ namespace Volo.Abp.Features foreach (var featureName in featureNames) { - if (await featureChecker.IsEnabledAsync(featureName).ConfigureAwait(false)) + if (await featureChecker.IsEnabledAsync(featureName)) { return true; } @@ -54,7 +54,7 @@ namespace Volo.Abp.Features public static async Task CheckEnabledAsync(this IFeatureChecker featureChecker, string featureName) { - if (!(await featureChecker.IsEnabledAsync(featureName).ConfigureAwait(false))) + if (!(await featureChecker.IsEnabledAsync(featureName))) { throw new AbpAuthorizationException("Feature is not enabled: " + featureName); } @@ -71,7 +71,7 @@ namespace Volo.Abp.Features { foreach (var featureName in featureNames) { - if (!(await featureChecker.IsEnabledAsync(featureName).ConfigureAwait(false))) + if (!(await featureChecker.IsEnabledAsync(featureName))) { throw new AbpAuthorizationException( "Required features are not enabled. All of these features must be enabled: " + @@ -84,7 +84,7 @@ namespace Volo.Abp.Features { foreach (var featureName in featureNames) { - if (await featureChecker.IsEnabledAsync(featureName).ConfigureAwait(false)) + if (await featureChecker.IsEnabledAsync(featureName)) { return; } diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureInterceptor.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureInterceptor.cs index 9f3d5dc356..9986af6275 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureInterceptor.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureInterceptor.cs @@ -19,12 +19,12 @@ namespace Volo.Abp.Features { if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.FeatureChecking)) { - await invocation.ProceedAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); return; } - await CheckFeaturesAsync(invocation).ConfigureAwait(false); - await invocation.ProceedAsync().ConfigureAwait(false); + await CheckFeaturesAsync(invocation); + await invocation.ProceedAsync(); } protected virtual async Task CheckFeaturesAsync(IAbpMethodInvocation invocation) @@ -33,7 +33,7 @@ namespace Volo.Abp.Features new MethodInvocationFeatureCheckerContext( invocation.Method ) - ).ConfigureAwait(false); + ); } } } diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/MethodInvocationFeatureCheckerService.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/MethodInvocationFeatureCheckerService.cs index bff6405d57..da7becc61f 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/MethodInvocationFeatureCheckerService.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/MethodInvocationFeatureCheckerService.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Features foreach (var requiresFeatureAttribute in GetRequiredFeatureAttributes(context.Method)) { - await _featureChecker.CheckEnabledAsync(requiresFeatureAttribute.RequiresAll, requiresFeatureAttribute.Features).ConfigureAwait(false); + await _featureChecker.CheckEnabledAsync(requiresFeatureAttribute.RequiresAll, requiresFeatureAttribute.Features); } } diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs index 71cdfe3f59..5ae4b5f876 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Features public override async Task GetOrNullAsync(FeatureDefinition feature) { - return await FeatureStore.GetOrNullAsync(feature.Name, Name, CurrentTenant.Id?.ToString()).ConfigureAwait(false); + return await FeatureStore.GetOrNullAsync(feature.Name, Name, CurrentTenant.Id?.ToString()); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.FluentValidation/FodyWeavers.xml b/framework/src/Volo.Abp.FluentValidation/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.FluentValidation/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.FluentValidation/FodyWeavers.xsd b/framework/src/Volo.Abp.FluentValidation/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.FluentValidation/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj index 5510af3e25..52cee1ade7 100644 --- a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj +++ b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Guids/FodyWeavers.xml b/framework/src/Volo.Abp.Guids/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Guids/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Guids/FodyWeavers.xsd b/framework/src/Volo.Abp.Guids/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Guids/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj b/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj index 86f8e3243f..6c8c4c4916 100644 --- a/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj +++ b/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj @@ -1,5 +1,6 @@ + @@ -17,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.HangFire/FodyWeavers.xml b/framework/src/Volo.Abp.HangFire/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.HangFire/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.HangFire/FodyWeavers.xsd b/framework/src/Volo.Abp.HangFire/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.HangFire/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj b/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj index c87b39d494..eb6172b111 100644 --- a/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj +++ b/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Http.Abstractions/FodyWeavers.xml b/framework/src/Volo.Abp.Http.Abstractions/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Abstractions/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Abstractions/FodyWeavers.xsd b/framework/src/Volo.Abp.Http.Abstractions/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Abstractions/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj b/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj index 5c5ec94603..59de087fc4 100644 --- a/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj +++ b/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj @@ -1,5 +1,6 @@ + @@ -17,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/FodyWeavers.xml b/framework/src/Volo.Abp.Http.Client.IdentityModel/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/FodyWeavers.xsd b/framework/src/Volo.Abp.Http.Client.IdentityModel/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj index 84413c7764..e62293964a 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj @@ -1,5 +1,6 @@ - + + @@ -20,4 +21,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs index efc61907dc..25763efbd5 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Http.Client.IdentityModel { if (context.RemoteService.GetUseCurrentAccessToken() != false) { - var accessToken = await GetAccessTokenFromHttpContextOrNullAsync().ConfigureAwait(false); + var accessToken = await GetAccessTokenFromHttpContextOrNullAsync(); if (accessToken != null) { context.Request.SetBearerToken(accessToken); @@ -36,7 +36,7 @@ namespace Volo.Abp.Http.Client.IdentityModel await IdentityModelAuthenticationService.TryAuthenticateAsync( context.Client, context.RemoteService.GetIdentityClient() - ).ConfigureAwait(false); + ); } protected virtual async Task GetAccessTokenFromHttpContextOrNullAsync() @@ -47,7 +47,7 @@ namespace Volo.Abp.Http.Client.IdentityModel return null; } - return await httpContext.GetTokenAsync("access_token").ConfigureAwait(false); + return await httpContext.GetTokenAsync("access_token"); } } } diff --git a/framework/src/Volo.Abp.Http.Client/FodyWeavers.xml b/framework/src/Volo.Abp.Http.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client/FodyWeavers.xsd b/framework/src/Volo.Abp.Http.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj index e7198718b1..461a0c35f5 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj +++ b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj @@ -1,5 +1,6 @@ - + + @@ -27,4 +28,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionCache.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionCache.cs index b9932124be..9d1ea2dbbe 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionCache.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionCache.cs @@ -27,12 +27,12 @@ namespace Volo.Abp.Http.Client.DynamicProxying string baseUrl, Func> factory) { - using (await _semaphore.LockAsync(CancellationTokenProvider.Token).ConfigureAwait(false)) + using (await _semaphore.LockAsync(CancellationTokenProvider.Token)) { var model = _cache.GetOrDefault(baseUrl); if (model == null) { - _cache[baseUrl] = model = await factory().ConfigureAwait(false); + _cache[baseUrl] = model = await factory(); } return model; diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs index eb57641c28..9b9c8e804c 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying public async Task FindActionAsync(string baseUrl, Type serviceType, MethodInfo method) { - var apiDescription = await GetApiDescriptionAsync(baseUrl).ConfigureAwait(false); + var apiDescription = await GetApiDescriptionAsync(baseUrl); //TODO: Cache finding? @@ -78,7 +78,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying public virtual async Task GetApiDescriptionAsync(string baseUrl) { - return await Cache.GetAsync(baseUrl, () => GetApiDescriptionFromServerAsync(baseUrl)).ConfigureAwait(false); + return await Cache.GetAsync(baseUrl, () => GetApiDescriptionFromServerAsync(baseUrl)); } protected virtual async Task GetApiDescriptionFromServerAsync(string baseUrl) @@ -88,14 +88,14 @@ namespace Volo.Abp.Http.Client.DynamicProxying var response = await client.GetAsync( baseUrl.EnsureEndsWith('/') + "api/abp/api-definition", CancellationTokenProvider.Token - ).ConfigureAwait(false); + ); if (!response.IsSuccessStatusCode) { throw new AbpException("Remote service returns error! StatusCode = " + response.StatusCode); } - var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var content = await response.Content.ReadAsStringAsync(); var result = JsonConvert.DeserializeObject( content, diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs index d60b79b3a5..3e0124237f 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs @@ -78,7 +78,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying { if (invocation.Method.ReturnType.GenericTypeArguments.IsNullOrEmpty()) { - await MakeRequestAsync(invocation).ConfigureAwait(false); + await MakeRequestAsync(invocation); } else { @@ -89,14 +89,14 @@ namespace Volo.Abp.Http.Client.DynamicProxying invocation.ReturnValue = await GetResultAsync( result, invocation.Method.ReturnType.GetGenericArguments()[0] - ).ConfigureAwait(false); + ); } } private async Task GetResultAsync(Task task, Type resultType) { - await task.ConfigureAwait(false); + await task; return typeof(Task<>) .MakeGenericType(resultType) .GetProperty(nameof(Task.Result), BindingFlags.Instance | BindingFlags.Public) @@ -105,7 +105,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying private async Task MakeRequestAndGetResultAsync(IAbpMethodInvocation invocation) { - var responseAsString = await MakeRequestAsync(invocation).ConfigureAwait(false); + var responseAsString = await MakeRequestAsync(invocation); //TODO: Think on that if (TypeHelper.IsPrimitiveExtended(typeof(T), true)) @@ -123,7 +123,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); - var action = await ApiDescriptionFinder.FindActionAsync(remoteServiceConfig.BaseUrl, typeof(TService), invocation.Method).ConfigureAwait(false); + var action = await ApiDescriptionFinder.FindActionAsync(remoteServiceConfig.BaseUrl, typeof(TService), invocation.Method); var apiVersion = GetApiVersionInfo(action); var url = remoteServiceConfig.BaseUrl.EnsureEndsWith('/') + UrlBuilder.GenerateUrlWithParameters(action, invocation.ArgumentsDictionary, apiVersion); @@ -141,16 +141,16 @@ namespace Volo.Abp.Http.Client.DynamicProxying remoteServiceConfig, clientConfig.RemoteServiceName ) - ).ConfigureAwait(false); + ); - var response = await client.SendAsync(requestMessage, GetCancellationToken()).ConfigureAwait(false); + var response = await client.SendAsync(requestMessage, GetCancellationToken()); if (!response.IsSuccessStatusCode) { - await ThrowExceptionForResponseAsync(response).ConfigureAwait(false); + await ThrowExceptionForResponseAsync(response); } - return await response.Content.ReadAsStringAsync().ConfigureAwait(false); + return await response.Content.ReadAsStringAsync(); } private ApiVersionInfo GetApiVersionInfo(ActionApiDescriptionModel action) @@ -240,7 +240,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying { var errorResponse = JsonSerializer.Deserialize( await response.Content.ReadAsStringAsync() -.ConfigureAwait(false)); + ); throw new AbpRemoteCallException(errorResponse.Error); } diff --git a/framework/src/Volo.Abp.Http/FodyWeavers.xml b/framework/src/Volo.Abp.Http/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Http/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http/FodyWeavers.xsd b/framework/src/Volo.Abp.Http/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Http/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj b/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj index 57f447604e..d707299f21 100644 --- a/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj +++ b/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj @@ -1,5 +1,6 @@ + @@ -19,4 +20,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs index d1de33258f..257f06d3db 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Volo.Abp.Http.Modeling { @@ -19,12 +19,14 @@ namespace Volo.Abp.Http.Modeling public string BindingSourceId { get; set; } + public string DescriptorName { get; set; } + private ParameterApiDescriptionModel() { } - public static ParameterApiDescriptionModel Create(string name, string nameOnMethod, Type type, bool isOptional = false, object defaultValue = null, string[] constraintTypes = null, string bindingSourceId = null) + public static ParameterApiDescriptionModel Create(string name, string nameOnMethod, Type type, bool isOptional = false, object defaultValue = null, string[] constraintTypes = null, string bindingSourceId = null, string descriptorName = null) { return new ParameterApiDescriptionModel { @@ -34,7 +36,8 @@ namespace Volo.Abp.Http.Modeling IsOptional = isOptional, DefaultValue = defaultValue, ConstraintTypes = constraintTypes, - BindingSourceId = bindingSourceId + BindingSourceId = bindingSourceId, + DescriptorName = descriptorName }; } } diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs index 169e9b8764..b267c26296 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/JQuery/JQueryProxyScriptGenerator.cs @@ -96,7 +96,11 @@ namespace Volo.Abp.Http.ProxyScripting.Generators.JQuery AddAjaxCallParameters(script, action); - script.AppendLine(" }, ajaxParams));;"); + var ajaxParamsIsFromForm = action.Parameters.Any(x => x.BindingSourceId == ParameterBindingSources.Form); + script.AppendLine(ajaxParamsIsFromForm + ? " }, $.extend(true, {}, ajaxParams, { contentType: 'application/x-www-form-urlencoded; charset=UTF-8' })));" + : " }, ajaxParams));"); + script.AppendLine(" };"); } diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingHelper.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingHelper.cs index 64d1515574..700dc4e290 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingHelper.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingHelper.cs @@ -66,7 +66,7 @@ namespace Volo.Abp.Http.ProxyScripting.Generators return null; } - return ProxyScriptingJsFuncHelper.CreateJsObjectLiteral(parameters, indent); + return ProxyScriptingJsFuncHelper.CreateJsFormPostData(parameters, indent); } private static string ReplacePathVariables(string url, IList actionParameters) diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs index baa52f3155..0fd80203df 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs @@ -111,8 +111,8 @@ namespace Volo.Abp.Http.ProxyScripting.Generators public static string GetParamNameInJsFunc(ParameterApiDescriptionModel parameterInfo) { return parameterInfo.Name == parameterInfo.NameOnMethod - ? NormalizeJsVariableName(parameterInfo.Name.ToCamelCase(), ".") - : NormalizeJsVariableName(parameterInfo.NameOnMethod.ToCamelCase()) + "." + NormalizeJsVariableName(parameterInfo.Name.ToCamelCase(), "."); + ? NormalizeJsVariableName(parameterInfo.Name.ToCamelCase(), ".") + : NormalizeJsVariableName(parameterInfo.NameOnMethod.ToCamelCase()) + "." + NormalizeJsVariableName(parameterInfo.Name.ToCamelCase(), "."); } public static string CreateJsObjectLiteral(ParameterApiDescriptionModel[] parameters, int indent = 0) @@ -131,9 +131,37 @@ namespace Volo.Abp.Http.ProxyScripting.Generators return sb.ToString(); } + public static string GetFormPostParamNameInJsFunc(ParameterApiDescriptionModel parameterInfo) + { + return parameterInfo.Name == parameterInfo.NameOnMethod + ? NormalizeJsVariableName((parameterInfo.DescriptorName + parameterInfo.Name).ToCamelCase(), ".") + : NormalizeJsVariableName(parameterInfo.NameOnMethod.ToCamelCase()) + "." + NormalizeJsVariableName((parameterInfo.DescriptorName + parameterInfo.Name).ToCamelCase(), "."); + } + + public static string CreateJsFormPostData(ParameterApiDescriptionModel[] parameters, int indent) + { + var sb = new StringBuilder(); + + for (var i = 0; i < parameters.Length; i++) + { + var and = i < parameters.Length - 1 ? " + '&' + " : string.Empty; + + var parameterName = parameters[i].DescriptorName.IsNullOrWhiteSpace() + ? parameters[i].Name + : $"{parameters[i].DescriptorName}.{parameters[i].Name}"; + + sb.Append($"'{parameterName}=' + {GetFormPostParamNameInJsFunc(parameters[i])}{and}"); + } + + return sb.ToString(); + } + public static string GenerateJsFuncParameterList(ActionApiDescriptionModel action, string ajaxParametersName) { - var methodParamNames = action.ParametersOnMethod.Select(p => p.Name).Distinct().ToList(); + var paramsIsFromForm = action.Parameters.Any(x => x.BindingSourceId == ParameterBindingSources.Form); + var methodParamNames = paramsIsFromForm + ? action.Parameters.Select(p => p.DescriptorName + p.Name).Distinct().ToList() + : action.ParametersOnMethod.Select(p => p.Name).Distinct().ToList(); methodParamNames.Add(ajaxParametersName); return methodParamNames.Select(prmName => NormalizeJsVariableName(prmName.ToCamelCase())).JoinAsString(", "); } diff --git a/framework/src/Volo.Abp.IdentityModel/FodyWeavers.xml b/framework/src/Volo.Abp.IdentityModel/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.IdentityModel/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.IdentityModel/FodyWeavers.xsd b/framework/src/Volo.Abp.IdentityModel/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.IdentityModel/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj index 886e092fdd..3e4ae78b91 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj +++ b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj @@ -1,5 +1,6 @@ - + + @@ -18,4 +19,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs index 488745836e..ca6e41d60d 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.IdentityModel [NotNull] HttpClient client, string identityClientName = null) { - var accessToken = await GetAccessTokenOrNullAsync(identityClientName).ConfigureAwait(false); + var accessToken = await GetAccessTokenOrNullAsync(identityClientName); if (accessToken == null) { return false; @@ -55,18 +55,18 @@ namespace Volo.Abp.IdentityModel return null; } - return await GetAccessTokenAsync(configuration).ConfigureAwait(false); + return await GetAccessTokenAsync(configuration); } public virtual async Task GetAccessTokenAsync(IdentityClientConfiguration configuration) { - var discoveryResponse = await GetDiscoveryResponse(configuration).ConfigureAwait(false); + var discoveryResponse = await GetDiscoveryResponse(configuration); if (discoveryResponse.IsError) { throw new AbpException($"Could not retrieve the OpenId Connect discovery document! ErrorType: {discoveryResponse.ErrorType}. Error: {discoveryResponse.Error}"); } - var tokenResponse = await GetTokenResponse(discoveryResponse, configuration).ConfigureAwait(false); + var tokenResponse = await GetTokenResponse(discoveryResponse, configuration); if (tokenResponse.IsError) { throw new AbpException($"Could not get token from the OpenId Connect server! ErrorType: {tokenResponse.ErrorType}. Error: {tokenResponse.Error}. ErrorDescription: {tokenResponse.ErrorDescription}. HttpStatusCode: {tokenResponse.HttpStatusCode}"); @@ -104,7 +104,7 @@ namespace Volo.Abp.IdentityModel { RequireHttps = configuration.RequireHttps } - }).ConfigureAwait(false); + }); } } @@ -118,14 +118,14 @@ namespace Volo.Abp.IdentityModel { case OidcConstants.GrantTypes.ClientCredentials: return await httpClient.RequestClientCredentialsTokenAsync( - await CreateClientCredentialsTokenRequestAsync(discoveryResponse, configuration).ConfigureAwait(false), + await CreateClientCredentialsTokenRequestAsync(discoveryResponse, configuration), CancellationTokenProvider.Token - ).ConfigureAwait(false); + ); case OidcConstants.GrantTypes.Password: return await httpClient.RequestPasswordTokenAsync( - await CreatePasswordTokenRequestAsync(discoveryResponse, configuration).ConfigureAwait(false), + await CreatePasswordTokenRequestAsync(discoveryResponse, configuration), CancellationTokenProvider.Token - ).ConfigureAwait(false); + ); default: throw new AbpException("Grant type was not implemented: " + configuration.GrantType); } diff --git a/framework/src/Volo.Abp.Json/FodyWeavers.xml b/framework/src/Volo.Abp.Json/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Json/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Json/FodyWeavers.xsd b/framework/src/Volo.Abp.Json/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Json/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj index d5407991c1..8af6ecc68f 100644 --- a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj +++ b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj @@ -1,5 +1,6 @@ - + + @@ -21,4 +22,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Ldap/FodyWeavers.xml b/framework/src/Volo.Abp.Ldap/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Ldap/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ldap/FodyWeavers.xsd b/framework/src/Volo.Abp.Ldap/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Ldap/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj b/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj index 6b1cba1094..229f3c6c7d 100644 --- a/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj +++ b/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Localization.Abstractions/FodyWeavers.xml b/framework/src/Volo.Abp.Localization.Abstractions/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Localization.Abstractions/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization.Abstractions/FodyWeavers.xsd b/framework/src/Volo.Abp.Localization.Abstractions/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Localization.Abstractions/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj b/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj index b4df348774..b883ae7011 100644 --- a/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj +++ b/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Localization/FodyWeavers.xml b/framework/src/Volo.Abp.Localization/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Localization/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization/FodyWeavers.xsd b/framework/src/Volo.Abp.Localization/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Localization/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj index aad9dcf58d..0fd10d94ca 100644 --- a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj +++ b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/cs.json b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/cs.json new file mode 100644 index 0000000000..bea8d0379b --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/cs.json @@ -0,0 +1,7 @@ +{ + "culture": "cs", + "texts": { + "DisplayName:Abp.Localization.DefaultLanguage": "Výchozí jazyk", + "Description:Abp.Localization.DefaultLanguage": "Váchozí jazyk aplikace." + } +} diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/zh-Hant.json b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/zh-Hant.json new file mode 100644 index 0000000000..9ff62f43bb --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "DisplayName:Abp.Localization.DefaultLanguage": "預設語系", + "Description:Abp.Localization.DefaultLanguage": "應用程式的預設語系." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MailKit/FodyWeavers.xml b/framework/src/Volo.Abp.MailKit/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.MailKit/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MailKit/FodyWeavers.xsd b/framework/src/Volo.Abp.MailKit/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.MailKit/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj index d96ab22fbe..8aa654922a 100644 --- a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj +++ b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj @@ -1,5 +1,6 @@ - + + @@ -21,4 +22,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.MailKit/Volo/Abp/MailKit/MailKitSmtpEmailSender.cs b/framework/src/Volo.Abp.MailKit/Volo/Abp/MailKit/MailKitSmtpEmailSender.cs index f798ebf01e..a3cb4ea499 100644 --- a/framework/src/Volo.Abp.MailKit/Volo/Abp/MailKit/MailKitSmtpEmailSender.cs +++ b/framework/src/Volo.Abp.MailKit/Volo/Abp/MailKit/MailKitSmtpEmailSender.cs @@ -30,11 +30,11 @@ namespace Volo.Abp.MailKit protected override async Task SendEmailAsync(MailMessage mail) { - using (var client = await BuildClientAsync().ConfigureAwait(false)) + using (var client = await BuildClientAsync()) { var message = MimeMessage.CreateFromMailMessage(mail); - await client.SendAsync(message).ConfigureAwait(false); - await client.DisconnectAsync(true).ConfigureAwait(false); + await client.SendAsync(message); + await client.DisconnectAsync(true); } } @@ -44,7 +44,7 @@ namespace Volo.Abp.MailKit try { - await ConfigureClient(client).ConfigureAwait(false); + await ConfigureClient(client); return client; } catch @@ -57,20 +57,20 @@ namespace Volo.Abp.MailKit protected virtual async Task ConfigureClient(SmtpClient client) { client.Connect( - await SmtpConfiguration.GetHostAsync().ConfigureAwait(false), - await SmtpConfiguration.GetPortAsync().ConfigureAwait(false), + await SmtpConfiguration.GetHostAsync(), + await SmtpConfiguration.GetPortAsync(), await GetSecureSocketOption() -.ConfigureAwait(false)); + ); - if (await SmtpConfiguration.GetUseDefaultCredentialsAsync().ConfigureAwait(false)) + if (await SmtpConfiguration.GetUseDefaultCredentialsAsync()) { return; } client.Authenticate( - await SmtpConfiguration.GetUserNameAsync().ConfigureAwait(false), + await SmtpConfiguration.GetUserNameAsync(), await SmtpConfiguration.GetPasswordAsync() -.ConfigureAwait(false)); + ); } protected virtual async Task GetSecureSocketOption() @@ -81,7 +81,7 @@ namespace Volo.Abp.MailKit } return await SmtpConfiguration.GetEnableSslAsync() -.ConfigureAwait(false) ? SecureSocketOptions.SslOnConnect + ? SecureSocketOptions.SslOnConnect : SecureSocketOptions.StartTlsWhenAvailable; } } diff --git a/framework/src/Volo.Abp.MemoryDb/FodyWeavers.xml b/framework/src/Volo.Abp.MemoryDb/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.MemoryDb/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/FodyWeavers.xsd b/framework/src/Volo.Abp.MemoryDb/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.MemoryDb/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj b/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj index ad7b834c7c..1a896b8891 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj +++ b/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj @@ -1,5 +1,6 @@ + @@ -17,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs index d554e09de1..b81aa7ae87 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs @@ -101,7 +101,7 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb public virtual async Task GetAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, includeDetails, cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, includeDetails, cancellationToken); if (entity == null) { @@ -118,13 +118,13 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb public virtual async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, cancellationToken: cancellationToken); if (entity == null) { return; } - await DeleteAsync(entity, autoSave, cancellationToken).ConfigureAwait(false); + await DeleteAsync(entity, autoSave, cancellationToken); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Minify/FodyWeavers.xml b/framework/src/Volo.Abp.Minify/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Minify/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Minify/FodyWeavers.xsd b/framework/src/Volo.Abp.Minify/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Minify/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj index 6abb3fcc37..ee2ecc23e6 100644 --- a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj +++ b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj @@ -1,5 +1,6 @@ - + + @@ -21,4 +22,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.MongoDB/FodyWeavers.xml b/framework/src/Volo.Abp.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/FodyWeavers.xsd b/framework/src/Volo.Abp.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj index 5cf143f99a..7e14eb9a9e 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj +++ b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs index 1ee3cbf80d..4e8ccaa82e 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs @@ -58,12 +58,12 @@ namespace Volo.Abp.Domain.Repositories.MongoDB bool autoSave = false, CancellationToken cancellationToken = default) { - await ApplyAbpConceptsForAddedEntityAsync(entity).ConfigureAwait(false); + await ApplyAbpConceptsForAddedEntityAsync(entity); await Collection.InsertOneAsync( entity, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); return entity; } @@ -78,14 +78,14 @@ namespace Volo.Abp.Domain.Repositories.MongoDB if (entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted) { SetDeletionAuditProperties(entity); - await TriggerEntityDeleteEventsAsync(entity).ConfigureAwait(false); + await TriggerEntityDeleteEventsAsync(entity); } else { - await TriggerEntityUpdateEventsAsync(entity).ConfigureAwait(false); + await TriggerEntityUpdateEventsAsync(entity); } - await TriggerDomainEventsAsync(entity).ConfigureAwait(false); + await TriggerDomainEventsAsync(entity); var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); @@ -93,7 +93,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB CreateEntityFilter(entity, true, oldConcurrencyStamp), entity, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); if (result.MatchedCount <= 0) { @@ -108,7 +108,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB bool autoSave = false, CancellationToken cancellationToken = default) { - await ApplyAbpConceptsForDeletedEntityAsync(entity).ConfigureAwait(false); + await ApplyAbpConceptsForDeletedEntityAsync(entity); var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); if (entity is ISoftDelete softDeleteEntity) @@ -118,7 +118,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB CreateEntityFilter(entity, true, oldConcurrencyStamp), entity, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); if (result.MatchedCount <= 0) { @@ -130,7 +130,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB var result = await Collection.DeleteOneAsync( CreateEntityFilter(entity, true, oldConcurrencyStamp), GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); if (result.DeletedCount <= 0) { @@ -141,12 +141,12 @@ namespace Volo.Abp.Domain.Repositories.MongoDB public override async Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().ToListAsync(GetCancellationToken(cancellationToken)); } public override async Task GetCountAsync(CancellationToken cancellationToken = default) { - return await GetMongoQueryable().LongCountAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().LongCountAsync(GetCancellationToken(cancellationToken)); } public override async Task DeleteAsync( @@ -156,11 +156,11 @@ namespace Volo.Abp.Domain.Repositories.MongoDB { var entities = await GetMongoQueryable() .Where(predicate) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); foreach (var entity in entities) { - await DeleteAsync(entity, autoSave, cancellationToken).ConfigureAwait(false); + await DeleteAsync(entity, autoSave, cancellationToken); } } @@ -187,33 +187,33 @@ namespace Volo.Abp.Domain.Repositories.MongoDB { CheckAndSetId(entity); SetCreationAuditProperties(entity); - await TriggerEntityCreateEvents(entity).ConfigureAwait(false); - await TriggerDomainEventsAsync(entity).ConfigureAwait(false); + await TriggerEntityCreateEvents(entity); + await TriggerDomainEventsAsync(entity); } private async Task TriggerEntityCreateEvents(TEntity entity) { - await EntityChangeEventHelper.TriggerEntityCreatedEventOnUowCompletedAsync(entity).ConfigureAwait(false); - await EntityChangeEventHelper.TriggerEntityCreatingEventAsync(entity).ConfigureAwait(false); + await EntityChangeEventHelper.TriggerEntityCreatedEventOnUowCompletedAsync(entity); + await EntityChangeEventHelper.TriggerEntityCreatingEventAsync(entity); } protected virtual async Task TriggerEntityUpdateEventsAsync(TEntity entity) { - await EntityChangeEventHelper.TriggerEntityUpdatedEventOnUowCompletedAsync(entity).ConfigureAwait(false); - await EntityChangeEventHelper.TriggerEntityUpdatingEventAsync(entity).ConfigureAwait(false); + await EntityChangeEventHelper.TriggerEntityUpdatedEventOnUowCompletedAsync(entity); + await EntityChangeEventHelper.TriggerEntityUpdatingEventAsync(entity); } protected virtual async Task ApplyAbpConceptsForDeletedEntityAsync(TEntity entity) { SetDeletionAuditProperties(entity); - await TriggerEntityDeleteEventsAsync(entity).ConfigureAwait(false); - await TriggerDomainEventsAsync(entity).ConfigureAwait(false); + await TriggerEntityDeleteEventsAsync(entity); + await TriggerDomainEventsAsync(entity); } protected virtual async Task TriggerEntityDeleteEventsAsync(TEntity entity) { - await EntityChangeEventHelper.TriggerEntityDeletedEventOnUowCompletedAsync(entity).ConfigureAwait(false); - await EntityChangeEventHelper.TriggerEntityDeletingEventAsync(entity).ConfigureAwait(false); + await EntityChangeEventHelper.TriggerEntityDeletedEventOnUowCompletedAsync(entity); + await EntityChangeEventHelper.TriggerEntityDeletingEventAsync(entity); } protected virtual void CheckAndSetId(TEntity entity) @@ -266,7 +266,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB { foreach (var localEvent in localEvents) { - await LocalEventBus.PublishAsync(localEvent.GetType(), localEvent).ConfigureAwait(false); + await LocalEventBus.PublishAsync(localEvent.GetType(), localEvent); } generatesDomainEventsEntity.ClearLocalEvents(); @@ -277,7 +277,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB { foreach (var distributedEvent in distributedEvents) { - await DistributedEventBus.PublishAsync(distributedEvent.GetType(), distributedEvent).ConfigureAwait(false); + await DistributedEventBus.PublishAsync(distributedEvent.GetType(), distributedEvent); } generatesDomainEventsEntity.ClearDistributedEvents(); @@ -324,7 +324,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - var entity = await FindAsync(id, includeDetails, cancellationToken).ConfigureAwait(false); + var entity = await FindAsync(id, includeDetails, cancellationToken); if (entity == null) { @@ -341,7 +341,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB { return await Collection .Find(CreateEntityFilter(id, true)) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public virtual Task DeleteAsync( diff --git a/framework/src/Volo.Abp.MultiTenancy/FodyWeavers.xml b/framework/src/Volo.Abp.MultiTenancy/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.MultiTenancy/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MultiTenancy/FodyWeavers.xsd b/framework/src/Volo.Abp.MultiTenancy/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.MultiTenancy/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj b/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj index b67e76c459..951712c7f0 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.ObjectMapping/FodyWeavers.xml b/framework/src/Volo.Abp.ObjectMapping/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.ObjectMapping/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.ObjectMapping/FodyWeavers.xsd b/framework/src/Volo.Abp.ObjectMapping/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.ObjectMapping/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj b/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj index 5c08dd7ed7..163fd6d534 100644 --- a/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj +++ b/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.RabbitMQ/FodyWeavers.xml b/framework/src/Volo.Abp.RabbitMQ/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.RabbitMQ/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.RabbitMQ/FodyWeavers.xsd b/framework/src/Volo.Abp.RabbitMQ/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.RabbitMQ/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj index 2f268c964b..1a7860deeb 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs b/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs index 8e136fc2ac..1214a82a99 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs +++ b/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs @@ -63,13 +63,13 @@ namespace Volo.Abp.RabbitMQ public virtual async Task BindAsync(string routingKey) { QueueBindCommands.Enqueue(new QueueBindCommand(QueueBindType.Bind, routingKey)); - await TrySendQueueBindCommandsAsync().ConfigureAwait(false); + await TrySendQueueBindCommandsAsync(); } public virtual async Task UnbindAsync(string routingKey) { QueueBindCommands.Enqueue(new QueueBindCommand(QueueBindType.Unbind, routingKey)); - await TrySendQueueBindCommandsAsync().ConfigureAwait(false); + await TrySendQueueBindCommandsAsync(); } protected virtual void TrySendQueueBindCommands() @@ -166,7 +166,7 @@ namespace Volo.Abp.RabbitMQ var consumer = new EventingBasicConsumer(channel); consumer.Received += async (model, basicDeliverEventArgs) => { - await HandleIncomingMessage(channel, basicDeliverEventArgs).ConfigureAwait(false); + await HandleIncomingMessage(channel, basicDeliverEventArgs); }; channel.BasicConsume( @@ -189,7 +189,7 @@ namespace Volo.Abp.RabbitMQ { foreach (var callback in Callbacks) { - await callback(channel, basicDeliverEventArgs).ConfigureAwait(false); + await callback(channel, basicDeliverEventArgs); } channel.BasicAck(basicDeliverEventArgs.DeliveryTag, multiple: false); diff --git a/framework/src/Volo.Abp.Security/FodyWeavers.xml b/framework/src/Volo.Abp.Security/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Security/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Security/FodyWeavers.xsd b/framework/src/Volo.Abp.Security/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Security/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj b/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj index 792aaf98ff..65aca85c88 100644 --- a/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj +++ b/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Serialization/FodyWeavers.xml b/framework/src/Volo.Abp.Serialization/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Serialization/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Serialization/FodyWeavers.xsd b/framework/src/Volo.Abp.Serialization/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Serialization/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj b/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj index 62ba5b9b14..b23178d760 100644 --- a/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj +++ b/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Settings/FodyWeavers.xml b/framework/src/Volo.Abp.Settings/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Settings/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Settings/FodyWeavers.xsd b/framework/src/Volo.Abp.Settings/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Settings/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj b/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj index 15a41c3672..65f985a87b 100644 --- a/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj +++ b/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs index 7694ca219f..6f5372a4cf 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.Settings //TODO: How to implement setting.IsInherited? - var value = await GetOrNullValueFromProvidersAsync(providers, setting).ConfigureAwait(false); + var value = await GetOrNullValueFromProvidersAsync(providers, setting); if (setting.IsEncrypted) { value = SettingEncryptionService.Decrypt(setting, value); @@ -52,7 +52,7 @@ namespace Volo.Abp.Settings { foreach (var setting in settingDefinitions) { - var value = await provider.GetOrNullAsync(setting).ConfigureAwait(false); + var value = await provider.GetOrNullAsync(setting); if (value != null) { if (setting.IsEncrypted) @@ -74,7 +74,7 @@ namespace Volo.Abp.Settings { foreach (var provider in providers) { - var value = await provider.GetOrNullAsync(setting).ConfigureAwait(false); + var value = await provider.GetOrNullAsync(setting); if (value != null) { return value; diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProviderExtensions.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProviderExtensions.cs index eb7e3c341c..fb67c4ae77 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProviderExtensions.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProviderExtensions.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Settings Check.NotNull(name, nameof(name)); return string.Equals( - await settingProvider.GetOrNullAsync(name).ConfigureAwait(false), + await settingProvider.GetOrNullAsync(name), "true", StringComparison.OrdinalIgnoreCase ); @@ -24,7 +24,7 @@ namespace Volo.Abp.Settings Check.NotNull(settingProvider, nameof(settingProvider)); Check.NotNull(name, nameof(name)); - var value = await settingProvider.GetOrNullAsync(name).ConfigureAwait(false); + var value = await settingProvider.GetOrNullAsync(name); return value?.To() ?? defaultValue; } } diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs index 408f70aac9..eab23b7258 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Settings public override async Task GetOrNullAsync(SettingDefinition setting) { - return await SettingStore.GetOrNullAsync(setting.Name, Name, CurrentTenant.Id?.ToString()).ConfigureAwait(false); + return await SettingStore.GetOrNullAsync(setting.Name, Name, CurrentTenant.Id?.ToString()); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs index a3df714c00..01125f3201 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.Settings return null; } - return await SettingStore.GetOrNullAsync(setting.Name, Name, CurrentUser.Id.ToString()).ConfigureAwait(false); + return await SettingStore.GetOrNullAsync(setting.Name, Name, CurrentUser.Id.ToString()); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Sms/FodyWeavers.xml b/framework/src/Volo.Abp.Sms/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Sms/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Sms/FodyWeavers.xsd b/framework/src/Volo.Abp.Sms/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Sms/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj b/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj index 33ef1dbf23..35adb7e62c 100644 --- a/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj +++ b/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Specifications/FodyWeavers.xml b/framework/src/Volo.Abp.Specifications/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Specifications/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Specifications/FodyWeavers.xsd b/framework/src/Volo.Abp.Specifications/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Specifications/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj b/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj index 97c236cfc5..6e17993ba1 100644 --- a/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj +++ b/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.TestBase/FodyWeavers.xml b/framework/src/Volo.Abp.TestBase/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.TestBase/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.TestBase/FodyWeavers.xsd b/framework/src/Volo.Abp.TestBase/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.TestBase/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj b/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj index a8b967561e..004a0fa4d6 100644 --- a/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj +++ b/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Threading/FodyWeavers.xml b/framework/src/Volo.Abp.Threading/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Threading/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Threading/FodyWeavers.xsd b/framework/src/Volo.Abp.Threading/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Threading/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj b/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj index b4e53162d5..0f5fbf3e9a 100644 --- a/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj +++ b/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Timing/FodyWeavers.xml b/framework/src/Volo.Abp.Timing/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Timing/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Timing/FodyWeavers.xsd b/framework/src/Volo.Abp.Timing/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Timing/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj b/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj index dbaa8d11dd..4f9eb21f2f 100644 --- a/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj +++ b/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj @@ -1,5 +1,6 @@ + @@ -17,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.UI.Navigation/FodyWeavers.xml b/framework/src/Volo.Abp.UI.Navigation/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI.Navigation/FodyWeavers.xsd b/framework/src/Volo.Abp.UI.Navigation/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj b/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj index c218698017..5236bf0404 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj +++ b/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj @@ -1,5 +1,6 @@ - + + @@ -22,4 +23,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/zh-Hant.json b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/zh-Hant.json new file mode 100644 index 0000000000..a592b42fff --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "Menu:Administration": "管理" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs index 7ca2baa6b0..5c33866aa2 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.UI.Navigation foreach (var contributor in Options.MenuContributors) { - await contributor.ConfigureMenuAsync(context).ConfigureAwait(false); + await contributor.ConfigureMenuAsync(context); } } diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Urls/AppUrlProvider.cs b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Urls/AppUrlProvider.cs index fed4235087..ffa31e66a2 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Urls/AppUrlProvider.cs +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Urls/AppUrlProvider.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.UI.Navigation.Urls appName, urlName ) -.ConfigureAwait(false)).ConfigureAwait(false); + ); } protected virtual Task GetConfiguredUrl(string appName, string urlName) @@ -89,7 +89,7 @@ namespace Volo.Abp.UI.Navigation.Urls if (CurrentTenant.Id.HasValue) { - url = url.Replace(tenantNamePlaceHolder, await GetCurrentTenantNameAsync().ConfigureAwait(false)); + url = url.Replace(tenantNamePlaceHolder, await GetCurrentTenantNameAsync()); } else { @@ -103,7 +103,7 @@ namespace Volo.Abp.UI.Navigation.Urls { if (CurrentTenant.Id.HasValue && CurrentTenant.Name.IsNullOrEmpty()) { - var tenantConfiguration = await TenantStore.FindAsync(CurrentTenant.Id.Value).ConfigureAwait(false); + var tenantConfiguration = await TenantStore.FindAsync(CurrentTenant.Id.Value); return tenantConfiguration.Name; } diff --git a/framework/src/Volo.Abp.UI/FodyWeavers.xml b/framework/src/Volo.Abp.UI/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.UI/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/FodyWeavers.xsd b/framework/src/Volo.Abp.UI/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.UI/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json index 0bd6ba5462..c4dcb99b1b 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json @@ -13,11 +13,13 @@ "DefaultErrorMessage404": "Resource not found!", "DefaultErrorMessage404Detail": "The resource requested could not found on the server!", "EntityNotFoundErrorMessage": "There is no entity {0} with id = {1}!", + "Languages": "Languages", "Error": "Error", "AreYouSure": "Are you sure?", "Cancel": "Cancel", "Yes": "Yes", "No": "No", + "Ok": "Ok", "Close": "Close", "Save": "Save", "SavingWithThreeDot": "Saving...", @@ -25,6 +27,8 @@ "Delete": "Delete", "Edit": "Edit", "Refresh": "Refresh", + "Language": "Language", + "LoadMore": "Load more", "ProcessingWithThreeDot": "Processing...", "LoadingWithThreeDot": "Loading...", "Welcome": "Welcome", diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json index 2ebd7e06df..4fe44a40c6 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json @@ -13,11 +13,13 @@ "DefaultErrorMessage404": "Kaynak bulunamadı!", "DefaultErrorMessage404Detail": "İstenilen kaynak sunucuda bulunamadı.", "EntityNotFoundErrorMessage": "Id değeri {1} olan {0} türünden bir nesne bulunamadı!", + "Languages": "Diller", "Error": "Hata", "AreYouSure": "Emin misiniz?", "Cancel": "Vazgeç", "Yes": "Evet", "No": "Hayır", + "Ok": "Tamam", "Close": "Kapat", "Save": "Kaydet", "SavingWithThreeDot": "Kaydediliyor...", @@ -25,6 +27,8 @@ "Delete": "Sil", "Edit": "Düzenle", "Refresh": "Yenile", + "Language": "Dil", + "LoadMore": "Daha fazla yükle", "ProcessingWithThreeDot": "İşleniyor...", "LoadingWithThreeDot": "Yükleniyor...", "Welcome": "Hoşgeldiniz", diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json index 1030a3860f..d71cac388c 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json @@ -13,6 +13,7 @@ "DefaultErrorMessage404": "未找到资源!", "DefaultErrorMessage404Detail": "未在服务中找到请求的资源!", "EntityNotFoundErrorMessage": "实体 {0} 不存在,id = {1}!", + "Languages": "语言", "Error": "错误", "AreYouSure": "你确定吗?", "Cancel": "取消", diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hant.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hant.json new file mode 100644 index 0000000000..d19dc7cbc6 --- /dev/null +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hant.json @@ -0,0 +1,58 @@ +{ + "culture": "zh-Hant", + "texts": { + "InternalServerErrorMessage": "對不起,在處理你的請求期間,產生了一個伺服器內部錯誤!", + "ValidationErrorMessage": "你的請求無效!", + "ValidationNarrativeErrorMessageTitle": "驗證時發現以下錯誤.", + "DefaultErrorMessage": "發生錯誤!", + "DefaultErrorMessageDetail": "伺服器未發送錯誤的詳細信息.", + "DefaultErrorMessage401": "未通過身份驗證!", + "DefaultErrorMessage401Detail": "你需要進行身份認證(登入)後再執行此操作.", + "DefaultErrorMessage403": "你沒有權限!", + "DefaultErrorMessage403Detail": "你不能執行此操作!", + "DefaultErrorMessage404": "未找到資源!", + "DefaultErrorMessage404Detail": "未在服務中找到請求的資源!", + "EntityNotFoundErrorMessage": "實體 {0} 不存在,id = {1}!", + "Error": "錯誤", + "AreYouSure": "你確定嗎?", + "Cancel": "取消", + "Yes": "是", + "No": "否", + "Close": "關閉", + "Save": "保存", + "SavingWithThreeDot": "保存中...", + "Actions": "操作", + "Delete": "刪除", + "Edit": "修改", + "Refresh": "刷新", + "ProcessingWithThreeDot": "處理中...", + "LoadingWithThreeDot": "載入中...", + "Welcome": "歡迎", + "Login": "登入", + "Register": "註冊", + "Logout": "登出", + "Submit": "提交", + "Back": "返回", + "PagerSearch": "搜尋", + "PagerNext": "下一頁", + "PagerPrevious": "上一頁", + "PagerFirst": "首頁", + "PagerLast": "末頁", + "PagerInfo": "顯示 _TOTAL_ 個紀錄的 _START_ 到 _END_ 個.", + "PagerInfoEmpty": "顯示0個紀錄中的0到0", + "PagerInfoFiltered": "(從 _MAX_ 所有紀錄中過濾掉)", + "NoDataAvailableInDatatable": "資料表中沒有資料", + "PagerShowMenuEntries": "顯示 _MENU_ 實體", + "DatatableActionDropdownDefaultText": "操作", + "ChangePassword": "修改密碼", + "PersonalInfo": "個人資料", + "AreYouSureYouWantToCancelEditingWarningMessage": "你有未保存的更改.", + "UnhandledException": "未處理的異常!", + "401Message": "未授權", + "403Message": "禁止訪問", + "404Message": "網頁未找到", + "500Message": "內部伺服器錯誤", + "GoHomePage": "返回首頁", + "GoBack": "返回" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj b/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj index 8716d7a210..acff7d004b 100644 --- a/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj +++ b/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj @@ -1,5 +1,6 @@ - + + @@ -22,4 +23,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Uow/FodyWeavers.xml b/framework/src/Volo.Abp.Uow/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Uow/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Uow/FodyWeavers.xsd b/framework/src/Volo.Abp.Uow/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Uow/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj b/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj index 00e4ad77d4..1c5552d1da 100644 --- a/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj +++ b/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs index 18010136b2..e7e86774b5 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs @@ -80,7 +80,7 @@ namespace Volo.Abp.Uow { if (databaseApi is ISupportsSavingChanges) { - await (databaseApi as ISupportsSavingChanges).SaveChangesAsync(cancellationToken).ConfigureAwait(false); + await (databaseApi as ISupportsSavingChanges).SaveChangesAsync(cancellationToken); } } } @@ -107,10 +107,10 @@ namespace Volo.Abp.Uow try { _isCompleting = true; - await SaveChangesAsync(cancellationToken).ConfigureAwait(false); - await CommitTransactionsAsync().ConfigureAwait(false); + await SaveChangesAsync(cancellationToken); + await CommitTransactionsAsync(); IsCompleted = true; - await OnCompletedAsync().ConfigureAwait(false); + await OnCompletedAsync(); } catch (Exception ex) { @@ -128,7 +128,7 @@ namespace Volo.Abp.Uow _isRolledback = true; - await RollbackAllAsync(cancellationToken).ConfigureAwait(false); + await RollbackAllAsync(cancellationToken); } public IDatabaseApi FindDatabaseApi(string key) @@ -194,7 +194,7 @@ namespace Volo.Abp.Uow { foreach (var handler in CompletedHandlers) { - await handler.Invoke().ConfigureAwait(false); + await handler.Invoke(); } } @@ -278,7 +278,7 @@ namespace Volo.Abp.Uow { try { - await (databaseApi as ISupportsRollback).RollbackAsync(cancellationToken).ConfigureAwait(false); + await (databaseApi as ISupportsRollback).RollbackAsync(cancellationToken); } catch { } } @@ -290,7 +290,7 @@ namespace Volo.Abp.Uow { try { - await (transactionApi as ISupportsRollback).RollbackAsync(cancellationToken).ConfigureAwait(false); + await (transactionApi as ISupportsRollback).RollbackAsync(cancellationToken); } catch { } } @@ -309,7 +309,7 @@ namespace Volo.Abp.Uow { foreach (var transaction in GetAllActiveTransactionApis()) { - await transaction.CommitAsync().ConfigureAwait(false); + await transaction.CommitAsync(); } } diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs index d08c9b943e..81bd132a5e 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs @@ -22,14 +22,14 @@ namespace Volo.Abp.Uow { if (!UnitOfWorkHelper.IsUnitOfWorkMethod(invocation.Method, out var unitOfWorkAttribute)) { - await invocation.ProceedAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); return; } using (var uow = _unitOfWorkManager.Begin(CreateOptions(invocation, unitOfWorkAttribute))) { - await invocation.ProceedAsync().ConfigureAwait(false); - await uow.CompleteAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); + await uow.CompleteAsync(); } } diff --git a/framework/src/Volo.Abp.Validation/FodyWeavers.xml b/framework/src/Volo.Abp.Validation/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Validation/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/FodyWeavers.xsd b/framework/src/Volo.Abp.Validation/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Validation/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj b/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj index 86017b9628..edbcf2f04d 100644 --- a/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj +++ b/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj @@ -1,5 +1,6 @@ - + + diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hant.json b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hant.json new file mode 100644 index 0000000000..1e7e419625 --- /dev/null +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hant.json @@ -0,0 +1,34 @@ +{ + "culture": "zh-Hant", + "texts": { + "'{0}' and '{1}' do not match.": "'{0}'與'{1}'不匹配.", + "The {0} field is not a valid credit card number.": "欄位{0}不是有效的信用卡號碼.", + "{0} is not valid.": "{0}驗證未通過.", + "The {0} field is not a valid e-mail address.": "欄位{0}不是有效的電子郵件地址.", + "The {0} field only accepts files with the following extensions: {1}": "{0}欄位只允許以下副檔名的文件: {1}", + "The field {0} must be a string or array type with a maximum length of '{1}'.": "欄位{0}必須是最大長度為'{1}'的字串或陣列.", + "The field {0} must be a string or array type with a minimum length of '{1}'.": "欄位{0}必須是最小長度為'{1}'的字串或陣列.", + "The {0} field is not a valid phone number.": "欄位{0}不是有效的電話號碼.", + "The field {0} must be between {1} and {2}.": "欄位{0}值必須在{1}和{2}範圍內.", + "The field {0} must match the regular expression '{1}'.": "欄位{0}必須匹配正規表示式'{1}'.", + "The {0} field is required.": "欄位{0}不可為空.", + "The field {0} must be a string with a maximum length of {1}.": "欄位{0}必須是長度為{1}的字串.", + "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "欄位{0}必須是最小長度為{2}並且最大長度{1}的字串.", + "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "欄位{0}不是有效的完全限定的http,https或ftp URL.", + "The field {0} is invalid.": "此欄位{0}是無效值.", + "ThisFieldIsNotAValidCreditCardNumber.": "此欄位不是有效的信用卡號碼.", + "ThisFieldIsNotValid.": "此驗證未通過.", + "ThisFieldIsNotAValidEmailAddress.": "此欄位不是有效的郵箱地址.", + "ThisFieldOnlyAcceptsFilesWithTheFollowingExtensions:{0}": "此欄位只允許以下副檔名的文件: {0}", + "ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthoOf{0}": "此欄位必須是最大長度為'{0}'的字串或陣列.", + "ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}": "此欄位必須是最小長度為'{0}'的字串或陣列.", + "ThisFieldIsNotAValidPhoneNumber.": "此欄位不是有效的電話號碼.", + "ThisFieldMustBeBetween{0}And{1}": "此欄位值必須在{0}和{1}範圍內.", + "ThisFieldMustMatchTheRegularExpression{0}": "此欄位必須匹配正規表示式'{0}'.", + "ThisFieldIsRequired.": "此欄位不可為空.", + "ThisFieldMustBeAStringWithAMaximumLengthOf{0}": "此欄位必須是長度為{0}的字串.", + "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "此欄位必須是最小長度為{1}並且最大長度{0}的字串.", + "ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl": "此欄位不是有效的完全限定的http,https或ftp URL.", + "ThisFieldIsInvalid.": "此欄位是無效值." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs index 24581c54d9..b4ce642471 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.Validation public override async Task InterceptAsync(IAbpMethodInvocation invocation) { Validate(invocation); - await invocation.ProceedAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); } protected virtual void Validate(IAbpMethodInvocation invocation) diff --git a/framework/src/Volo.Abp.VirtualFileSystem/FodyWeavers.xml b/framework/src/Volo.Abp.VirtualFileSystem/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.VirtualFileSystem/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.VirtualFileSystem/FodyWeavers.xsd b/framework/src/Volo.Abp.VirtualFileSystem/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.VirtualFileSystem/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs b/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs index 9186e4d9e2..7d3505d616 100644 --- a/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs +++ b/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs @@ -56,7 +56,7 @@ namespace Microsoft.Extensions.FileProviders using (var stream = fileInfo.CreateReadStream()) { - return await stream.GetAllBytesAsync().ConfigureAwait(false); + return await stream.GetAllBytesAsync(); } } diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj index 512c901b69..2ba15cae3d 100644 --- a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj +++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj @@ -1,5 +1,6 @@ + diff --git a/framework/src/Volo.Abp/FodyWeavers.xml b/framework/src/Volo.Abp/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp/FodyWeavers.xsd b/framework/src/Volo.Abp/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp/Volo.Abp.csproj b/framework/src/Volo.Abp/Volo.Abp.csproj index b3cf4f5752..37f9ded71c 100644 --- a/framework/src/Volo.Abp/Volo.Abp.csproj +++ b/framework/src/Volo.Abp/Volo.Abp.csproj @@ -1,5 +1,6 @@ - - + + + @@ -16,4 +17,4 @@ - \ No newline at end of file + diff --git a/framework/test/AbpTestBase/AbpTestBase.csproj b/framework/test/AbpTestBase/AbpTestBase.csproj index 566bfde770..e1a625580d 100644 --- a/framework/test/AbpTestBase/AbpTestBase.csproj +++ b/framework/test/AbpTestBase/AbpTestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj index 133f84bd10..6cd2465068 100644 --- a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj +++ b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj index 2e6a7187fd..e1253f04c3 100644 --- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj @@ -1,5 +1,5 @@ - - + + diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj index 06b6fbcd94..a24f7796c9 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs index 8ec04b23a6..44e2e38380 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs @@ -41,7 +41,7 @@ namespace Volo.Abp.AspNetCore.App }; var result = jsonSerializer.Serialize(dictionary, camelCase: false); - await ctx.Response.WriteAsync(result).ConfigureAwait(false); + await ctx.Response.WriteAsync(result); }); } } diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs index 437240971d..e2ac111f5d 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs @@ -46,14 +46,14 @@ namespace Volo.Abp.AspNetCore.MultiTenancy [Fact] public async Task Should_Use_Host_If_Tenant_Is_Not_Specified() { - var result = await GetResponseAsObjectAsync>("http://abp.io").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("http://abp.io"); result["TenantId"].ShouldBe(""); } [Fact] public async Task Should_Use_Domain_If_Specified() { - var result = await GetResponseAsObjectAsync>("http://acme.abp.io").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("http://acme.abp.io"); result["TenantId"].ShouldBe(_testTenantId.ToString()); } @@ -62,7 +62,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { Client.DefaultRequestHeaders.Add(_options.TenantKey, Guid.NewGuid().ToString()); - var result = await GetResponseAsObjectAsync>("http://acme.abp.io").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("http://acme.abp.io"); result["TenantId"].ShouldBe(_testTenantId.ToString()); } } diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs index 64f7ed2892..37365089af 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs @@ -42,7 +42,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy [Fact] public async Task Should_Use_Host_If_Tenant_Is_Not_Specified() { - var result = await GetResponseAsObjectAsync>("http://abp.io").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("http://abp.io"); result["TenantId"].ShouldBe(""); } @@ -50,7 +50,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy public async Task Should_Use_QueryString_Tenant_Id_If_Specified() { - var result = await GetResponseAsObjectAsync>($"http://abp.io?{_options.TenantKey}={_testTenantName}").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>($"http://abp.io?{_options.TenantKey}={_testTenantName}"); result["TenantId"].ShouldBe(_testTenantId.ToString()); } @@ -59,7 +59,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { Client.DefaultRequestHeaders.Add(_options.TenantKey, _testTenantId.ToString()); - var result = await GetResponseAsObjectAsync>("http://abp.io").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("http://abp.io"); result["TenantId"].ShouldBe(_testTenantId.ToString()); } @@ -68,7 +68,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { Client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(_options.TenantKey, _testTenantId.ToString()).ToString()); - var result = await GetResponseAsObjectAsync>("http://abp.io").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("http://abp.io"); result["TenantId"].ShouldBe(_testTenantId.ToString()); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj index 4dad128d56..ddb3f5bc44 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs index f141cf89c1..44b206e462 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApiExploring [Fact] public async Task GetAsync() { - var model = await GetResponseAsObjectAsync("/api/abp/api-definition").ConfigureAwait(false); + var model = await GetResponseAsObjectAsync("/api/abp/api-definition"); model.ShouldNotBeNull(); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationBuilder_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationBuilder_Tests.cs index 590aa1a142..c5f53e4721 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationBuilder_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationBuilder_Tests.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations { var applicationConfigurationBuilder = GetRequiredService(); - var config = await applicationConfigurationBuilder.GetAsync().ConfigureAwait(false); + var config = await applicationConfigurationBuilder.GetAsync(); config.Auth.ShouldNotBeNull(); config.Localization.ShouldNotBeNull(); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs index 2937fd6759..8caf59d0c0 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization [Fact] public async Task Should_Call_Anonymous_Method_Without_Authentication() { - var result = await GetResponseAsStringAsync("/AuthTest/AnonymousTest").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/AuthTest/AnonymousTest"); result.ShouldBe("OK"); } @@ -41,7 +41,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization new Claim(AbpClaimTypes.UserId, AuthTestController.FakeUserId.ToString()) }); - var result = await GetResponseAsStringAsync("/AuthTest/SimpleAuthorizationTest").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/AuthTest/SimpleAuthorizationTest"); result.ShouldBe("OK"); } @@ -54,7 +54,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization new Claim("MyCustomClaimType", "42") }); - var result = await GetResponseAsStringAsync("/AuthTest/CustomPolicyTest").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/AuthTest/CustomPolicyTest"); result.ShouldBe("OK"); } @@ -70,7 +70,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization //TODO: We can get a real exception if we properly configure authentication schemas for this project await Assert.ThrowsAsync(async () => await GetResponseAsStringAsync("/AuthTest/CustomPolicyTest") -.ConfigureAwait(false)).ConfigureAwait(false); + ); } [Fact] @@ -81,7 +81,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization new Claim(AbpClaimTypes.UserId, AuthTestController.FakeUserId.ToString()) }); - var result = await GetResponseAsStringAsync("/AuthTest/PermissionTest").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/AuthTest/PermissionTest"); result.ShouldBe("OK"); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/FakeAuthenticationMiddleware.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/FakeAuthenticationMiddleware.cs index 1952ef22b9..b9caa1d7cb 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/FakeAuthenticationMiddleware.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/FakeAuthenticationMiddleware.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization }); } - await next(context).ConfigureAwait(false); + await next(context); } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController_Tests.cs index 1d11103c6f..5243307116 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController_Tests.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling [Fact] public async Task Should_Return_RemoteServiceErrorResponse_For_UserFriendlyException_For_Void_Return_Value() { - var result = await GetResponseAsObjectAsync("/api/exception-test/UserFriendlyException1", HttpStatusCode.Forbidden).ConfigureAwait(false); + var result = await GetResponseAsObjectAsync("/api/exception-test/UserFriendlyException1", HttpStatusCode.Forbidden); result.Error.ShouldNotBeNull(); result.Error.Message.ShouldBe("This is a sample exception!"); } @@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling async () => await GetResponseAsObjectAsync( "/api/exception-test/UserFriendlyException2" ) -.ConfigureAwait(false)).ConfigureAwait(false); + ); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Features/FeatureTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Features/FeatureTestController_Tests.cs index 52ff323be6..c017841548 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Features/FeatureTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Features/FeatureTestController_Tests.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Features { await GetResponseAsStringAsync( "/api/feature-test/allowed-feature", HttpStatusCode.NoContent - ).ConfigureAwait(false); + ); } [Fact] @@ -20,7 +20,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Features await GetResponseAsStringAsync( "/api/feature-test/not-allowed-feature", HttpStatusCode.Unauthorized - ).ConfigureAwait(false); + ); } [Fact] @@ -28,7 +28,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Features { await GetResponseAsStringAsync( "/api/feature-test/no-feature" - ).ConfigureAwait(false); + ); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs index eeb47ea0a3..3e365cde3e 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json { var time = await GetResponseAsStringAsync( "/api/json-result-test/json-result-action" - ).ConfigureAwait(false); + ); time.ShouldContain("2019*01*01"); } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/MvcLocalization_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/MvcLocalization_Tests.cs index 2f5ad74df9..4d9a4f4624 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/MvcLocalization_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/MvcLocalization_Tests.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Localization [Fact] public async Task Should_Get_Same_Text_If_Not_Defined_In_Razor_View() { - var result = await GetResponseAsStringAsync("/LocalizationTest/HelloJohn").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/LocalizationTest/HelloJohn"); result.ShouldBe("Hello John."); } @@ -36,13 +36,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Localization { using (CultureHelper.Use("en")) { - var result = await GetResponseAsStringAsync("/LocalizationTest/PersonForm").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/LocalizationTest/PersonForm"); result.ShouldContain(""); } using (CultureHelper.Use("tr")) { - var result = await GetResponseAsStringAsync("/LocalizationTest/PersonForm").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/LocalizationTest/PersonForm"); result.ShouldContain(""); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/zh-Hant.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/zh-Hant.json new file mode 100644 index 0000000000..c70842f0b2 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "BirthDate": "生日", + "Value1": "值1" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs index 45f8410eee..632a02194f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs @@ -21,10 +21,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding [Fact] public async Task DateTimeKind_Test() { - var response = await Client.GetAsync("/api/model-Binding-test/DateTimeKind?input=2010-01-01T00:00:00Z").ConfigureAwait(false); + var response = await Client.GetAsync("/api/model-Binding-test/DateTimeKind?input=2010-01-01T00:00:00Z"); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); resultAsString.ShouldBe(DateTimeKind.ToString().ToLower()); } @@ -32,10 +32,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding public async Task NullableDateTimeKind_Test() { var response = - await Client.GetAsync("/api/model-Binding-test/NullableDateTimeKind?input=2010-01-01T00:00:00Z").ConfigureAwait(false); + await Client.GetAsync("/api/model-Binding-test/NullableDateTimeKind?input=2010-01-01T00:00:00Z"); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); resultAsString.ShouldBe(DateTimeKind.ToString().ToLower()); } @@ -44,10 +44,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding { var response = await Client.GetAsync( - "/api/model-Binding-test/DisableDateTimeNormalizationDateTimeKind?input=2010-01-01T00:00:00Z").ConfigureAwait(false); + "/api/model-Binding-test/DisableDateTimeNormalizationDateTimeKind?input=2010-01-01T00:00:00Z"); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is Local. resultAsString.ShouldBe(DateTimeKind.Local.ToString().ToLower()); } @@ -57,10 +57,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding { var response = await Client.GetAsync( - "/api/model-Binding-test/DisableDateTimeNormalizationNullableDateTimeKind?input=2010-01-01T00:00:00Z").ConfigureAwait(false); + "/api/model-Binding-test/DisableDateTimeNormalizationNullableDateTimeKind?input=2010-01-01T00:00:00Z"); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is Local. resultAsString.ShouldBe(DateTimeKind.Local.ToString().ToLower()); } @@ -72,10 +72,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding "Time1=2010-01-01T00:00:00Z&" + "Time2=2010-01-01T00:00:00Z&" + "Time3=2010-01-01T00:00:00Z&" + - "InnerModel.Time4=2010-01-01T00:00:00Z").ConfigureAwait(false); + "InnerModel.Time4=2010-01-01T00:00:00Z"); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is Local. resultAsString.ShouldBe( $"local_{DateTimeKind.ToString().ToLower()}_{DateTimeKind.ToString().ToLower()}_local"); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PeopleAppService_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PeopleAppService_Tests.cs index c3c90d02f7..96a79d8971 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PeopleAppService_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PeopleAppService_Tests.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.AspNetCore.Mvc [Fact] public async Task GetAll_Test() { - var result = await GetResponseAsObjectAsync>("/api/app/people").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>("/api/app/people"); result.Items.Count.ShouldBeGreaterThan(0); } @@ -44,7 +44,7 @@ namespace Volo.Abp.AspNetCore.Mvc { var firstPerson = (await _personRepository.GetListAsync()).First(); - var result = await GetResponseAsObjectAsync($"/api/app/people/{firstPerson.Id}").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync($"/api/app/people/{firstPerson.Id}"); result.Name.ShouldBe(firstPerson.Name); } @@ -53,9 +53,9 @@ namespace Volo.Abp.AspNetCore.Mvc { var firstPerson = (await _personRepository.GetListAsync()).First(); - await Client.DeleteAsync($"/api/app/people/{firstPerson.Id}").ConfigureAwait(false); + await Client.DeleteAsync($"/api/app/people/{firstPerson.Id}"); - (await _personRepository.FindAsync(firstPerson.Id).ConfigureAwait(false)).ShouldBeNull(); + (await _personRepository.FindAsync(firstPerson.Id)).ShouldBeNull(); } [Fact] @@ -68,10 +68,10 @@ namespace Volo.Abp.AspNetCore.Mvc var response = await Client.PostAsync( "/api/app/people", new StringContent(postData, Encoding.UTF8, MimeTypes.Application.Json) - ).ConfigureAwait(false); + ); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); PersonDto resultDto = _jsonSerializer.Deserialize(resultAsString); //Assert @@ -80,7 +80,7 @@ namespace Volo.Abp.AspNetCore.Mvc resultDto.Name.ShouldBe("John"); resultDto.Age.ShouldBe(33); - (await _personRepository.FindAsync(resultDto.Id).ConfigureAwait(false)).ShouldNotBeNull(); + (await _personRepository.FindAsync(resultDto.Id)).ShouldNotBeNull(); } @@ -100,10 +100,10 @@ namespace Volo.Abp.AspNetCore.Mvc var response = await Client.PutAsync( $"/api/app/people/{updateDto.Id}", new StringContent(putData, Encoding.UTF8, MimeTypes.Application.Json) - ).ConfigureAwait(false); + ); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); PersonDto resultDto = _jsonSerializer.Deserialize(resultAsString); //Assert @@ -112,7 +112,7 @@ namespace Volo.Abp.AspNetCore.Mvc resultDto.Name.ShouldBe(firstPerson.Name); resultDto.Age.ShouldBe(firstPersonAge + 1); - var personInDb = (await _personRepository.FindAsync(resultDto.Id).ConfigureAwait(false)); + var personInDb = (await _personRepository.FindAsync(resultDto.Id)); personInDb.ShouldNotBeNull(); personInDb.Name.ShouldBe(firstPerson.Name); personInDb.Age.ShouldBe(firstPersonAge + 1); @@ -133,10 +133,10 @@ namespace Volo.Abp.AspNetCore.Mvc var response = await Client.PostAsync( $"/api/app/people/{personToAddNewPhone.Id}/phones", new StringContent(postData, Encoding.UTF8, MimeTypes.Application.Json) - ).ConfigureAwait(false); + ); response.StatusCode.ShouldBe(HttpStatusCode.OK); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); var resultDto = _jsonSerializer.Deserialize(resultAsString); //Assert @@ -144,7 +144,7 @@ namespace Volo.Abp.AspNetCore.Mvc resultDto.Type.ShouldBe(PhoneType.Mobile); resultDto.Number.ShouldBe(phoneNumberToAdd); - var personInDb = await _personRepository.FindAsync(personToAddNewPhone.Id).ConfigureAwait(false); + var personInDb = await _personRepository.FindAsync(personToAddNewPhone.Id); personInDb.ShouldNotBeNull(); personInDb.Phones.Any(p => p.Number == phoneNumberToAdd).ShouldBeTrue(); } @@ -154,7 +154,7 @@ namespace Volo.Abp.AspNetCore.Mvc { var douglas = (await _personRepository.GetListAsync()).First(p => p.Name == "Douglas"); - var result = await GetResponseAsObjectAsync>($"/api/app/people/{douglas.Id}/phones").ConfigureAwait(false); + var result = await GetResponseAsObjectAsync>($"/api/app/people/{douglas.Id}/phones"); result.Items.Count.ShouldBe(douglas.Phones.Count); } @@ -164,7 +164,7 @@ namespace Volo.Abp.AspNetCore.Mvc var douglas = (await _personRepository.GetListAsync()).First(p => p.Name == "Douglas"); var firstPhone = douglas.Phones.First(); - await Client.DeleteAsync($"/api/app/people/{douglas.Id}/phones?number={firstPhone.Number}").ConfigureAwait(false); + await Client.DeleteAsync($"/api/app/people/{douglas.Id}/phones?number={firstPhone.Number}"); douglas = (await _personRepository.GetListAsync()).First(p => p.Name == "Douglas"); douglas.Phones.Any(p => p.Number == firstPhone.Number).ShouldBeFalse(); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ProxyScripting/AbpServiceProxiesController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ProxyScripting/AbpServiceProxiesController_Tests.cs index 2af719ae4d..c7dce93b3a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ProxyScripting/AbpServiceProxiesController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ProxyScripting/AbpServiceProxiesController_Tests.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ProxyScripting [Fact] public async Task GetAll() { - var script = await GetResponseAsStringAsync("/Abp/ServiceProxyScript?minify=true").ConfigureAwait(false); + var script = await GetResponseAsStringAsync("/Abp/ServiceProxyScript?minify=true"); script.Length.ShouldBeGreaterThan(0); } @@ -18,10 +18,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ProxyScripting public async Task GetAllWithMinify() { GetRequiredService>().Value.MinifyGeneratedScript = false; - var script = await GetResponseAsStringAsync("/Abp/ServiceProxyScript").ConfigureAwait(false); + var script = await GetResponseAsStringAsync("/Abp/ServiceProxyScript"); GetRequiredService>().Value.MinifyGeneratedScript = true; - var minifyScript = await GetResponseAsStringAsync("/Abp/ServiceProxyScript?minify=true").ConfigureAwait(false); + var minifyScript = await GetResponseAsStringAsync("/Abp/ServiceProxyScript?minify=true"); script.Length.ShouldBeGreaterThan(0); minifyScript.Length.ShouldBeGreaterThan(0); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController_Tests.cs index 6c68c13f07..0002a4801b 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController_Tests.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Response public async Task Should_Set_No_Content_For_Void_Action() { var result = await GetResponseAsync("/api/NoContent-Test/TestMethod", HttpStatusCode.NoContent) - .ConfigureAwait(false); + ; result.StatusCode.ShouldBe(HttpStatusCode.NoContent); } @@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Response public async Task Should_Not_Set_No_Content_For_Not_Void_Action() { var result = await GetResponseAsync("/api/NoContent-Test/TestMethodWithReturn") - .ConfigureAwait(false); + ; result.StatusCode.ShouldBe(HttpStatusCode.OK); } @@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Response public async Task Should_Not_Set_No_Content_For_Custom_Http_Status_Code_Action() { var result = await GetResponseAsync("/api/NoContent-Test/TestCustomHttpStatusCodeMethod", HttpStatusCode.Redirect) - .ConfigureAwait(false); + ; result.StatusCode.ShouldBe(HttpStatusCode.Redirect); } @@ -35,7 +35,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Response public async Task Should_Set_No_Content_For_Task_Action() { var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethod", HttpStatusCode.NoContent) - .ConfigureAwait(false); + ; result.StatusCode.ShouldBe(HttpStatusCode.NoContent); } @@ -43,7 +43,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Response public async Task Should_Not_Set_No_Content_For_Not_Task_Action() { var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethodWithReturn") - .ConfigureAwait(false); + ; result.StatusCode.ShouldBe(HttpStatusCode.OK); } @@ -51,7 +51,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Response public async Task Should_Not_Set_No_Content_For_Custom_Http_Status_Code_Async_Action() { var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncCustomHttpStatusCodeMethod", HttpStatusCode.Redirect) - .ConfigureAwait(false); + ; result.StatusCode.ShouldBe(HttpStatusCode.Redirect); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/SimpleController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/SimpleController_Tests.cs index aa111be2f8..cda64b2323 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/SimpleController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/SimpleController_Tests.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.AspNetCore.Mvc { var result = await GetResponseAsStringAsync( GetUrl(nameof(SimpleController.Index)) - ).ConfigureAwait(false); + ); result.ShouldBe("Index-Result"); } @@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc { var result = await GetResponseAsStringAsync( GetUrl(nameof(SimpleController.About)) - ).ConfigureAwait(false); + ); result.Trim().ShouldBe("

    About

    "); } @@ -35,8 +35,8 @@ namespace Volo.Abp.AspNetCore.Mvc { await GetResponseAsStringAsync( GetUrl(nameof(SimpleController.ExceptionOnRazor)) - ).ConfigureAwait(false); - }).ConfigureAwait(false); + ); + }); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs index 81d1c88bee..6400ecb88e 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow [Fact] public async Task Should_Rollback_Transaction_For_Handled_Exceptions() { - var result = await GetResponseAsObjectAsync("/api/unitofwork-test/HandledException", HttpStatusCode.Forbidden).ConfigureAwait(false); + var result = await GetResponseAsObjectAsync("/api/unitofwork-test/HandledException", HttpStatusCode.Forbidden); result.Error.ShouldNotBeNull(); result.Error.Message.ShouldBe("This is a sample exception!"); } @@ -22,11 +22,11 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow [Fact] public async Task Should_Gracefully_Handle_Exceptions_On_Complete() { - var response = await GetResponseAsync("/api/unitofwork-test/ExceptionOnComplete", HttpStatusCode.Forbidden).ConfigureAwait(false); + var response = await GetResponseAsync("/api/unitofwork-test/ExceptionOnComplete", HttpStatusCode.Forbidden); response.Headers.GetValues(AbpHttpConsts.AbpErrorFormat).FirstOrDefault().ShouldBe("true"); - var resultAsString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + var resultAsString = await response.Content.ReadAsStringAsync(); var result = ServiceProvider.GetRequiredService().Deserialize(resultAsString); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Tests.cs index 192d1f0e06..abd666e3f5 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Tests.cs @@ -9,13 +9,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow [Fact] public async Task Get_Actions_Should_Not_Be_Transactional() { - await GetResponseAsStringAsync("/api/unitofwork-test/ActionRequiresUow").ConfigureAwait(false); + await GetResponseAsStringAsync("/api/unitofwork-test/ActionRequiresUow"); } [Fact] public async Task Non_Get_Actions_Should_Be_Transactional() { - var result = await Client.PostAsync("/api/unitofwork-test/ActionRequiresUowPost", null).ConfigureAwait(false); + var result = await Client.PostAsync("/api/unitofwork-test/ActionRequiresUowPost", null); result.IsSuccessStatusCode.ShouldBeTrue(); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs index 9d5cbfa012..361db7845a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs @@ -12,14 +12,14 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation [Fact] public async Task Should_Validate_Object_Result_Success() { - var result = await GetResponseAsStringAsync("/api/validation-test/object-result-action?value1=hello").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/api/validation-test/object-result-action?value1=hello"); result.ShouldBe("hello"); } [Fact] public async Task Should_Validate_Object_Result_Failing() { - var result = await GetResponseAsObjectAsync("/api/validation-test/object-result-action?value1=a", HttpStatusCode.BadRequest).ConfigureAwait(false); //value1 has min length of 2 chars. + var result = await GetResponseAsObjectAsync("/api/validation-test/object-result-action?value1=a", HttpStatusCode.BadRequest); //value1 has min length of 2 chars. result.Error.ValidationErrors.Length.ShouldBeGreaterThan(0); } @@ -28,7 +28,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation { using (CultureHelper.Use("tr")) { - var result = await GetResponseAsObjectAsync("/api/validation-test/object-result-action?value1=a", HttpStatusCode.BadRequest).ConfigureAwait(false); //value1 has min length of 2 chars. + var result = await GetResponseAsObjectAsync("/api/validation-test/object-result-action?value1=a", HttpStatusCode.BadRequest); //value1 has min length of 2 chars. result.Error.ValidationErrors.Length.ShouldBeGreaterThan(0); result.Error.ValidationErrors[0].Message.ShouldBe("Değer Bir alanı en az '2' uzunluğunda bir metin ya da dizi olmalıdır."); } @@ -37,14 +37,14 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation [Fact] public async Task Should_Not_Validate_Action_Result_Success() { - var result = await GetResponseAsStringAsync("/api/validation-test/action-result-action?value1=hello").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/api/validation-test/action-result-action?value1=hello"); result.ShouldBe("ModelState.IsValid: true"); } [Fact] public async Task Should_Not_Validate_Action_Result_Failing() { - var result = await GetResponseAsStringAsync("/api/validation-test/action-result-action").ConfigureAwait(false); //Missed the value1 + var result = await GetResponseAsStringAsync("/api/validation-test/action-result-action"); //Missed the value1 result.ShouldBe("ModelState.IsValid: false"); } @@ -52,7 +52,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation public async Task Should_Return_Custom_Validate_Errors() { var result = await GetResponseAsObjectAsync( - "/api/validation-test/object-result-action-with-custom_validate?value1=abc", HttpStatusCode.BadRequest).ConfigureAwait(false); //value1 should be hello. + "/api/validation-test/object-result-action-with-custom_validate?value1=abc", HttpStatusCode.BadRequest); //value1 should be hello. result.Error.ValidationErrors.Length.ShouldBeGreaterThan(0); result.Error.ValidationErrors.ShouldContain(x => x.Message == "Value1 should be hello"); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj index 8a76a15f5d..53e92dc13a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs index 89d9028fc4..9fcac03459 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Components [Fact(Skip = "This test project is not completed yet")] public async Task Index() { - var result = await GetResponseAsStringAsync("/Components/Cards").ConfigureAwait(false); + var result = await GetResponseAsStringAsync("/Components/Cards"); result.ShouldNotBeNullOrEmpty(); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj index 931eb63088..f0301e04fe 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj index 0a19e5dbdf..fb8b7abd07 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj @@ -1,5 +1,5 @@ - - + + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj index 9ed9312919..1d3fbf892f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/HelloController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/HelloController_Tests.cs index a5db492a39..0dc4057bde 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/HelloController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/HelloController_Tests.cs @@ -18,19 +18,19 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test [Fact] public async Task GetAsync() { - (await _helloController.GetAsync().ConfigureAwait(false)).ShouldBe("Get-2.0"); + (await _helloController.GetAsync()).ShouldBe("Get-2.0"); } [Fact] public async Task PostAsyncV1() { - (await _helloController.PostAsyncV1().ConfigureAwait(false)).ShouldBe("Post-1.0"); + (await _helloController.PostAsyncV1()).ShouldBe("Post-1.0"); } [Fact] public async Task PostAsyncV2() { - (await _helloController.PostAsyncV2().ConfigureAwait(false)).ShouldBe("Post-2.0"); + (await _helloController.PostAsyncV2()).ShouldBe("Post-2.0"); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v1/TodoAppService_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v1/TodoAppService_Tests.cs index 4db9f235be..f5b86cf7d7 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v1/TodoAppService_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v1/TodoAppService_Tests.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test.v1 [Fact] public async Task GetAsync() { - (await _todoAppService.GetAsync(42).ConfigureAwait(false)).ShouldBe("Compat-42-1.0"); + (await _todoAppService.GetAsync(42)).ShouldBe("Compat-42-1.0"); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v2/TodoAppService_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v2/TodoAppService_Tests.cs index 2bfecc2664..d6b681aa2e 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v2/TodoAppService_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Test/v2/TodoAppService_Tests.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test.v2 [Fact] public async Task GetAsync() { - (await _todoAppService.GetAsync(42).ConfigureAwait(false)).ShouldBe("42-2.0"); + (await _todoAppService.GetAsync(42)).ShouldBe("42-2.0"); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj index 740c57949d..02cf2264a4 100644 --- a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo/Abp/AspNetCore/Serilog/Serilog_Enrichers_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo/Abp/AspNetCore/Serilog/Serilog_Enrichers_Tests.cs index 0a7a189a35..77de765f51 100644 --- a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo/Abp/AspNetCore/Serilog/Serilog_Enrichers_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo/Abp/AspNetCore/Serilog/Serilog_Enrichers_Tests.cs @@ -51,7 +51,7 @@ namespace Volo.Abp.AspNetCore.Serilog public async Task TenantId_Not_Set_Test() { var url = GetUrl(nameof(SerilogTestController.Index)); - var result = await GetResponseAsStringAsync(url).ConfigureAwait(false); + var result = await GetResponseAsStringAsync(url); var executedLogEvent = GetLogEvent(ExecutedEndpointLogEventText); @@ -66,7 +66,7 @@ namespace Volo.Abp.AspNetCore.Serilog var url = GetUrl(nameof(SerilogTestController.Index)) + $"?{_tenancyOptions.TenantKey}={_testTenantName}"; - var result = await GetResponseAsStringAsync(url).ConfigureAwait(false); + var result = await GetResponseAsStringAsync(url); var executedLogEvent = GetLogEvent(ExecutedEndpointLogEventText); @@ -81,7 +81,7 @@ namespace Volo.Abp.AspNetCore.Serilog public async Task CorrelationId_Enrichers_Test() { var url = GetUrl(nameof(SerilogTestController.CorrelationId)); - var result = await GetResponseAsStringAsync(url).ConfigureAwait(false); + var result = await GetResponseAsStringAsync(url); var executedLogEvent = GetLogEvent(ExecutedEndpointLogEventText); diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj index dd8b1fc805..8dc3153efb 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs index 2c647d0556..dd5edff807 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs @@ -26,15 +26,15 @@ namespace Volo.Abp.AspNetCore protected virtual async Task GetResponseAsObjectAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) { - var strResponse = await GetResponseAsStringAsync(url, expectedStatusCode).ConfigureAwait(false); + var strResponse = await GetResponseAsStringAsync(url, expectedStatusCode); return JsonConvert.DeserializeObject(strResponse, SharedJsonSerializerSettings); } protected virtual async Task GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) { - using (var response = await GetResponseAsync(url, expectedStatusCode).ConfigureAwait(false)) + using (var response = await GetResponseAsync(url, expectedStatusCode)) { - return await response.Content.ReadAsStringAsync().ConfigureAwait(false); + return await response.Content.ReadAsStringAsync(); } } @@ -43,7 +43,7 @@ namespace Volo.Abp.AspNetCore using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url)) { requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name); - var response = await Client.SendAsync(requestMessage).ConfigureAwait(false); + var response = await Client.SendAsync(requestMessage); response.StatusCode.ShouldBe(expectedStatusCode); return response; } diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs index 88399bd9a7..142d44baec 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem { var result = await GetResponseAsStringAsync( "/SampleFiles/test1.js" - ).ConfigureAwait(false); + ); result.ShouldBe("test1.js-content"); } diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj index 770ad82870..d7c8d84149 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj @@ -1,5 +1,5 @@ - - + + @@ -11,10 +11,12 @@ + + - + diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestBase.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestBase.cs new file mode 100644 index 0000000000..6d61ea10e5 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestBase.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Testing; + +namespace Volo.Abp.Auditing +{ + public class AbpAuditingTestBase : AbpIntegratedTest + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs new file mode 100644 index 0000000000..077658ab83 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs @@ -0,0 +1,64 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Auditing.App.Entities; +using Volo.Abp.Auditing.App.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Auditing +{ + [DependsOn( + typeof(AbpTestBaseModule), + typeof(AbpAutofacModule), + typeof(AbpEntityFrameworkCoreModule) + )] + public class AbpAuditingTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + options.AddDefaultRepositories(true); + }); + + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + + Configure(options => + { + options.EntityHistorySelectors.Add( + new NamedTypeSelector( + "AppEntityWithSelector", + type => type == typeof(AppEntityWithSelector)) + ); + }); + + context.Services.AddType(); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + using (var context = new AbpAuditingTestDbContext(new DbContextOptionsBuilder() + .UseSqlite(connection).Options)) + { + context.GetService().CreateTables(); + } + + return connection; + } + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithAudited.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithAudited.cs new file mode 100644 index 0000000000..6c206aea54 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithAudited.cs @@ -0,0 +1,22 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + [Audited] + public class AppEntityWithAudited : AggregateRoot + { + protected AppEntityWithAudited() + { + + } + + public AppEntityWithAudited(Guid id, string name) + : base(id) + { + Name = name; + } + + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithAuditedAndPropertyHasDisableAuditing.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithAuditedAndPropertyHasDisableAuditing.cs new file mode 100644 index 0000000000..c35372a688 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithAuditedAndPropertyHasDisableAuditing.cs @@ -0,0 +1,26 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + [Audited] + public class AppEntityWithAuditedAndPropertyHasDisableAuditing : AggregateRoot + { + protected AppEntityWithAuditedAndPropertyHasDisableAuditing() + { + + } + + public AppEntityWithAuditedAndPropertyHasDisableAuditing(Guid id, string name, string name2) + : base(id) + { + Name = name; + Name2 = name2; + } + + public string Name { get; set; } + + [DisableAuditing] + public string Name2 { get; set; } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithDisableAuditing.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithDisableAuditing.cs new file mode 100644 index 0000000000..446733ec98 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithDisableAuditing.cs @@ -0,0 +1,22 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + [DisableAuditing] + public class AppEntityWithDisableAuditing : AggregateRoot + { + protected AppEntityWithDisableAuditing() + { + + } + + public AppEntityWithDisableAuditing(Guid id, string name) + : base(id) + { + Name = name; + } + + public string Name { get; set; } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithDisableAuditingAndPropertyHasAudited.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithDisableAuditingAndPropertyHasAudited.cs new file mode 100644 index 0000000000..28a98bac8e --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithDisableAuditingAndPropertyHasAudited.cs @@ -0,0 +1,26 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + [DisableAuditing] + public class AppEntityWithDisableAuditingAndPropertyHasAudited : AggregateRoot + { + protected AppEntityWithDisableAuditingAndPropertyHasAudited() + { + + } + + public AppEntityWithDisableAuditingAndPropertyHasAudited(Guid id, string name, string name2) + : base(id) + { + Name = name; + Name2 = name2; + } + + [Audited] + public string Name { get; set; } + + public string Name2 { get; set; } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithPropertyHasAudited.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithPropertyHasAudited.cs new file mode 100644 index 0000000000..53207cc27c --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithPropertyHasAudited.cs @@ -0,0 +1,22 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + public class AppEntityWithPropertyHasAudited : AggregateRoot + { + protected AppEntityWithPropertyHasAudited() + { + + } + + public AppEntityWithPropertyHasAudited(Guid id, string name) + : base(id) + { + Name = name; + } + + [Audited] + public string Name { get; set; } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSelector.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSelector.cs new file mode 100644 index 0000000000..6c4269a8c2 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSelector.cs @@ -0,0 +1,16 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + public class AppEntityWithSelector : AggregateRoot + { + public AppEntityWithSelector(Guid id, string name) + : base(id) + { + Name = name; + } + + public string Name { get; set; } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs new file mode 100644 index 0000000000..0968bf2cc2 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Auditing.App.Entities; +using Volo.Abp.EntityFrameworkCore; + +namespace Volo.Abp.Auditing.App.EntityFrameworkCore +{ + public class AbpAuditingTestDbContext : AbpDbContext + { + public DbSet AppEntityWithAudited { get; set; } + + public DbSet AppEntityWithAuditedAndPropertyHasDisableAuditing { get; set; } + + public DbSet AppEntityWithDisableAuditing { get; set; } + + public DbSet AppEntityWithDisableAuditingAndPropertyHasAudited { get; set; } + + public DbSet AppEntityWithPropertyHasAudited { get; set; } + + public DbSet AppEntityWithSelector { get; set; } + + public AbpAuditingTestDbContext(DbContextOptions options) + : base(options) + { + + } + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs deleted file mode 100644 index 516310b781..0000000000 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -using NSubstitute; -using Volo.Abp.Autofac; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Modularity; -using Volo.Abp.Testing; -using Xunit; - -namespace Volo.Abp.Auditing -{ - public class AuditingInterceptor_Tests : AbpIntegratedTest - { - private IAuditingStore _auditingStore; - private IAuditingManager _auditingManager; - - public AuditingInterceptor_Tests() - { - _auditingManager = GetRequiredService(); - } - - protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) - { - options.UseAutofac(); - } - - protected override void AfterAddApplication(IServiceCollection services) - { - _auditingStore = Substitute.For(); - services.Replace(ServiceDescriptor.Singleton(_auditingStore)); - } - - [Fact] - public async Task Should_Write_AuditLog_For_Classes_That_Implement_IAuditingEnabled() - { - var myAuditedObject1 = GetRequiredService(); - - using (var scope = _auditingManager.BeginScope()) - { - await myAuditedObject1.DoItAsync(new InputObject { Value1 = "forty-two", Value2 = 42 }).ConfigureAwait(false); - await scope.SaveAsync().ConfigureAwait(false); - } - -#pragma warning disable 4014 - _auditingStore.Received().SaveAsync(Arg.Any()); -#pragma warning restore 4014 - } - - [DependsOn( - typeof(AbpAuditingModule), - typeof(AbpAutofacModule) - )] - public class TestModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddType(); - } - } - - public interface IMyAuditedObject : ITransientDependency, IAuditingEnabled - { - - } - - public class MyAuditedObject1 : IMyAuditedObject - { - public async virtual Task DoItAsync(InputObject inputObject) - { - return new ResultObject - { - Value1 = inputObject.Value1 + "-result", - Value2 = inputObject.Value2 + 1 - }; - } - } - - public class ResultObject - { - public string Value1 { get; set; } - - public int Value2 { get; set; } - } - - public class InputObject - { - public string Value1 { get; set; } - - public int Value2 { get; set; } - } - } -} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs new file mode 100644 index 0000000000..bc41f3bcde --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs @@ -0,0 +1,173 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using NSubstitute; +using Volo.Abp.Auditing.App.Entities; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace Volo.Abp.Auditing +{ + public class Auditing_Tests : AbpAuditingTestBase + { + private IAuditingStore _auditingStore; + private IAuditingManager _auditingManager; + + public Auditing_Tests() + { + _auditingManager = GetRequiredService(); + } + + protected override void AfterAddApplication(IServiceCollection services) + { + _auditingStore = Substitute.For(); + services.Replace(ServiceDescriptor.Singleton(_auditingStore)); + } + + [Fact] + public async Task Should_Write_AuditLog_For_Classes_That_Implement_IAuditingEnabled() + { + var myAuditedObject1 = GetRequiredService(); + + using (var scope = _auditingManager.BeginScope()) + { + await myAuditedObject1.DoItAsync(new InputObject { Value1 = "forty-two", Value2 = 42 }).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Any()); +#pragma warning restore 4014 + } + + public interface IMyAuditedObject : ITransientDependency, IAuditingEnabled + { + + } + + public class MyAuditedObject1 : IMyAuditedObject + { + public async virtual Task DoItAsync(InputObject inputObject) + { + return new ResultObject + { + Value1 = inputObject.Value1 + "-result", + Value2 = inputObject.Value2 + 1 + }; + } + } + + public class ResultObject + { + public string Value1 { get; set; } + + public int Value2 { get; set; } + } + + public class InputObject + { + public string Value1 { get; set; } + + public int Value2 { get; set; } + } + + [Fact] + public virtual async Task Should_Write_AuditLog_For_Entity_That_Has_Audited_Attribute() + { + using (var scope = _auditingManager.BeginScope()) + { + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(new AppEntityWithAudited(Guid.NewGuid(), "test name")).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Any()); +#pragma warning restore 4014 + } + + [Fact] + public virtual async Task Should_Not_Write_AuditLog_For_Property_That_Has_DisableAuditing_Attribute() + { + using (var scope = _auditingManager.BeginScope()) + { + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(new AppEntityWithAuditedAndPropertyHasDisableAuditing(Guid.NewGuid(), "test name", "test name2")).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Is(x => + x.EntityChanges.Count == 1 && + !(x.EntityChanges[0].PropertyChanges.Any(p => + p.PropertyName == nameof(AppEntityWithDisableAuditingAndPropertyHasAudited.Name2))))); +#pragma warning restore 4014 + } + + [Fact] + public virtual async Task Should_Not_Write_AuditLog_For_Entity_That_Has_DisableAuditing_Attribute() + { + using (var scope = _auditingManager.BeginScope()) + { + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(new AppEntityWithDisableAuditing(Guid.NewGuid(), "test name")).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.DidNotReceive().SaveAsync(Arg.Any()); +#pragma warning restore 4014 + } + + [Fact] + public virtual async Task Should_Write_AuditLog_For_Entity_That_Meet_Selectors() + { + using (var scope = _auditingManager.BeginScope()) + { + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(new AppEntityWithSelector(Guid.NewGuid(), "test name")).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Any()); +#pragma warning restore 4014 + } + + [Fact] + public virtual async Task Should_Write_AuditLog_For_Entity_That_Property_Has_Audited_Attribute() + { + using (var scope = _auditingManager.BeginScope()) + { + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(new AppEntityWithPropertyHasAudited(Guid.NewGuid(), "test name")).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Any()); +#pragma warning restore 4014 + } + + [Fact] + public virtual async Task Should_Write_AuditLog_For_Entity_That_Property_Has_Audited_Attribute_Even_Entity_Has_DisableAuditing_Attribute() + { + using (var scope = _auditingManager.BeginScope()) + { + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(new AppEntityWithDisableAuditingAndPropertyHasAudited(Guid.NewGuid(), "test name", "test name2")).ConfigureAwait(false); + await scope.SaveAsync().ConfigureAwait(false); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Is(x => + x.EntityChanges.Count == 1 && x.EntityChanges[0].PropertyChanges.Count == 1 && + x.EntityChanges[0].PropertyChanges[0].PropertyName == + nameof(AppEntityWithDisableAuditingAndPropertyHasAudited.Name))); +#pragma warning restore 4014 + } + } +} diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj index 5abc0fc670..3249de2c50 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs index 2950c7c92a..104d75c11b 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs @@ -22,8 +22,8 @@ namespace Volo.Abp.Authorization { await Assert.ThrowsAsync(async () => { - await _myAuthorizedService1.ProtectedByClass().ConfigureAwait(false); - }).ConfigureAwait(false); + await _myAuthorizedService1.ProtectedByClass(); + }); } [Fact] @@ -31,20 +31,20 @@ namespace Volo.Abp.Authorization { await Assert.ThrowsAsync(async () => { - await _myAuthorizedService1.ProtectedByClassAsync().ConfigureAwait(false); - }).ConfigureAwait(false); + await _myAuthorizedService1.ProtectedByClassAsync(); + }); } [Fact] public async Task Should_Allow_To_Call_Anonymous_Method() { - (await _myAuthorizedService1.Anonymous().ConfigureAwait(false)).ShouldBe(42); + (await _myAuthorizedService1.Anonymous()).ShouldBe(42); } [Fact] public async Task Should_Allow_To_Call_Anonymous_Method_Async() { - (await _myAuthorizedService1.AnonymousAsync().ConfigureAwait(false)).ShouldBe(42); + (await _myAuthorizedService1.AnonymousAsync()).ShouldBe(42); } [Fact] diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/MyAuthorizedService1.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/MyAuthorizedService1.cs index 6d64ed80dd..b1b2a4c43f 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/MyAuthorizedService1.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/MyAuthorizedService1.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.Authorization.TestServices [AllowAnonymous] public virtual async Task AnonymousAsync() { - await Task.Delay(10).ConfigureAwait(false); + await Task.Delay(10); return 42; } @@ -27,7 +27,7 @@ namespace Volo.Abp.Authorization.TestServices public virtual async Task ProtectedByClassAsync() { - await Task.Delay(10).ConfigureAwait(false); + await Task.Delay(10); return 42; } } diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj index 4bf0661800..acdd6fac6b 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj index bbbee3bbbb..7854d82b82 100644 --- a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj +++ b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -17,4 +17,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj index b352c05455..c8763de75d 100644 --- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj +++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/BackgroundJobManager_Tests.cs b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/BackgroundJobManager_Tests.cs index 2cd76620ff..3a84e38df1 100644 --- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/BackgroundJobManager_Tests.cs +++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/BackgroundJobManager_Tests.cs @@ -19,17 +19,17 @@ namespace Volo.Abp.BackgroundJobs [Fact] public async Task Should_Store_Jobs() { - var jobIdAsString = await _backgroundJobManager.EnqueueAsync(new MyJobArgs("42")).ConfigureAwait(false); + var jobIdAsString = await _backgroundJobManager.EnqueueAsync(new MyJobArgs("42")); jobIdAsString.ShouldNotBe(default); - (await _backgroundJobStore.FindAsync(Guid.Parse(jobIdAsString)).ConfigureAwait(false)).ShouldNotBeNull(); + (await _backgroundJobStore.FindAsync(Guid.Parse(jobIdAsString))).ShouldNotBeNull(); } [Fact] public async Task Should_Store_Async_Jobs() { - var jobIdAsString = await _backgroundJobManager.EnqueueAsync(new MyAsyncJobArgs("42")).ConfigureAwait(false); + var jobIdAsString = await _backgroundJobManager.EnqueueAsync(new MyAsyncJobArgs("42")); jobIdAsString.ShouldNotBe(default); - (await _backgroundJobStore.FindAsync(Guid.Parse(jobIdAsString)).ConfigureAwait(false)).ShouldNotBeNull(); + (await _backgroundJobStore.FindAsync(Guid.Parse(jobIdAsString))).ShouldNotBeNull(); } } } diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj index 4301d8c1f4..698278ee4c 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs index d3afb3addf..0a0509df6c 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs +++ b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.Caching var cacheKey = Guid.NewGuid().ToString(); //Get (not exists yet) - var cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); GetDefaultCachingOptions(personCache).SlidingExpiration.ShouldBe(TimeSpan.FromMinutes(20)); diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs index 50a4a76763..14677a73bd 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs +++ b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs @@ -17,23 +17,23 @@ namespace Volo.Abp.Caching const string personName = "john nash"; //Get (not exists yet) - var cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); //Set cacheItem = new PersonCacheItem(personName); - await personCache.SetAsync(cacheKey, cacheItem).ConfigureAwait(false); + await personCache.SetAsync(cacheKey, cacheItem); //Get (it should be available now - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldNotBeNull(); cacheItem.Name.ShouldBe(personName); //Remove - await personCache.RemoveAsync(cacheKey).ConfigureAwait(false); + await personCache.RemoveAsync(cacheKey); //Get (not exists since removed) - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); } @@ -85,41 +85,41 @@ namespace Volo.Abp.Caching const string personName = "john nash"; //Get (not exists yet) - var cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); - var cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldBeNull(); //Set cacheItem = new PersonCacheItem(personName); - await personCache.SetAsync(cacheKey, cacheItem).ConfigureAwait(false); + await personCache.SetAsync(cacheKey, cacheItem); //Get (it should be available now, but otherPersonCache not exists now. - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldNotBeNull(); cacheItem.Name.ShouldBe(personName); - cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldBeNull(); //set other person cache cacheItem1 = new Sail.Testing.Caching.PersonCacheItem(personName); - await otherPersonCache.SetAsync(cacheKey, cacheItem1).ConfigureAwait(false); + await otherPersonCache.SetAsync(cacheKey, cacheItem1); - cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldNotBeNull(); cacheItem1.Name.ShouldBe(personName); //Remove - await personCache.RemoveAsync(cacheKey).ConfigureAwait(false); + await personCache.RemoveAsync(cacheKey); //Get (not exists since removed) - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); - cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldNotBeNull(); } @@ -133,23 +133,23 @@ namespace Volo.Abp.Caching const string personName = "john nash"; //Get (not exists yet) - var cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); //Set cacheItem = new PersonCacheItem(personName); - await personCache.SetAsync(cacheKey, cacheItem).ConfigureAwait(false); + await personCache.SetAsync(cacheKey, cacheItem); //Get (it should be available now - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldNotBeNull(); cacheItem.Name.ShouldBe(personName); //Remove - await personCache.RemoveAsync(cacheKey).ConfigureAwait(false); + await personCache.RemoveAsync(cacheKey); //Get (not exists since removed) - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); } @@ -184,7 +184,7 @@ namespace Volo.Abp.Caching { factoryExecuted = true; return new PersonCacheItem(personName); - }).ConfigureAwait(false); + }); factoryExecuted.ShouldBeFalse(); cacheItem.Name.ShouldBe(personName); @@ -201,41 +201,41 @@ namespace Volo.Abp.Caching const string personName = "john nash"; //Get (not exists yet) - var cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); - var cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldBeNull(); //Set cacheItem = new PersonCacheItem(personName); - await personCache.SetAsync(cacheKey, cacheItem).ConfigureAwait(false); + await personCache.SetAsync(cacheKey, cacheItem); //Get (it should be available now, but otherPersonCache not exists now. - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldNotBeNull(); cacheItem.Name.ShouldBe(personName); - cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldBeNull(); //set other person cache cacheItem1 = new Sail.Testing.Caching.PersonCacheItem(personName); - await otherPersonCache.SetAsync(cacheKey, cacheItem1).ConfigureAwait(false); + await otherPersonCache.SetAsync(cacheKey, cacheItem1); - cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldNotBeNull(); cacheItem1.Name.ShouldBe(personName); //Remove - await personCache.RemoveAsync(cacheKey).ConfigureAwait(false); + await personCache.RemoveAsync(cacheKey); //Get (not exists since removed) - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); - cacheItem1 = await otherPersonCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); cacheItem1.ShouldNotBeNull(); } @@ -249,23 +249,23 @@ namespace Volo.Abp.Caching const string personName = "john nash"; //Get (not exists yet) - var cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); //Set cacheItem = new PersonCacheItem(personName); - await personCache.SetAsync(cacheKey, cacheItem).ConfigureAwait(false); + await personCache.SetAsync(cacheKey, cacheItem); //Get (it should be available now - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldNotBeNull(); cacheItem.Name.ShouldBe(personName); //Remove - await personCache.RemoveAsync(cacheKey).ConfigureAwait(false); + await personCache.RemoveAsync(cacheKey); //Get (not exists since removed) - cacheItem = await personCache.GetAsync(cacheKey).ConfigureAwait(false); + cacheItem = await personCache.GetAsync(cacheKey); cacheItem.ShouldBeNull(); } @@ -279,34 +279,34 @@ namespace Volo.Abp.Caching const string personName = "john nash"; //Get (not exists yet) - var cacheItem1 = await personCache.GetAsync(cache1Key).ConfigureAwait(false); - var cacheItem2 = await personCache.GetAsync(cache2Key).ConfigureAwait(false); + var cacheItem1 = await personCache.GetAsync(cache1Key); + var cacheItem2 = await personCache.GetAsync(cache2Key); cacheItem1.ShouldBeNull(); cacheItem2.ShouldBeNull(); //Set cacheItem1 = new PersonCacheItem(personName); cacheItem2 = new PersonCacheItem(personName); - await personCache.SetAsync(cache1Key, cacheItem1).ConfigureAwait(false); - await personCache.SetAsync(cache2Key, cacheItem2).ConfigureAwait(false); + await personCache.SetAsync(cache1Key, cacheItem1); + await personCache.SetAsync(cache2Key, cacheItem2); //Get (it should be available now - cacheItem1 = await personCache.GetAsync(cache1Key).ConfigureAwait(false); + cacheItem1 = await personCache.GetAsync(cache1Key); cacheItem1.ShouldNotBeNull(); cacheItem1.Name.ShouldBe(personName); - cacheItem2 = await personCache.GetAsync(cache2Key).ConfigureAwait(false); + cacheItem2 = await personCache.GetAsync(cache2Key); cacheItem2.ShouldNotBeNull(); cacheItem2.Name.ShouldBe(personName); //Remove - await personCache.RemoveAsync(cache1Key).ConfigureAwait(false); - await personCache.RemoveAsync(cache2Key).ConfigureAwait(false); + await personCache.RemoveAsync(cache1Key); + await personCache.RemoveAsync(cache2Key); //Get (not exists since removed) - cacheItem1 = await personCache.GetAsync(cache1Key).ConfigureAwait(false); + cacheItem1 = await personCache.GetAsync(cache1Key); cacheItem1.ShouldBeNull(); - cacheItem2 = await personCache.GetAsync(cache2Key).ConfigureAwait(false); + cacheItem2 = await personCache.GetAsync(cache2Key); cacheItem2.ShouldBeNull(); } diff --git a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj index 9911775a60..23564716da 100644 --- a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -13,4 +13,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj index 76de07406a..97aaa8a83f 100644 --- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj index 5a5d49e9e0..bd646adf95 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/AbpInterceptionTestBase.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/AbpInterceptionTestBase.cs index 781a128191..fd57da9a3d 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/AbpInterceptionTestBase.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/AbpInterceptionTestBase.cs @@ -39,11 +39,11 @@ namespace Volo.Abp.DynamicProxy { //Arrange - var target = ServiceProvider.GetService(); - - //Act - - await target.DoItAsync().ConfigureAwait(false); + var target = ServiceProvider.GetService(); + + //Act + + await target.DoItAsync(); //Assert @@ -66,7 +66,7 @@ namespace Volo.Abp.DynamicProxy //Act - var result = await target.GetValueAsync().ConfigureAwait(false); + var result = await target.GetValueAsync(); //Assert @@ -90,9 +90,9 @@ namespace Volo.Abp.DynamicProxy //Act & Assert - (await target.GetValueAsync(42).ConfigureAwait(false)).ShouldBe(42); //First run, not cached yet - (await target.GetValueAsync(43).ConfigureAwait(false)).ShouldBe(42); //First run, cached previous value - (await target.GetValueAsync(44).ConfigureAwait(false)).ShouldBe(42); //First run, cached previous value + (await target.GetValueAsync(42)).ShouldBe(42); //First run, not cached yet + (await target.GetValueAsync(43)).ShouldBe(42); //First run, cached previous value + (await target.GetValueAsync(44)).ShouldBe(42); //First run, cached previous value } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/CachedTestObject.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/CachedTestObject.cs index 8c7a797c7b..aec9d9d596 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/CachedTestObject.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/CachedTestObject.cs @@ -12,8 +12,8 @@ namespace Volo.Abp.DynamicProxy } public virtual async Task GetValueAsync(int v) - { - await Task.Delay(5).ConfigureAwait(false); + { + await Task.Delay(5); return v; } } diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleAsyncInterceptor.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleAsyncInterceptor.cs index 41438d1543..ac5f6beb16 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleAsyncInterceptor.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleAsyncInterceptor.cs @@ -6,12 +6,12 @@ namespace Volo.Abp.DynamicProxy public class SimpleAsyncInterceptor : AbpInterceptor { public override async Task InterceptAsync(IAbpMethodInvocation invocation) - { - await Task.Delay(5).ConfigureAwait(false); + { + await Task.Delay(5); (invocation.TargetObject as ICanLogOnObject)?.Logs?.Add($"{GetType().Name}_InterceptAsync_BeforeInvocation"); - await invocation.ProceedAsync().ConfigureAwait(false); + await invocation.ProceedAsync(); (invocation.TargetObject as ICanLogOnObject)?.Logs?.Add($"{GetType().Name}_InterceptAsync_AfterInvocation"); - await Task.Delay(5).ConfigureAwait(false); + await Task.Delay(5); } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleInterceptionTargetClass.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleInterceptionTargetClass.cs index e683e074d8..d1f23ea34c 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleInterceptionTargetClass.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleInterceptionTargetClass.cs @@ -22,9 +22,9 @@ namespace Volo.Abp.DynamicProxy public virtual async Task GetValueAsync() { Logs.Add("EnterGetValueAsync"); - await Task.Delay(5).ConfigureAwait(false); + await Task.Delay(5); Logs.Add("MiddleGetValueAsync"); - await Task.Delay(5).ConfigureAwait(false); + await Task.Delay(5); Logs.Add("ExitGetValueAsync"); return 42; } @@ -32,9 +32,9 @@ namespace Volo.Abp.DynamicProxy public virtual async Task DoItAsync() { Logs.Add("EnterDoItAsync"); - await Task.Delay(5).ConfigureAwait(false); + await Task.Delay(5); Logs.Add("MiddleDoItAsync"); - await Task.Delay(5).ConfigureAwait(false); + await Task.Delay(5); Logs.Add("ExitDoItAsync"); } } diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleResultCacheTestInterceptor.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleResultCacheTestInterceptor.cs index 06c3d096fe..15bcf4631b 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleResultCacheTestInterceptor.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DynamicProxy/SimpleResultCacheTestInterceptor.cs @@ -19,9 +19,9 @@ namespace Volo.Abp.DynamicProxy { invocation.ReturnValue = _cache[invocation.Method]; return; - } - - await invocation.ProceedAsync().ConfigureAwait(false); + } + + await invocation.ProceedAsync(); _cache[invocation.Method] = invocation.ReturnValue; } } diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Threading/AsyncHelper_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Threading/AsyncHelper_Tests.cs index 53a4516560..1b7b7eacd2 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Threading/AsyncHelper_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Threading/AsyncHelper_Tests.cs @@ -41,12 +41,12 @@ namespace Volo.Abp.Threading private static async Task MyTaskWithoutReturnValueAsync() { - await Task.Delay(1).ConfigureAwait(false); + await Task.Delay(1); } private static async Task MyTaskWithReturnValueAsync(int aNumber) { - await Task.Delay(1).ConfigureAwait(false); + await Task.Delay(1); return aNumber; } diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj index 33bdd870e2..a845149b32 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -17,4 +17,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs index f7a01649de..b5127e3d7e 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs @@ -17,14 +17,14 @@ namespace Volo.Abp.Dapper.Repositories public virtual async Task> GetAllPersonNames() { - return (await DbConnection.QueryAsync("select Name from People", transaction: DbTransaction).ConfigureAwait(false)) + return (await DbConnection.QueryAsync("select Name from People", transaction: DbTransaction)) .ToList(); } public virtual async Task UpdatePersonNames(string name) { return await DbConnection.ExecuteAsync("update People set Name = @NewName", new { NewName = name }, - DbTransaction).ConfigureAwait(false); + DbTransaction); } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs index cf085b2298..28734c1fd0 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.Dapper.Repositories [Fact] public async Task GetAllPersonNames_Test() { - var allNames = await GetRequiredService().GetAllPersonNames().ConfigureAwait(false); + var allNames = await GetRequiredService().GetAllPersonNames(); allNames.ShouldNotBeEmpty(); allNames.ShouldContain(x => x == "Douglas"); allNames.ShouldContain(x => x == "John-Deleted"); @@ -23,9 +23,9 @@ namespace Volo.Abp.Dapper.Repositories public async Task UpdatePersonNames_Test() { var personDapperRepository = GetRequiredService(); - await personDapperRepository.UpdatePersonNames("test").ConfigureAwait(false); + await personDapperRepository.UpdatePersonNames("test"); - var allNames = await personDapperRepository.GetAllPersonNames().ConfigureAwait(false); + var allNames = await personDapperRepository.GetAllPersonNames(); allNames.ShouldNotBeEmpty(); allNames.ShouldAllBe(x => x == "test"); } @@ -41,11 +41,11 @@ namespace Volo.Abp.Dapper.Repositories IsTransactional = true })) { - await personDapperRepository.UpdatePersonNames("test").ConfigureAwait(false); - await uow.RollbackAsync().ConfigureAwait(false); + await personDapperRepository.UpdatePersonNames("test"); + await uow.RollbackAsync(); } - var allNames = await personDapperRepository.GetAllPersonNames().ConfigureAwait(false); + var allNames = await personDapperRepository.GetAllPersonNames(); allNames.ShouldAllBe(x => x != "test"); } } diff --git a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj index 9e7cb21644..35d7ad3950 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj +++ b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj index 6c7bcc9ca5..cb917cea72 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj index 3a1b803370..a86ea9f051 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateRender_Tests.cs b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateRender_Tests.cs index 8c02b765e0..24d7298f6c 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateRender_Tests.cs +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateRender_Tests.cs @@ -44,7 +44,7 @@ namespace Volo.Abp.Emailing } }; - var result = await _templateRender.RenderAsync(template, model).ConfigureAwait(false); + var result = await _templateRender.RenderAsync(template, model); result.ShouldBe("Hello john@abp.io 1:iphone,2:ipad,"); } diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateStore_Tests.cs b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateStore_Tests.cs index 90aa9563ea..1e4ea8c090 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateStore_Tests.cs +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/EmailTemplateStore_Tests.cs @@ -24,21 +24,21 @@ namespace Volo.Abp.Emailing [Fact] public async Task Should_Get_Registered_Template() { - var template = await _emailTemplateProvider.GetAsync("template1", "tr").ConfigureAwait(false); + var template = await _emailTemplateProvider.GetAsync("template1", "tr"); template.Content.ShouldContain("Lütfen aşağıdaki bağlantıya tıklayarak e-posta adresinizi onaylayın."); } [Fact] public async Task Should_Get_Default_Culture_Template() { - var template = await _emailTemplateProvider.GetAsync("template1", "zh-Hans").ConfigureAwait(false); + var template = await _emailTemplateProvider.GetAsync("template1", "zh-Hans"); template.Content.ShouldContain("Please confirm your email address by clicking the link below."); } [Fact] public async Task Should_Get_Registered_Template_With_Layout() { - var template = await _emailTemplateProvider.GetAsync("template2", "en").ConfigureAwait(false); + var template = await _emailTemplateProvider.GetAsync("template2", "en"); template.Content.ShouldContain($"{Environment.NewLine} " + "Please confirm your email address by clicking the link below."); } @@ -47,7 +47,7 @@ namespace Volo.Abp.Emailing [Fact] public async Task Should_Get_Registered_Template_With_Localize() { - var template = await _emailTemplateProvider.GetAsync("template3", "tr").ConfigureAwait(false); + var template = await _emailTemplateProvider.GetAsync("template3", "tr"); template.Content.ShouldContain("Merhaba Abp"); } } diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hant.json b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hant.json new file mode 100644 index 0000000000..dd12964f70 --- /dev/null +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "hello": "哈囉" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj index 14d04a597a..e60435ce25 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj @@ -1,4 +1,4 @@ - + @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs index 1f69263f5c..3bdd15b5ae 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs @@ -19,12 +19,12 @@ namespace Volo.Abp.EntityFrameworkCore.TestApp.SecondContext public async Task BuildAsync() { - await _bookRepository.InsertAsync( + await _bookRepository.InsertAsync( new BookInSecondDbContext( _guidGenerator.Create(), "TestBook1" ) - ).ConfigureAwait(false); + ); } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj index a01e3d111a..f2d2ca162c 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs index 5ee320742c..7bc4af2e31 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.EntityFrameworkCore (_dummyRepository.GetDbContext() is IThirdDbContext).ShouldBeTrue(); (_dummyRepository.GetDbContext() is TestAppDbContext).ShouldBeTrue(); - await _unitOfWorkManager.Current.CompleteAsync().ConfigureAwait(false); + await _unitOfWorkManager.Current.CompleteAsync(); } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Queryable_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Queryable_Tests.cs index d178ff7965..a5b8aa0577 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Queryable_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Queryable_Tests.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.EntityFrameworkCore.Repositories { _bookRepository.Any().ShouldBeTrue(); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -40,7 +40,7 @@ namespace Volo.Abp.EntityFrameworkCore.Repositories { _phoneInSecondDbContextRepository.Any().ShouldBeTrue(); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -52,7 +52,7 @@ namespace Volo.Abp.EntityFrameworkCore.Repositories person.Name.ShouldBe("Douglas"); person.Phones.Count.ShouldBe(2); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs index db4a376ae4..7d89da1a08 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs @@ -34,16 +34,16 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions { await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () => { - await _personRepository.InsertAsync(new Person(personId, "Adam", 42)).ConfigureAwait(false); + await _personRepository.InsertAsync(new Person(personId, "Adam", 42)); throw new Exception(exceptionMessage); - }).ConfigureAwait(false); + }); } catch (Exception e) when (e.Message == exceptionMessage) { } - var person = await _personRepository.FindAsync(personId).ConfigureAwait(false); + var person = await _personRepository.FindAsync(personId); person.ShouldBeNull(); } @@ -56,12 +56,12 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions { _unitOfWorkManager.Current.ShouldNotBeNull(); - await _personRepository.InsertAsync(new Person(personId, "Adam", 42)).ConfigureAwait(false); + await _personRepository.InsertAsync(new Person(personId, "Adam", 42)); - await _unitOfWorkManager.Current.RollbackAsync().ConfigureAwait(false); - }).ConfigureAwait(false); + await _unitOfWorkManager.Current.RollbackAsync(); + }); - var person = await _personRepository.FindAsync(personId).ConfigureAwait(false); + var person = await _personRepository.FindAsync(personId); person.ShouldBeNull(); } @@ -79,17 +79,17 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions { _unitOfWorkManager.Current.ShouldNotBeNull(); - await _personRepository.InsertAsync(new Person(personId, "Adam", 42)).ConfigureAwait(false); - await _bookRepository.InsertAsync(new BookInSecondDbContext(bookId, bookId.ToString())).ConfigureAwait(false); + await _personRepository.InsertAsync(new Person(personId, "Adam", 42)); + await _bookRepository.InsertAsync(new BookInSecondDbContext(bookId, bookId.ToString())); - await _unitOfWorkManager.Current.SaveChangesAsync().ConfigureAwait(false); + await _unitOfWorkManager.Current.SaveChangesAsync(); //Will automatically rollback since not called the Complete! } } - (await _personRepository.FindAsync(personId).ConfigureAwait(false)).ShouldBeNull(); - (await _bookRepository.FindAsync(bookId).ConfigureAwait(false)).ShouldBeNull(); + (await _personRepository.FindAsync(personId)).ShouldBeNull(); + (await _bookRepository.FindAsync(bookId)).ShouldBeNull(); } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs index 05becda1d3..027f54a03a 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs @@ -18,13 +18,13 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore public async Task FindByNameAsync(string name) { - return await this.FirstOrDefaultAsync(c => c.Name == name).ConfigureAwait(false); + return await this.FirstOrDefaultAsync(c => c.Name == name); } public async Task> GetPeopleInTheCityAsync(string cityName) { - var city = await FindByNameAsync(cityName).ConfigureAwait(false); - return await DbContext.People.Where(p => p.CityId == city.Id).ToListAsync().ConfigureAwait(false); + var city = await FindByNameAsync(cityName); + return await DbContext.People.Where(p => p.CityId == city.Id).ToListAsync(); } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs index 01b949015a..ab8c1920a7 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore public async Task GetViewAsync(string name) { - return await DbContext.PersonView.Where(x => x.Name == name).FirstOrDefaultAsync().ConfigureAwait(false); + return await DbContext.PersonView.Where(x => x.Name == name).FirstOrDefaultAsync(); } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj index 6a7a017f4e..adeefbd45b 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus_Test.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus_Test.cs index 19e61e5afb..47649ad3c3 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus_Test.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus_Test.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.EventBus.Distributed { DistributedEventBus.Subscribe(); - await DistributedEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await DistributedEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await DistributedEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); + await DistributedEventBus.PublishAsync(new MySimpleEventData(1)); + await DistributedEventBus.PublishAsync(new MySimpleEventData(2)); + await DistributedEventBus.PublishAsync(new MySimpleEventData(3)); Assert.Equal(3, MySimpleDistributedTransientEventHandler.HandleCount); Assert.Equal(3, MySimpleDistributedTransientEventHandler.DisposeCount); diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/ActionBasedEventHandlerTest.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/ActionBasedEventHandlerTest.cs index 8e41a26eae..6e6bae2fae 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/ActionBasedEventHandlerTest.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/ActionBasedEventHandlerTest.cs @@ -19,10 +19,10 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(4)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(new MySimpleEventData(3)); + await LocalEventBus.PublishAsync(new MySimpleEventData(4)); Assert.Equal(10, totalData); } @@ -39,10 +39,10 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(3)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(4)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(3)); + await LocalEventBus.PublishAsync(typeof(MySimpleEventData), new MySimpleEventData(4)); Assert.Equal(10, totalData); } @@ -59,13 +59,13 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(new MySimpleEventData(3)); registerDisposer.Dispose(); - await LocalEventBus.PublishAsync(new MySimpleEventData(4)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(4)); Assert.Equal(6, totalData); } @@ -84,13 +84,13 @@ namespace Volo.Abp.EventBus.Local LocalEventBus.Subscribe(action); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(new MySimpleEventData(3)); LocalEventBus.Unsubscribe(action); - await LocalEventBus.PublishAsync(new MySimpleEventData(4)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(4)); Assert.Equal(6, totalData); } @@ -103,15 +103,15 @@ namespace Volo.Abp.EventBus.Local LocalEventBus.Subscribe( async eventData => { - await Task.Delay(20).ConfigureAwait(false); + await Task.Delay(20); Interlocked.Add(ref totalData, eventData.Value); - await Task.Delay(20).ConfigureAwait(false); + await Task.Delay(20); }); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(4)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(new MySimpleEventData(3)); + await LocalEventBus.PublishAsync(new MySimpleEventData(4)); Assert.Equal(10, totalData); } diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_DI_Services_Test.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_DI_Services_Test.cs index 4ae07d8dc6..e66deb0e1c 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_DI_Services_Test.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_DI_Services_Test.cs @@ -9,10 +9,10 @@ namespace Volo.Abp.EventBus.Local [Fact] public async Task Should_Automatically_Register_EventHandlers_From_Services() { - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(4)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(new MySimpleEventData(3)); + await LocalEventBus.PublishAsync(new MySimpleEventData(4)); GetRequiredService().TotalData.ShouldBe(10); } diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Exception_Test.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Exception_Test.cs index 951a9f841d..446825c697 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Exception_Test.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Exception_Test.cs @@ -14,8 +14,8 @@ namespace Volo.Abp.EventBus.Local var appException = await Assert.ThrowsAsync(async () => { - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - }).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + }); appException.Message.ShouldBe("This exception is intentionally thrown!"); } @@ -31,8 +31,8 @@ namespace Volo.Abp.EventBus.Local var aggrException = await Assert.ThrowsAsync(async () => { - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - }).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + }); aggrException.InnerExceptions.Count.ShouldBe(2); aggrException.InnerExceptions[0].Message.ShouldBe("This exception is intentionally thrown #1!"); diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_MultipleHandle_Test.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_MultipleHandle_Test.cs index 5880dd3662..d20692fa01 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_MultipleHandle_Test.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_MultipleHandle_Test.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.EventBus.Local LocalEventBus.Subscribe>(handler); LocalEventBus.Subscribe>(handler); - await LocalEventBus.PublishAsync(new EntityCreatedEventData(new MyEntity())).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new EntityCreatedEventData(new MyEntity())); handler.EntityCreatedEventCount.ShouldBe(1); handler.EntityChangedEventCount.ShouldBe(1); diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs index 316de4a396..eeec26b166 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(new EntityUpdatedEventData(new Person(42))).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new EntityUpdatedEventData(new Person(42))); triggeredEvent.ShouldBe(true); } @@ -39,7 +39,7 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(new EntityChangedEventData(new Student(42))).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new EntityChangedEventData(new Student(42))); triggeredEvent.ShouldBe(true); } diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/InheritanceTest.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/InheritanceTest.cs index 17474be1d9..c3b1dd4283 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/InheritanceTest.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/InheritanceTest.cs @@ -17,10 +17,10 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); //Should handle directly registered class - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); //Should handle directly registered class - await LocalEventBus.PublishAsync(new MyDerivedEventData(3)).ConfigureAwait(false); //Should handle derived class too - await LocalEventBus.PublishAsync(new MyDerivedEventData(4)).ConfigureAwait(false); //Should handle derived class too + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); //Should handle directly registered class + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); //Should handle directly registered class + await LocalEventBus.PublishAsync(new MyDerivedEventData(3)); //Should handle derived class too + await LocalEventBus.PublishAsync(new MyDerivedEventData(4)); //Should handle derived class too Assert.Equal(10, totalData); } @@ -37,10 +37,10 @@ namespace Volo.Abp.EventBus.Local return Task.CompletedTask; }); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); //Should not handle - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); //Should not handle - await LocalEventBus.PublishAsync(new MyDerivedEventData(3)).ConfigureAwait(false); //Should handle - await LocalEventBus.PublishAsync(new MyDerivedEventData(4)).ConfigureAwait(false); //Should handle + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); //Should not handle + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); //Should not handle + await LocalEventBus.PublishAsync(new MyDerivedEventData(3)); //Should handle + await LocalEventBus.PublishAsync(new MyDerivedEventData(4)); //Should handle Assert.Equal(7, totalData); } diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/TransientDisposableEventHandlerTest.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/TransientDisposableEventHandlerTest.cs index bfc731f5bf..5ab7ed51af 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/TransientDisposableEventHandlerTest.cs +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/TransientDisposableEventHandlerTest.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.EventBus.Local { LocalEventBus.Subscribe(); - await LocalEventBus.PublishAsync(new MySimpleEventData(1)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(2)).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new MySimpleEventData(3)).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new MySimpleEventData(1)); + await LocalEventBus.PublishAsync(new MySimpleEventData(2)); + await LocalEventBus.PublishAsync(new MySimpleEventData(3)); Assert.Equal(3, MySimpleTransientEventHandler.HandleCount); Assert.Equal(3, MySimpleTransientEventHandler.DisposeCount); diff --git a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj index 7cf1656de6..bc375d9406 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj +++ b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureChecker_Tests.cs b/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureChecker_Tests.cs index dc849d9b50..7ea01268a0 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureChecker_Tests.cs +++ b/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureChecker_Tests.cs @@ -20,16 +20,16 @@ namespace Volo.Abp.Features public async Task IsEnabledAsync() { //Tenant is unknown - (await _featureChecker.IsEnabledAsync("BooleanTestFeature1").ConfigureAwait(false)).ShouldBeFalse(); + (await _featureChecker.IsEnabledAsync("BooleanTestFeature1")).ShouldBeFalse(); using (_currentTenant.Change(TestFeatureStore.Tenant1Id)) { - (await _featureChecker.IsEnabledAsync("BooleanTestFeature1").ConfigureAwait(false)).ShouldBeTrue(); + (await _featureChecker.IsEnabledAsync("BooleanTestFeature1")).ShouldBeTrue(); } using (_currentTenant.Change(TestFeatureStore.Tenant2Id)) { - (await _featureChecker.IsEnabledAsync("BooleanTestFeature1").ConfigureAwait(false)).ShouldBeFalse(); + (await _featureChecker.IsEnabledAsync("BooleanTestFeature1")).ShouldBeFalse(); } } @@ -37,16 +37,16 @@ namespace Volo.Abp.Features public async Task GetOrNullAsync() { //Tenant is unknown - (await _featureChecker.GetOrNullAsync("IntegerTestFeature1").ConfigureAwait(false)).ShouldBe("1"); + (await _featureChecker.GetOrNullAsync("IntegerTestFeature1")).ShouldBe("1"); using (_currentTenant.Change(TestFeatureStore.Tenant1Id)) { - (await _featureChecker.GetOrNullAsync("IntegerTestFeature1").ConfigureAwait(false)).ShouldBe("1"); + (await _featureChecker.GetOrNullAsync("IntegerTestFeature1")).ShouldBe("1"); } using (_currentTenant.Change(TestFeatureStore.Tenant2Id)) { - (await _featureChecker.GetOrNullAsync("IntegerTestFeature1").ConfigureAwait(false)).ShouldBe("34"); + (await _featureChecker.GetOrNullAsync("IntegerTestFeature1")).ShouldBe("34"); } } } diff --git a/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureInterceptor_Tests.cs b/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureInterceptor_Tests.cs index eb10664239..bdc17a1d5f 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureInterceptor_Tests.cs +++ b/framework/test/Volo.Abp.Features.Tests/Volo/Abp/Features/FeatureInterceptor_Tests.cs @@ -29,18 +29,18 @@ namespace Volo.Abp.Features { await Assert.ThrowsAsync(async () => { - await _classFeatureTestService.NoAdditionalFeatureAsync().ConfigureAwait(false); - }).ConfigureAwait(false); + await _classFeatureTestService.NoAdditionalFeatureAsync(); + }); await Assert.ThrowsAsync(async () => { - await _classFeatureTestService.Feature2Async().ConfigureAwait(false); - }).ConfigureAwait(false); + await _classFeatureTestService.Feature2Async(); + }); await Assert.ThrowsAsync(async () => { - await _methodFeatureTestService.Feature1Async().ConfigureAwait(false); - }).ConfigureAwait(false); + await _methodFeatureTestService.Feature1Async(); + }); } } @@ -50,9 +50,9 @@ namespace Volo.Abp.Features //Features were enabled for Tenant 1 using (_currentTenant.Change(TestFeatureStore.Tenant1Id)) { - await _classFeatureTestService.NoAdditionalFeatureAsync().ConfigureAwait(false); - (await _classFeatureTestService.Feature2Async().ConfigureAwait(false)).ShouldBe(42); - (await _methodFeatureTestService.Feature1Async().ConfigureAwait(false)).ShouldBe(42); + await _classFeatureTestService.NoAdditionalFeatureAsync(); + (await _classFeatureTestService.Feature2Async()).ShouldBe(42); + (await _methodFeatureTestService.Feature1Async()).ShouldBe(42); } } @@ -64,7 +64,7 @@ namespace Volo.Abp.Features { using (_currentTenant.Change(ParseNullableGuid(tenantIdValue))) { - await _methodFeatureTestService.NonFeatureAsync().ConfigureAwait(false); + await _methodFeatureTestService.NonFeatureAsync(); } } diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj index 7f62578e7d..3c91d940e5 100644 --- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj +++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo/Abp/FluentValidation/ApplicationService_FluentValidation_Tests.cs b/framework/test/Volo.Abp.FluentValidation.Tests/Volo/Abp/FluentValidation/ApplicationService_FluentValidation_Tests.cs index ba7a424ee7..5bf11b6d5e 100644 --- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo/Abp/FluentValidation/ApplicationService_FluentValidation_Tests.cs +++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo/Abp/FluentValidation/ApplicationService_FluentValidation_Tests.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.FluentValidation { MyStringValue3 = "ccc" } - }).ConfigureAwait(false); + }); asyncOutput.ShouldBe("aaabbbccc"); } @@ -65,7 +65,7 @@ namespace Volo.Abp.FluentValidation } } ) -.ConfigureAwait(false)).ConfigureAwait(false); + ); exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyStringValue")); exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyMethodInput2.MyStringValue2")); @@ -83,7 +83,7 @@ namespace Volo.Abp.FluentValidation { MyStringValue3 = "c" } - }).ConfigureAwait(false)).ConfigureAwait(false); + })); exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyStringValue")); exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyMethodInput2.MyStringValue2")); exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyMethodInput3.MyStringValue3")); @@ -95,7 +95,7 @@ namespace Volo.Abp.FluentValidation var output = await _myAppService.NotValidateMyMethod(new MyMethodInput4 { MyStringValue4 = "444" - }).ConfigureAwait(false); + }); output.ShouldBe("444"); } diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj index db0f9d45bf..193df5db4f 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs index 4dddcd6ce8..5fa3d4ab66 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.Http.DynamicProxying { var firstPerson = (await _personRepository.GetListAsync()).First(); - var person = await _peopleAppService.GetAsync(firstPerson.Id).ConfigureAwait(false); + var person = await _peopleAppService.GetAsync(firstPerson.Id); person.ShouldNotBeNull(); person.Id.ShouldBe(firstPerson.Id); person.Name.ShouldBe(firstPerson.Name); @@ -41,7 +41,7 @@ namespace Volo.Abp.Http.DynamicProxying public async Task GetList() { var people = await _peopleAppService.GetListAsync(new PagedAndSortedResultRequestDto()) - .ConfigureAwait(false); + ; people.TotalCount.ShouldBeGreaterThan(0); people.Items.Count.ShouldBe((int) people.TotalCount); } @@ -51,7 +51,7 @@ namespace Volo.Abp.Http.DynamicProxying { var firstPerson = (await _personRepository.GetListAsync()).First(); - await _peopleAppService.DeleteAsync(firstPerson.Id).ConfigureAwait(false); + await _peopleAppService.DeleteAsync(firstPerson.Id); firstPerson = (await _personRepository.GetListAsync()).FirstOrDefault(p => p.Id == firstPerson.Id); firstPerson.ShouldBeNull(); @@ -67,7 +67,7 @@ namespace Volo.Abp.Http.DynamicProxying Name = uniquePersonName, Age = 42 } - ).ConfigureAwait(false); + ); person.ShouldNotBeNull(); person.Id.ShouldNotBe(Guid.Empty); @@ -87,8 +87,8 @@ namespace Volo.Abp.Http.DynamicProxying { Age = 42 } - ).ConfigureAwait(false); - }).ConfigureAwait(false); + ); + }); } [Fact] @@ -105,7 +105,7 @@ namespace Volo.Abp.Http.DynamicProxying Name = uniquePersonName, Age = firstPerson.Age } - ).ConfigureAwait(false); + ); person.ShouldNotBeNull(); person.Id.ShouldBe(firstPerson.Id); @@ -124,8 +124,8 @@ namespace Volo.Abp.Http.DynamicProxying { await Assert.ThrowsAnyAsync(async () => { - await _peopleAppService.GetWithAuthorized().ConfigureAwait(false); - }).ConfigureAwait(false); + await _peopleAppService.GetWithAuthorized(); + }); } [Fact] @@ -144,7 +144,7 @@ namespace Volo.Abp.Http.DynamicProxying } } } - ).ConfigureAwait(false); + ); result.Value1.ShouldBe("value one"); result.Inner1.Value2.ShouldBe("value two"); diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs index fdf422d585..28a024f68e 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs @@ -20,41 +20,41 @@ namespace Volo.Abp.Http.DynamicProxying [Fact] public async Task IncrementValueAsync() { - (await _controller.IncrementValueAsync(42).ConfigureAwait(false)).ShouldBe(43); + (await _controller.IncrementValueAsync(42)).ShouldBe(43); } [Fact] public async Task GetException1Async() { - var exception = await Assert.ThrowsAsync(async () => await _controller.GetException1Async().ConfigureAwait(false)).ConfigureAwait(false); + var exception = await Assert.ThrowsAsync(async () => await _controller.GetException1Async()); exception.Error.Message.ShouldBe("This is an error message!"); } [Fact] public async Task PostValueWithHeaderAndQueryStringAsync() { - var result = await _controller.PostValueWithHeaderAndQueryStringAsync("myheader", "myqs").ConfigureAwait(false); + var result = await _controller.PostValueWithHeaderAndQueryStringAsync("myheader", "myqs"); result.ShouldBe("myheader#myqs"); } [Fact] public async Task PostValueWithBodyAsync() { - var result = await _controller.PostValueWithBodyAsync("mybody").ConfigureAwait(false); + var result = await _controller.PostValueWithBodyAsync("mybody"); result.ShouldBe("mybody"); } [Fact] public async Task PutValueWithBodyAsync() { - var result = await _controller.PutValueWithBodyAsync("mybody").ConfigureAwait(false); + var result = await _controller.PutValueWithBodyAsync("mybody"); result.ShouldBe("mybody"); } [Fact] public async Task PostObjectWithBodyAsync() { - var result = await _controller.PostObjectWithBodyAsync(new Car { Year = 1976, Model = "Ford" }).ConfigureAwait(false); + var result = await _controller.PostObjectWithBodyAsync(new Car { Year = 1976, Model = "Ford" }); result.Year.ShouldBe(1976); result.Model.ShouldBe("Ford"); } @@ -62,7 +62,7 @@ namespace Volo.Abp.Http.DynamicProxying [Fact] public async Task PostObjectWithQueryAsync() { - var result = await _controller.PostObjectWithQueryAsync(new Car { Year = 1976, Model = "Ford" }).ConfigureAwait(false); + var result = await _controller.PostObjectWithQueryAsync(new Car { Year = 1976, Model = "Ford" }); result.Year.ShouldBe(1976); result.Model.ShouldBe("Ford"); } @@ -70,7 +70,7 @@ namespace Volo.Abp.Http.DynamicProxying [Fact] public async Task GetObjectWithUrlAsync() { - var result = await _controller.GetObjectWithUrlAsync(new Car { Year = 1976, Model = "Ford" }).ConfigureAwait(false); + var result = await _controller.GetObjectWithUrlAsync(new Car { Year = 1976, Model = "Ford" }); result.Year.ShouldBe(1976); result.Model.ShouldBe("Ford"); } @@ -78,7 +78,7 @@ namespace Volo.Abp.Http.DynamicProxying [Fact] public async Task GetObjectandIdAsync() { - var result = await _controller.GetObjectandIdAsync(42, new Car { Year = 1976, Model = "Ford" }).ConfigureAwait(false); + var result = await _controller.GetObjectandIdAsync(42, new Car { Year = 1976, Model = "Ford" }); result.Year.ShouldBe(42); result.Model.ShouldBe("Ford"); } @@ -86,7 +86,7 @@ namespace Volo.Abp.Http.DynamicProxying [Fact] public async Task GetObjectAndIdWithQueryAsync() { - var result = await _controller.GetObjectAndIdWithQueryAsync(42, new Car { Year = 1976, Model = "Ford" }).ConfigureAwait(false); + var result = await _controller.GetObjectAndIdWithQueryAsync(42, new Car { Year = 1976, Model = "Ford" }); result.Year.ShouldBe(42); result.Model.ShouldBe("Ford"); } @@ -94,28 +94,28 @@ namespace Volo.Abp.Http.DynamicProxying [Fact] public async Task PatchValueWithBodyAsync() { - var result = await _controller.PatchValueWithBodyAsync("mybody").ConfigureAwait(false); + var result = await _controller.PatchValueWithBodyAsync("mybody"); result.ShouldBe("mybody"); } [Fact] public async Task PutValueWithHeaderAndQueryStringAsync() { - var result = await _controller.PutValueWithHeaderAndQueryStringAsync("myheader", "myqs").ConfigureAwait(false); + var result = await _controller.PutValueWithHeaderAndQueryStringAsync("myheader", "myqs"); result.ShouldBe("myheader#myqs"); } [Fact] public async Task PatchValueWithHeaderAndQueryStringAsync() { - var result = await _controller.PatchValueWithHeaderAndQueryStringAsync("myheader", "myqs").ConfigureAwait(false); + var result = await _controller.PatchValueWithHeaderAndQueryStringAsync("myheader", "myqs"); result.ShouldBe("myheader#myqs"); } [Fact] public async Task DeleteByIdAsync() { - (await _controller.DeleteByIdAsync(42).ConfigureAwait(false)).ShouldBe(43); + (await _controller.DeleteByIdAsync(42)).ShouldBe(43); } } diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj index 8f803774b2..c0854a7633 100644 --- a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj index b3afc78948..20c92c8cf8 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj +++ b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj @@ -1,5 +1,5 @@ - - + + diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/zh-Hant.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/zh-Hant.json new file mode 100644 index 0000000000..8ce2ad288a --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "USA": "美國", + "Brazil": "巴西" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/zh-Hant.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/zh-Hant.json new file mode 100644 index 0000000000..1c0f506d34 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "ThisFieldIsRequired": "此欄位為必填欄位", + "MaxLenghtErrorMessage": "此欄位最多可包含'{0}'個字元" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/zh-Hant.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/zh-Hant.json new file mode 100644 index 0000000000..1aeb9cdf6f --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/zh-Hant.json @@ -0,0 +1,11 @@ +{ + "culture": "zh-Hant", + "texts": { + "Hello {0}.": "您好 {0}.", + "Car": "汽車", + "CarPlural": "汽車", + "MaxLenghtErrorMessage": "此欄位的長度最多'{0}'個字元", + "Universe": "宇宙", + "FortyTwo": "四十二" + } +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hant.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hant.json new file mode 100644 index 0000000000..c779d77a25 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "SeeYou": "再會" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj index b8f417d384..bc5d991884 100644 --- a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj +++ b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.MailKit.Tests/Volo/Abp/MailKit/MailKitSmtpEmailSender_Tests.cs b/framework/test/Volo.Abp.MailKit.Tests/Volo/Abp/MailKit/MailKitSmtpEmailSender_Tests.cs index e323b1150e..39fd4ea78f 100644 --- a/framework/test/Volo.Abp.MailKit.Tests/Volo/Abp/MailKit/MailKitSmtpEmailSender_Tests.cs +++ b/framework/test/Volo.Abp.MailKit.Tests/Volo/Abp/MailKit/MailKitSmtpEmailSender_Tests.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.MailKit var mailMessage = new MailMessage("from_mail_address@asd.com", "to_mail_address@asd.com", "subject", "body") { IsBodyHtml = true }; - await mailSender.SendAsync(mailMessage).ConfigureAwait(false); + await mailSender.SendAsync(mailMessage); } //[Fact] @@ -30,7 +30,7 @@ namespace Volo.Abp.MailKit IsBodyHtml = true }; - await mailSender.SendAsync(mailMessage).ConfigureAwait(false); + await mailSender.SendAsync(mailMessage); } private static MailKitSmtpEmailSender CreateMailKitEmailSender() diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj index ad478b062a..9b6adc9442 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs index c83a28871f..b6d43dc875 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.TestApp.MemoryDb public async Task> GetPeopleInTheCityAsync(string cityName) { - var city = await FindByNameAsync(cityName).ConfigureAwait(false); + var city = await FindByNameAsync(cityName); return Database.Collection().Where(p => p.CityId == city.Id).ToList(); } diff --git a/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj b/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj index 5d07377aa1..69b159dd0f 100644 --- a/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj +++ b/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -13,4 +13,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj index cc1cb52a96..dc35828937 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests.cs index 7458f85417..efa64b3617 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests.cs +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests.cs @@ -19,20 +19,20 @@ namespace Volo.Abp.MongoDB.Repositories PersonRepository.FirstOrDefault(p => p.Name == "Douglas").ShouldNotBeNull(); PersonRepository.Count().ShouldBeGreaterThan(0); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] public async Task UpdateAsync() { - var person = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + var person = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId); person.ChangeName("Douglas-Updated"); person.Phones.Add(new Phone(person.Id, "6667778899", PhoneType.Office)); - await PersonRepository.UpdateAsync(person).ConfigureAwait(false); + await PersonRepository.UpdateAsync(person); - person = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + person = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); person.ShouldNotBeNull(); person.Name.ShouldBe("Douglas-Updated"); person.Phones.Count.ShouldBe(3); @@ -45,9 +45,9 @@ namespace Volo.Abp.MongoDB.Repositories var person = new Person(Guid.NewGuid(), "New Person", 35); person.Phones.Add(new Phone(person.Id, "1234567890")); - await PersonRepository.InsertAsync(person).ConfigureAwait(false); + await PersonRepository.InsertAsync(person); - person = await PersonRepository.FindAsync(person.Id).ConfigureAwait(false); + person = await PersonRepository.FindAsync(person.Id); person.ShouldNotBeNull(); person.Name.ShouldBe("New Person"); person.Phones.Count.ShouldBe(1); diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs index 27381a14da..bb31883010 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs @@ -19,13 +19,13 @@ namespace Volo.Abp.TestApp.MongoDB public async Task FindByNameAsync(string name) { - return await (await Collection.FindAsync(c => c.Name == name).ConfigureAwait(false)).FirstOrDefaultAsync().ConfigureAwait(false); + return await (await Collection.FindAsync(c => c.Name == name)).FirstOrDefaultAsync(); } public async Task> GetPeopleInTheCityAsync(string cityName) { - var city = await FindByNameAsync(cityName).ConfigureAwait(false); - return await DbContext.People.AsQueryable().Where(p => p.CityId == city.Id).ToListAsync().ConfigureAwait(false); + var city = await FindByNameAsync(cityName); + return await DbContext.People.AsQueryable().Where(p => p.CityId == city.Id).ToListAsync(); } } } diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj index 808b58409e..1c9ab1ab4b 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj index a77a4e3301..c4b54f9efd 100644 --- a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj +++ b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj index 7688e0c040..6e99e2d1e8 100644 --- a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj +++ b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj index c973b4fcd1..36df9d0a60 100644 --- a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj +++ b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj index 183b0b6c81..70d52138a3 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj +++ b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/SettingProvider_Tests.cs b/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/SettingProvider_Tests.cs index 47df3f6db1..8508daec12 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/SettingProvider_Tests.cs +++ b/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/SettingProvider_Tests.cs @@ -22,14 +22,14 @@ namespace Volo.Abp.Settings [Fact] public async Task Should_Get_Null_If_No_Value_Provided_And_No_Default_Value() { - (await _settingProvider.GetOrNullAsync(TestSettingNames.TestSettingWithoutDefaultValue).ConfigureAwait(false)) + (await _settingProvider.GetOrNullAsync(TestSettingNames.TestSettingWithoutDefaultValue)) .ShouldBeNull(); } [Fact] public async Task Should_Get_Default_Value_If_No_Value_Provided_And_There_Is_A_Default_Value() { - (await _settingProvider.GetOrNullAsync(TestSettingNames.TestSettingWithDefaultValue).ConfigureAwait(false)) + (await _settingProvider.GetOrNullAsync(TestSettingNames.TestSettingWithDefaultValue)) .ShouldBe("default-value"); } } diff --git a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj index 6b836d2efe..0ddc58ea96 100644 --- a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj +++ b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -13,4 +13,4 @@ - \ No newline at end of file + diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj index 1d54a745ab..b733889bf0 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs b/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs index 47fa69d64f..8d205df899 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.TestApp.Application public async Task GetList() { var people = await _peopleAppService.GetListAsync(new PagedAndSortedResultRequestDto()) - .ConfigureAwait(false); + ; people.Items.Count.ShouldBeGreaterThan(0); } @@ -40,11 +40,10 @@ namespace Volo.Abp.TestApp.Application public async Task Create() { var uniquePersonName = Guid.NewGuid().ToString(); - var personDto = await _peopleAppService.CreateAsync(new PersonDto {Name = uniquePersonName}) - .ConfigureAwait(false); + var personDto = await _peopleAppService.CreateAsync(new PersonDto {Name = uniquePersonName}); var repository = ServiceProvider.GetService>(); - var person = await repository.FindAsync(personDto.Id).ConfigureAwait(false); + var person = await repository.FindAsync(personDto.Id); person.ShouldNotBeNull(); person.TenantId.ShouldBeNull(); @@ -56,11 +55,10 @@ namespace Volo.Abp.TestApp.Application _fakeCurrentTenant.Id.Returns(TestDataBuilder.TenantId1); var uniquePersonName = Guid.NewGuid().ToString(); - var personDto = await _peopleAppService.CreateAsync(new PersonDto {Name = uniquePersonName}) - .ConfigureAwait(false); + var personDto = await _peopleAppService.CreateAsync(new PersonDto {Name = uniquePersonName}); var repository = ServiceProvider.GetService>(); - var person = await repository.FindAsync(personDto.Id).ConfigureAwait(false); + var person = await repository.FindAsync(personDto.Id); person.ShouldNotBeNull(); person.TenantId.ShouldNotBeNull(); diff --git a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj index 522d166014..c2d9ab2007 100644 --- a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj +++ b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs index 6d5c2136f3..522f8d9794 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.TestApp.Application public async Task> GetPhones(Guid id, GetPersonPhonesFilter filter) { - var phones = (await GetEntityByIdAsync(id).ConfigureAwait(false)).Phones + var phones = (await GetEntityByIdAsync(id)).Phones .WhereIf(filter.Type.HasValue, p => p.Type == filter.Type) .ToList(); @@ -32,19 +32,19 @@ namespace Volo.Abp.TestApp.Application public async Task AddPhone(Guid id, PhoneDto phoneDto) { - var person = await GetEntityByIdAsync(id).ConfigureAwait(false); + var person = await GetEntityByIdAsync(id); var phone = new Phone(person.Id, phoneDto.Number, phoneDto.Type); person.Phones.Add(phone); - await Repository.UpdateAsync(person).ConfigureAwait(false); + await Repository.UpdateAsync(person); return ObjectMapper.Map(phone); } public async Task RemovePhone(Guid id, string number) { - var person = await GetEntityByIdAsync(id).ConfigureAwait(false); + var person = await GetEntityByIdAsync(id); person.Phones.RemoveAll(p => p.Number == number); - await Repository.UpdateAsync(person).ConfigureAwait(false); + await Repository.UpdateAsync(person); } [Authorize] diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs index 7e2be35de0..6d1be41f31 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs @@ -32,29 +32,29 @@ namespace Volo.Abp.TestApp public async Task BuildAsync() { - await AddCities().ConfigureAwait(false); - await AddPeople().ConfigureAwait(false); - await AddEntitiesWithPks().ConfigureAwait(false); + await AddCities(); + await AddPeople(); + await AddEntitiesWithPks(); } private async Task AddCities() { var istanbul = new City(IstanbulCityId, "Istanbul"); istanbul.Districts.Add(new District(istanbul.Id, "Bakirkoy", 1283999)); - istanbul.Districts.Add(new District(istanbul.Id, "Mecidiyeky", 2222321)); + istanbul.Districts.Add(new District(istanbul.Id, "Mecidiyek�y", 2222321)); istanbul.Districts.Add(new District(istanbul.Id, "Uskudar", 726172)); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Tokyo")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Madrid")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(LondonCityId, "London") { ExtraProperties = { { "Population", 10_470_000 } } }).ConfigureAwait(false); - await _cityRepository.InsertAsync(istanbul).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Paris")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Washington")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Sao Paulo")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Berlin")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Amsterdam")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Beijing")).ConfigureAwait(false); - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Rome")).ConfigureAwait(false); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Tokyo")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Madrid")); + await _cityRepository.InsertAsync(new City(LondonCityId, "London") { ExtraProperties = { { "Population", 10_470_000 } } }); + await _cityRepository.InsertAsync(istanbul); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Paris")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Washington")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Sao Paulo")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Berlin")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Amsterdam")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Beijing")); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), "Rome")); } private async Task AddPeople() @@ -63,20 +63,20 @@ namespace Volo.Abp.TestApp douglas.Phones.Add(new Phone(douglas.Id, "123456789")); douglas.Phones.Add(new Phone(douglas.Id, "123456780", PhoneType.Home)); - await _personRepository.InsertAsync(douglas).ConfigureAwait(false); + await _personRepository.InsertAsync(douglas); - await _personRepository.InsertAsync(new Person(UserJohnDeletedId, "John-Deleted", 33) { IsDeleted = true }).ConfigureAwait(false); + await _personRepository.InsertAsync(new Person(UserJohnDeletedId, "John-Deleted", 33) { IsDeleted = true }); var tenant1Person1 = new Person(Guid.NewGuid(), TenantId1 + "-Person1", 42, TenantId1); var tenant1Person2 = new Person(Guid.NewGuid(), TenantId1 + "-Person2", 43, TenantId1); - await _personRepository.InsertAsync(tenant1Person1).ConfigureAwait(false); - await _personRepository.InsertAsync(tenant1Person2).ConfigureAwait(false); + await _personRepository.InsertAsync(tenant1Person1); + await _personRepository.InsertAsync(tenant1Person2); } private async Task AddEntitiesWithPks() { - await _entityWithIntPksRepository.InsertAsync(new EntityWithIntPk("Entity1")).ConfigureAwait(false); + await _entityWithIntPksRepository.InsertAsync(new EntityWithIntPk("Entity1")); } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/AbpDateTimeValueConverter_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/AbpDateTimeValueConverter_Tests.cs index 782f61830a..e36225e53c 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/AbpDateTimeValueConverter_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/AbpDateTimeValueConverter_Tests.cs @@ -28,9 +28,9 @@ namespace Volo.Abp.TestApp.Testing { Birthday = DateTime.Parse("2020-01-01 00:00:00"), LastActive = DateTime.Parse("2020-01-01 00:00:00"), - }, true).ConfigureAwait(false); + }, true); - var person = await _personRepository.GetAsync(personId).ConfigureAwait(false); + var person = await _personRepository.GetAsync(personId); person.ShouldNotBeNull(); person.CreationTime.Kind.ShouldBe(DateTimeKind.Utc); @@ -53,9 +53,9 @@ namespace Volo.Abp.TestApp.Testing { Birthday = DateTime.Parse("2020-01-01 00:00:00"), LastActive = DateTime.Parse("2020-01-01 00:00:00"), - }, true).ConfigureAwait(false); + }, true); - var person = await _personRepository.GetViewAsync(personName).ConfigureAwait(false); + var person = await _personRepository.GetViewAsync(personName); person.ShouldNotBeNull(); person.CreationTime.Kind.ShouldBe(DateTimeKind.Utc); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Auditing_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Auditing_Tests.cs index dcbfdaf045..41ef7ce076 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Auditing_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Auditing_Tests.cs @@ -49,9 +49,9 @@ namespace Volo.Abp.TestApp.Testing var personId = Guid.NewGuid(); - await PersonRepository.InsertAsync(new Person(personId, "Adam", 42)).ConfigureAwait(false); + await PersonRepository.InsertAsync(new Person(personId, "Adam", 42)); - var person = await PersonRepository.FindAsync(personId).ConfigureAwait(false); + var person = await PersonRepository.FindAsync(personId); person.ShouldNotBeNull(); person.CreationTime.ShouldBeLessThanOrEqualTo(Clock.Now); @@ -68,14 +68,14 @@ namespace Volo.Abp.TestApp.Testing CurrentUserId = Guid.Parse(currentUserId); } - var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId); douglas.LastModificationTime.ShouldBeNull(); douglas.Age++; - await PersonRepository.UpdateAsync(douglas).ConfigureAwait(false); + await PersonRepository.UpdateAsync(douglas); - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldNotBeNull(); douglas.LastModificationTime.ShouldNotBeNull(); @@ -93,17 +93,17 @@ namespace Volo.Abp.TestApp.Testing CurrentUserId = Guid.Parse(currentUserId); } - var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId); - await PersonRepository.DeleteAsync(douglas).ConfigureAwait(false); + await PersonRepository.DeleteAsync(douglas); - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldBeNull(); using (DataFilter.Disable()) { - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldNotBeNull(); douglas.DeletionTime.ShouldNotBeNull(); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ConcurrencyStamp_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ConcurrencyStamp_Tests.cs index 1f7c927251..2c5a5d89ab 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ConcurrencyStamp_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ConcurrencyStamp_Tests.cs @@ -20,37 +20,37 @@ namespace Volo.Abp.TestApp.Testing public async Task Should_Not_Allow_To_Update_If_The_Entity_Has_Changed() { //Got an entity from database, changed its value, but not updated in the database yet - var london1 = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london1 = await CityRepository.FindByNameAsync("London"); london1.Name = "London-1"; //Another user has changed it just before I update - var london2 = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london2 = await CityRepository.FindByNameAsync("London"); london2.Name = "London-2"; - await CityRepository.UpdateAsync(london2).ConfigureAwait(false); + await CityRepository.UpdateAsync(london2); //And updating my old entity throws exception! await Assert.ThrowsAsync(async () => { - await CityRepository.UpdateAsync(london1).ConfigureAwait(false); - }).ConfigureAwait(false); + await CityRepository.UpdateAsync(london1); + }); } [Fact] public async Task Should_Not_Allow_To_Delete_If_The_Entity_Has_Changed() { //Got an entity from database, but not deleted in the database yet - var london1 = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london1 = await CityRepository.FindByNameAsync("London"); //Another user has changed it just before I delete - var london2 = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london2 = await CityRepository.FindByNameAsync("London"); london2.Name = "London-updated"; - await CityRepository.UpdateAsync(london2).ConfigureAwait(false); + await CityRepository.UpdateAsync(london2); //And deleting my old entity throws exception! await Assert.ThrowsAsync(async () => { - await CityRepository.DeleteAsync(london1).ConfigureAwait(false); - }).ConfigureAwait(false); + await CityRepository.DeleteAsync(london1); + }); } } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/DomainEvents_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/DomainEvents_Tests.cs index 2c6982de6a..3ca7eaf8e4 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/DomainEvents_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/DomainEvents_Tests.cs @@ -55,8 +55,8 @@ namespace Volo.Abp.TestApp.Testing { var dougles = PersonRepository.Single(b => b.Name == "Douglas"); dougles.ChangeName("Douglas-Changed"); - await PersonRepository.UpdateAsync(dougles).ConfigureAwait(false); - }).ConfigureAwait(false); + await PersonRepository.UpdateAsync(dougles); + }); //Assert diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs index bc38257683..fe4e0862f3 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs @@ -75,9 +75,9 @@ namespace Volo.Abp.TestApp.Testing return Task.CompletedTask; }); - await PersonRepository.InsertAsync(new Person(Guid.NewGuid(), personName, 15)).ConfigureAwait(false); + await PersonRepository.InsertAsync(new Person(Guid.NewGuid(), personName, 15)); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } creatingEventTriggered.ShouldBeTrue(); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ExtraProperties_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ExtraProperties_Tests.cs index a52ddbee3a..67eff13572 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ExtraProperties_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/ExtraProperties_Tests.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task Should_Get_An_Extra_Property() { - var london = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london = await CityRepository.FindByNameAsync("London"); london.HasProperty("Population").ShouldBeTrue(); london.GetProperty("Population").ShouldBe(10_470_000); } @@ -28,11 +28,11 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task Should_Add_An_Extra_Property() { - var london = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london = await CityRepository.FindByNameAsync("London"); london.SetProperty("AreaAsKm", 1572); - await CityRepository.UpdateAsync(london).ConfigureAwait(false); + await CityRepository.UpdateAsync(london); - var london2 = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london2 = await CityRepository.FindByNameAsync("London"); london2.HasProperty("AreaAsKm").ShouldBeTrue(); london2.GetProperty("AreaAsKm").ShouldBe(1572); } @@ -40,12 +40,12 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task Should_Update_An_Existing_Extra_Property() { - var london = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london = await CityRepository.FindByNameAsync("London"); london.ExtraProperties["Population"] = 11_000_042; - await CityRepository.UpdateAsync(london).ConfigureAwait(false); + await CityRepository.UpdateAsync(london); - var london2 = await CityRepository.FindByNameAsync("London").ConfigureAwait(false); + var london2 = await CityRepository.FindByNameAsync("London"); london2.HasProperty("Population").ShouldBeTrue(); london2.GetProperty("Population").ShouldBe(11_000_042); } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Creation_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Creation_Tests.cs index af910aefba..b8a3e8449c 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Creation_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Creation_Tests.cs @@ -42,9 +42,9 @@ namespace Volo.Abp.TestApp.Testing Id = personId, Name = "Person1", Age = 21 - }).ConfigureAwait(false); + }); - var person = await _personRepository.FindAsync(personId).ConfigureAwait(false); + var person = await _personRepository.FindAsync(personId); person.ShouldNotBeNull(); person.TenantId.ShouldNotBeNull(); @@ -63,9 +63,9 @@ namespace Volo.Abp.TestApp.Testing Id = personId, Name = "Person1", Age = 21 - }).ConfigureAwait(false); + }); - var person = await _personRepository.FindAsync(personId).ConfigureAwait(false); + var person = await _personRepository.FindAsync(personId); person.ShouldNotBeNull(); person.TenantId.ShouldBeNull(); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Filter_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Filter_Tests.cs index 10ce8e1605..da3e33ffea 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Filter_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/MultiTenant_Filter_Tests.cs @@ -63,7 +63,7 @@ namespace Volo.Abp.TestApp.Testing people.Count.ShouldBe(0); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -85,7 +85,7 @@ namespace Volo.Abp.TestApp.Testing people.Count.ShouldBe(1); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests.cs index 7571c4fecd..07e6211c09 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task GetAsync() { - var person = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + var person = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId); person.Name.ShouldBe("Douglas"); person.Phones.Count.ShouldBe(2); } @@ -31,29 +31,29 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task FindAsync_Should_Return_Null_For_Not_Found_Entity() { - var person = await PersonRepository.FindAsync(Guid.NewGuid()).ConfigureAwait(false); + var person = await PersonRepository.FindAsync(Guid.NewGuid()); person.ShouldBeNull(); } [Fact] public async Task DeleteAsync() { - await PersonRepository.DeleteAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + await PersonRepository.DeleteAsync(TestDataBuilder.UserDouglasId); - (await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false)).ShouldBeNull(); + (await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId)).ShouldBeNull(); } [Fact] public async Task Should_Access_To_Other_Collections_In_Same_Context_In_A_Custom_Method() { - var people = await CityRepository.GetPeopleInTheCityAsync("London").ConfigureAwait(false); + var people = await CityRepository.GetPeopleInTheCityAsync("London"); people.Count.ShouldBeGreaterThan(0); } [Fact] public async Task Custom_Repository_Method() { - var city = await CityRepository.FindByNameAsync("Istanbul").ConfigureAwait(false); + var city = await CityRepository.FindByNameAsync("Istanbul"); city.ShouldNotBeNull(); city.Name.ShouldBe("Istanbul"); } @@ -63,9 +63,9 @@ namespace Volo.Abp.TestApp.Testing { var personId = Guid.NewGuid(); - await PersonRepository.InsertAsync(new Person(personId, "Adam", 42)).ConfigureAwait(false); + await PersonRepository.InsertAsync(new Person(personId, "Adam", 42)); - var person = await PersonRepository.FindAsync(personId).ConfigureAwait(false); + var person = await PersonRepository.FindAsync(personId); person.ShouldNotBeNull(); } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs index 0c3bc5e290..f873fe4265 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.TestApp.Testing entity.ShouldNotBeNull(); entity.Name.ShouldBe("Entity1"); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -35,10 +35,10 @@ namespace Volo.Abp.TestApp.Testing { await WithUnitOfWorkAsync(async () => { - var entity = await EntityWithIntPkRepository.GetAsync(1).ConfigureAwait(false); + var entity = await EntityWithIntPkRepository.GetAsync(1); entity.ShouldNotBeNull(); entity.Name.ShouldBe("Entity1"); - }).ConfigureAwait(false); + }); } } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs index 0e7bf2f7df..6078236380 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.TestApp.Testing { PersonRepository.Any().ShouldBeTrue(); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -38,7 +38,7 @@ namespace Volo.Abp.TestApp.Testing var person = PersonRepository.Single(p => p.Id == TestDataBuilder.UserDouglasId); person.Name.ShouldBe("Douglas"); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -50,7 +50,7 @@ namespace Volo.Abp.TestApp.Testing person.Name.ShouldBe("Douglas"); person.Phones.Count.ShouldBe(2); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -62,7 +62,7 @@ namespace Volo.Abp.TestApp.Testing person.Name.ShouldBe("Douglas"); person.Phones.Count.ShouldBe(2); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Specifications_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Specifications_Tests.cs index 49880535f2..c26134b27c 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Specifications_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Specifications_Tests.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.TestApp.Testing { CityRepository.Count(new CitySpecification().ToExpression()).ShouldBe(1); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Filter_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Filter_Tests.cs index 6daba040a4..f3ac8c301f 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Filter_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Filter_Tests.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.TestApp.Testing var person = PersonRepository.FirstOrDefault(p => p.Name == "John-Deleted"); person.ShouldBeNull(); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -38,9 +38,9 @@ namespace Volo.Abp.TestApp.Testing { await WithUnitOfWorkAsync(async () => { - var person = await PersonRepository.FindAsync(TestDataBuilder.UserJohnDeletedId).ConfigureAwait(false); + var person = await PersonRepository.FindAsync(TestDataBuilder.UserJohnDeletedId); person.ShouldBeNull(); - }).ConfigureAwait(false); + }); } [Fact] @@ -52,7 +52,7 @@ namespace Volo.Abp.TestApp.Testing people.Count.ShouldBe(1); people.Any(p => p.Name == "Douglas").ShouldBeTrue(); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } [Fact] @@ -92,7 +92,7 @@ namespace Volo.Abp.TestApp.Testing people.Any(p => p.IsDeleted).ShouldBeFalse(); return Task.CompletedTask; - }).ConfigureAwait(false); + }); } } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Tests.cs index e1f4bc56a7..0059a39a11 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/SoftDelete_Tests.cs @@ -24,15 +24,15 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task Should_Cancel_Deletion_For_Soft_Delete_Entities() { - var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); - await PersonRepository.DeleteAsync(douglas).ConfigureAwait(false); + var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId); + await PersonRepository.DeleteAsync(douglas); - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldBeNull(); using (DataFilter.Disable()) { - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldNotBeNull(); douglas.IsDeleted.ShouldBeTrue(); douglas.DeletionTime.ShouldNotBeNull(); @@ -42,18 +42,18 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task Should_Handle_Deletion_On_Update_For_Soft_Delete_Entities() { - var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId); douglas.Age = 42; douglas.IsDeleted = true; - await PersonRepository.UpdateAsync(douglas).ConfigureAwait(false); + await PersonRepository.UpdateAsync(douglas); - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldBeNull(); using (DataFilter.Disable()) { - douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId).ConfigureAwait(false); + douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId); douglas.ShouldNotBeNull(); douglas.IsDeleted.ShouldBeTrue(); douglas.DeletionTime.ShouldNotBeNull(); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs index 3f80bfb74b..f21cc7371b 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs @@ -30,9 +30,9 @@ namespace Volo.Abp.TestApp.Testing using (var uow = uowManager.Begin(options)) { - await action().ConfigureAwait(false); + await action(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } @@ -50,8 +50,8 @@ namespace Volo.Abp.TestApp.Testing using (var uow = uowManager.Begin(options)) { - var result = await func().ConfigureAwait(false); - await uow.CompleteAsync().ConfigureAwait(false); + var result = await func(); + await uow.CompleteAsync(); return result; } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Uow_Completed_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Uow_Completed_Tests.cs index a101e64ea6..1b169bbe97 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Uow_Completed_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Uow_Completed_Tests.cs @@ -25,15 +25,15 @@ namespace Volo.Abp.TestApp.Testing using (var uow = _unitOfWorkManager.Begin()) { //Perform an arbitrary database operation - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), Guid.NewGuid().ToString())).ConfigureAwait(false); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), Guid.NewGuid().ToString())); uow.OnCompleted(async () => { //Perform another database operation inside the OnCompleted handler - await _cityRepository.InsertAsync(new City(Guid.NewGuid(), Guid.NewGuid().ToString())).ConfigureAwait(false); + await _cityRepository.InsertAsync(new City(Guid.NewGuid(), Guid.NewGuid().ToString())); }); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj index 51beb181a1..bf48039303 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs index 1f5190a9eb..96db1622b5 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.UI.Navigation [Fact] public async Task Should_Get_Menu() { - var mainMenu = await _menuManager.GetAsync(StandardMenus.Main).ConfigureAwait(false); + var mainMenu = await _menuManager.GetAsync(StandardMenus.Main); mainMenu.Name.ShouldBe(StandardMenus.Main); mainMenu.DisplayName.ShouldBe("Main Menu"); diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj index 256dd07ed6..32bd3e4af5 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj +++ b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs index 6b1bc2f98d..e0810467b3 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs +++ b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs @@ -30,13 +30,13 @@ namespace Volo.Abp.Uow _unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.Id.ShouldBe(uow1.Id); - await uow2.CompleteAsync().ConfigureAwait(false); + await uow2.CompleteAsync(); } _unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.ShouldBe(uow1); - await uow1.CompleteAsync().ConfigureAwait(false); + await uow1.CompleteAsync(); } _unitOfWorkManager.Current.ShouldBeNull(); @@ -56,7 +56,7 @@ namespace Volo.Abp.Uow _unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.Id.ShouldNotBe(uow1.Id); - await uow2.CompleteAsync().ConfigureAwait(false); + await uow2.CompleteAsync(); } _unitOfWorkManager.Current.ShouldBeNull(); @@ -66,7 +66,7 @@ namespace Volo.Abp.Uow _unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.Id.ShouldBe(uow1.Id); - await uow1.CompleteAsync().ConfigureAwait(false); + await uow1.CompleteAsync(); } _unitOfWorkManager.Current.ShouldBeNull(); diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs index 7d9a176076..bf120d2e33 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs +++ b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.Uow uow.Disposed += (sender, args) => disposed = true; - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); completed.ShouldBeTrue(); } @@ -53,7 +53,7 @@ namespace Volo.Abp.Uow childUow.OnCompleted(async () => completed = true); uow.Disposed += (sender, args) => disposed = true; - await childUow.CompleteAsync().ConfigureAwait(false); + await childUow.CompleteAsync(); completed.ShouldBeFalse(); //Parent has not been completed yet! disposed.ShouldBeFalse(); @@ -62,7 +62,7 @@ namespace Volo.Abp.Uow completed.ShouldBeFalse(); //Parent has not been completed yet! disposed.ShouldBeFalse(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); completed.ShouldBeTrue(); //It's completed now! disposed.ShouldBeFalse(); //But not disposed yet! @@ -129,11 +129,11 @@ namespace Volo.Abp.Uow uow.Failed += (sender, args) => { failed = true; args.IsRolledback.ShouldBeTrue(); }; uow.Disposed += (sender, args) => disposed = true; - await uow.RollbackAsync().ConfigureAwait(false); + await uow.RollbackAsync(); if (callComplete) { - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Nested_Tests.cs b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Nested_Tests.cs index efa4a7540e..31ce688d84 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Nested_Tests.cs +++ b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Nested_Tests.cs @@ -30,13 +30,13 @@ namespace Volo.Abp.Uow _unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.Id.ShouldNotBe(uow1.Id); - await uow2.CompleteAsync().ConfigureAwait(false); + await uow2.CompleteAsync(); } _unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.ShouldBe(uow1); - await uow1.CompleteAsync().ConfigureAwait(false); + await uow1.CompleteAsync(); } _unitOfWorkManager.Current.ShouldBeNull(); diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj index a16495ccda..7bf3df7ca5 100644 --- a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj +++ b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/ApplicationService_Validation_Tests.cs b/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/ApplicationService_Validation_Tests.cs index 8b4f4a6110..0d13867819 100644 --- a/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/ApplicationService_Validation_Tests.cs +++ b/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/ApplicationService_Validation_Tests.cs @@ -31,15 +31,15 @@ namespace Volo.Abp.Validation [Fact] public async Task Should_Work_Proper_With_Right_Inputs() { - var output = await _myAppService.MyMethod(new MyMethodInput { MyStringValue = "test" }).ConfigureAwait(false); + var output = await _myAppService.MyMethod(new MyMethodInput { MyStringValue = "test" }); output.Result.ShouldBe(42); } [Fact] public async Task Should_Not_Work_With_Wrong_Inputs() { - await Assert.ThrowsAsync(async () => await _myAppService.MyMethod(new MyMethodInput()).ConfigureAwait(false)).ConfigureAwait(false); //MyStringValue is not supplied! - await Assert.ThrowsAsync(async () => await _myAppService.MyMethod(new MyMethodInput { MyStringValue = "a" }).ConfigureAwait(false)).ConfigureAwait(false); //MyStringValue's min length should be 3! + await Assert.ThrowsAsync(async () => await _myAppService.MyMethod(new MyMethodInput())); //MyStringValue is not supplied! + await Assert.ThrowsAsync(async () => await _myAppService.MyMethod(new MyMethodInput { MyStringValue = "a" })); //MyStringValue's min length should be 3! } [Fact] @@ -50,7 +50,7 @@ namespace Volo.Abp.Validation MyStringValue2 = "test 1", Input1 = new MyMethodInput { MyStringValue = "test 2" }, DateTimeValue = DateTime.Now - }).ConfigureAwait(false); + }); output.Result.ShouldBe(42); } @@ -63,7 +63,7 @@ namespace Volo.Abp.Validation { MyStringValue2 = "test 1", Input1 = new MyMethodInput() //MyStringValue is not set - }).ConfigureAwait(false)).ConfigureAwait(false); + })); } [Fact] @@ -73,7 +73,7 @@ namespace Volo.Abp.Validation await _myAppService.MyMethod2(new MyMethod2Input //Input1 is not set { MyStringValue2 = "test 1" - }).ConfigureAwait(false)).ConfigureAwait(false); + })); } [Fact] @@ -88,7 +88,7 @@ namespace Volo.Abp.Validation { new MyClassInList {ValueInList = null} } - }).ConfigureAwait(false)).ConfigureAwait(false); + })); } [Fact] @@ -103,27 +103,27 @@ namespace Volo.Abp.Validation { new MyClassInList {ValueInList = null} } - }).ConfigureAwait(false)).ConfigureAwait(false); + })); } [Fact] public async Task Should_Not_Work_If_Array_Is_Null() { await Assert.ThrowsAsync(async () => - await _myAppService.MyMethod4(new MyMethod4Input()) //ArrayItems is null! -.ConfigureAwait(false)).ConfigureAwait(false); + await _myAppService.MyMethod4(new MyMethod4Input()) //ArrayItems is null! + ); } [Fact] public async Task Should_Work_If_Array_Is_Null_But_DisabledValidation_For_Method() { - await _myAppService.MyMethod4_2(new MyMethod4Input()).ConfigureAwait(false); + await _myAppService.MyMethod4_2(new MyMethod4Input()); } [Fact] public async Task Should_Work_If_Array_Is_Null_But_DisabledValidation_For_Property() { - await _myAppService.MyMethod5(new MyMethod5Input()).ConfigureAwait(false); + await _myAppService.MyMethod5(new MyMethod5Input()); } [Fact] @@ -134,8 +134,8 @@ namespace Volo.Abp.Validation await _myAppService.MyMethod6(new MyMethod6Input { MyStringValue = "test value" //MyIntValue has not set! - }).ConfigureAwait(false); - }).ConfigureAwait(false); + }); + }); } //TODO: Create a Volo.Abp.Ddd.Application.Contracts.Tests project and move this to there and remove Volo.Abp.Ddd.Application.Contracts dependency from this project. @@ -147,8 +147,8 @@ namespace Volo.Abp.Validation await _myAppService.MyMethodWithLimitedResult(new LimitedResultRequestDto { MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount + 1 - }).ConfigureAwait(false); - }).ConfigureAwait(false); + }); + }); exception.ValidationErrors.ShouldContain(e => e.MemberNames.Contains(nameof(LimitedResultRequestDto.MaxResultCount))); } @@ -159,19 +159,19 @@ namespace Volo.Abp.Validation await _myAppService.MyMethodWithLimitedResult(new LimitedResultRequestDto { MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount - 1 - }).ConfigureAwait(false); + }); } [Fact] public async Task Should_Stop_Recursive_Validation_In_A_Constant_Depth() { - (await _myAppService.MyMethod8(new MyClassWithRecursiveReference { Value = "42" }).ConfigureAwait(false)).Result.ShouldBe(42); + (await _myAppService.MyMethod8(new MyClassWithRecursiveReference { Value = "42" })).Result.ShouldBe(42); } [Fact] public async Task Should_Allow_Null_For_Nullable_Enums() { - await _myAppService.MyMethodWithNullableEnum(null).ConfigureAwait(false); + await _myAppService.MyMethodWithNullableEnum(null); } [Fact] diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj index 63617f36c0..7dcfdc83c5 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/FodyWeavers.xml b/modules/account/src/Volo.Abp.Account.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/FodyWeavers.xsd b/modules/account/src/Volo.Abp.Account.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj index 039c559860..58b2266340 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json index b2d6fa9130..ac8b58ee1e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json @@ -35,6 +35,10 @@ "PasswordChanged": "Heslo změněno", "NewPasswordConfirmFailed": "Potvrďte nové heslo.", "Manage": "Spravovat", - "ManageYourProfile": "Spravujte svůj profil" + "ManageYourProfile": "Spravujte svůj profil", + "DisplayName:Abp.Account.IsSelfRegistrationEnabled": "Je povolena automatická registrace", + "Description:Abp.Account.IsSelfRegistrationEnabled": "Zda si uživatel může účet zaregistrovat sám.", + "DisplayName:Abp.Account.EnableLocalLogin": "Ověření pomocí místního účtu", + "Description:Abp.Account.EnableLocalLogin": "Označuje, zda server umožní uživatelům ověřovat se pomocí místního účtu." } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index ea2d94f5f2..7cf2cf7be6 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -11,6 +11,7 @@ "InvalidUserNameOrPassword": "Invalid username or password!", "LoginIsNotAllowed": "You are not allowed to login! You need to confirm your email/phone number.", "SelfRegistrationDisabledMessage": "Self-registration is disabled for this application. Please contact the application administrator to register a new user.", + "LocalLoginDisabledMessage": "Local login is disabled for this application.", "Login": "Login", "Cancel": "Cancel", "Register": "Register", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index c778a28dd6..c02ff8669b 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -11,6 +11,7 @@ "InvalidUserNameOrPassword": "用户名或密码错误!", "LoginIsNotAllowed": "无法登录!你需要验证邮箱地址/手机号.", "SelfRegistrationDisabledMessage": "应用程序未开放注册,请联系管理员添加新用户.", + "LocalLoginDisabledMessage": "应用程序未开放本地账户登录.", "Login": "登录", "Cancel": "取消", "Register": "注册", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..b75be0f73a --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json @@ -0,0 +1,45 @@ +{ + "culture": "zh-Hant", + "texts": { + "UserName": "使用者名稱", + "EmailAddress": "電子信箱地址", + "UserNameOrEmailAddress": "使用者名稱或電子信箱地址", + "Password": "密碼", + "RememberMe": "記住我", + "UseAnotherServiceToLogin": "使用另一個服務登入", + "UserLockedOutMessage": "登入失敗,使用者帳號已被鎖定.請稍後再試.", + "InvalidUserNameOrPassword": "使用者名稱或密碼錯誤!", + "LoginIsNotAllowed": "無法登入!你需要驗證電子信箱地址/手機號碼.", + "SelfRegistrationDisabledMessage": "應用程式未開放註冊,請聯絡管理員以加入新使用者.", + "LocalLoginDisabledMessage": "應用程序未開放本地賬戶登錄.", + "Login": "登入", + "Cancel": "取消", + "Register": "註冊", + "AreYouANewUser": "你是新使用者嗎?", + "AlreadyRegistered": "已經註冊過了?", + "InvalidLoginRequest": "登入請求無效", + "ThereAreNoLoginSchemesConfiguredForThisClient": "沒有為此客戶端配置登入方案.", + "LogInUsingYourProviderAccount": "使用你的{0}帳號登入", + "DisplayName:CurrentPassword": "目前密碼", + "DisplayName:NewPassword": "新密碼", + "DisplayName:NewPasswordConfirm": "確認新密碼", + "PasswordChangedMessage": "你的密碼已修改成功.", + "DisplayName:UserName": "使用者名稱", + "DisplayName:Email": "電子信箱", + "DisplayName:Name": "名字", + "DisplayName:Surname": "姓", + "DisplayName:Password": "密碼", + "DisplayName:EmailAddress": "電子信箱地址", + "DisplayName:PhoneNumber": "電話號碼", + "PersonalSettings": "個人設置", + "PersonalSettingsSaved": "個人設置已保存", + "PasswordChanged": "修改密碼", + "NewPasswordConfirmFailed": "請確認新密碼", + "Manage": "管理", + "ManageYourProfile": "管理你的個人資料", + "DisplayName:Abp.Account.IsSelfRegistrationEnabled": "啟用自行註冊", + "Description:Abp.Account.IsSelfRegistrationEnabled": "是否允許使用者自行註冊帳號.", + "DisplayName:Abp.Account.EnableLocalLogin": "使用本地帳號進行身分驗證", + "Description:Abp.Account.EnableLocalLogin": "伺服器是否允許使用者使用本地帳號進行身份驗證。" + } +} diff --git a/modules/account/src/Volo.Abp.Account.Application/FodyWeavers.xml b/modules/account/src/Volo.Abp.Account.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application/FodyWeavers.xsd b/modules/account/src/Volo.Abp.Account.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj index f5966d7e30..1ddc2323d1 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj +++ b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs index 9935078fe1..695d9b233f 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Linq; +using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Volo.Abp.Account.Settings; using Volo.Abp.Application.Services; @@ -9,28 +10,42 @@ namespace Volo.Abp.Account { public class AccountAppService : ApplicationService, IAccountAppService { + private readonly IIdentityRoleRepository _roleRepository; protected IdentityUserManager UserManager { get; } public AccountAppService( - IdentityUserManager userManager) + IdentityUserManager userManager, + IIdentityRoleRepository roleRepository) { + _roleRepository = roleRepository; UserManager = userManager; } public virtual async Task RegisterAsync(RegisterDto input) { - await CheckSelfRegistrationAsync().ConfigureAwait(false); + await CheckSelfRegistrationAsync(); var user = new IdentityUser(GuidGenerator.Create(), input.UserName, input.EmailAddress, CurrentTenant.Id); - (await UserManager.CreateAsync(user, input.Password).ConfigureAwait(false)).CheckErrors(); + (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); + + await UserManager.SetEmailAsync(user,input.EmailAddress).ConfigureAwait(false); + + await SetDefaultRolesAsync(user); return ObjectMapper.Map(user); } + protected virtual async Task SetDefaultRolesAsync(IdentityUser user) + { + var defaultRoles = await _roleRepository.GetDefaultOnesAsync().ConfigureAwait(false); + + await UserManager.SetRolesAsync(user, defaultRoles.Select(r => r.Name)).ConfigureAwait(false); + } + protected virtual async Task CheckSelfRegistrationAsync() { - if (!await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled).ConfigureAwait(false)) + if (!await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) { throw new UserFriendlyException(L["SelfRegistrationDisabledMessage"]); } diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/FodyWeavers.xml b/modules/account/src/Volo.Abp.Account.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/FodyWeavers.xsd b/modules/account/src/Volo.Abp.Account.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj index 4a7602754a..89679b3e22 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/FodyWeavers.xml b/modules/account/src/Volo.Abp.Account.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/FodyWeavers.xsd b/modules/account/src/Volo.Abp.Account.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj index 3459ab0294..2e074722b2 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj +++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/FodyWeavers.xml b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/FodyWeavers.xsd b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs index 2fa2aa5778..c2e50a2317 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs @@ -46,7 +46,7 @@ namespace Volo.Abp.Account.Web.Pages.Account { LoginInput = new LoginInputModel(); - var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl).ConfigureAwait(false); + var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl); if (context != null) { @@ -68,7 +68,7 @@ namespace Volo.Abp.Account.Web.Pages.Account return Page(); } - var schemes = await _schemeProvider.GetAllSchemesAsync().ConfigureAwait(false); + var schemes = await _schemeProvider.GetAllSchemesAsync(); var providers = schemes .Where(x => x.DisplayName != null || x.Name.Equals(_accountOptions.WindowsAuthenticationSchemeName, StringComparison.OrdinalIgnoreCase)) @@ -79,10 +79,10 @@ namespace Volo.Abp.Account.Web.Pages.Account }) .ToList(); - EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false); + EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); if (context?.ClientId != null) { - var client = await ClientStore.FindEnabledClientByIdAsync(context.ClientId).ConfigureAwait(false); + var client = await ClientStore.FindEnabledClientByIdAsync(context.ClientId); if (client != null) { EnableLocalLogin = client.EnableLocalLogin; @@ -98,7 +98,7 @@ namespace Volo.Abp.Account.Web.Pages.Account if (IsExternalLoginOnly) { - return await base.OnPostExternalLogin(providers.First().AuthenticationScheme).ConfigureAwait(false); + return await base.OnPostExternalLogin(providers.First().AuthenticationScheme); } return Page(); @@ -107,31 +107,31 @@ namespace Volo.Abp.Account.Web.Pages.Account [UnitOfWork] //TODO: Will be removed when we implement action filter public override async Task OnPostAsync(string action) { - EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false); - if (action == "Cancel") { - var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl).ConfigureAwait(false); + var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl); if (context == null) { return Redirect("~/"); } - await Interaction.GrantConsentAsync(context, ConsentResponse.Denied).ConfigureAwait(false); + await Interaction.GrantConsentAsync(context, ConsentResponse.Denied); return Redirect(ReturnUrl); } + await CheckLocalLoginAsync(); + ValidateModel(); - await ReplaceEmailToUsernameOfInputIfNeeds().ConfigureAwait(false); + await ReplaceEmailToUsernameOfInputIfNeeds(); var result = await SignInManager.PasswordSignInAsync( LoginInput.UserNameOrEmailAddress, LoginInput.Password, LoginInput.RememberMe, true - ).ConfigureAwait(false); + ); if (result.RequiresTwoFactor) { @@ -162,11 +162,11 @@ namespace Volo.Abp.Account.Web.Pages.Account } //TODO: Find a way of getting user's id from the logged in user and do not query it again like that! - var user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress).ConfigureAwait(false) ?? - await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress).ConfigureAwait(false); + var user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ?? + await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress); Debug.Assert(user != null, nameof(user) + " != null"); - await IdentityServerEvents.RaiseAsync(new UserLoginSuccessEvent(user.UserName, user.Id.ToString(), user.UserName)).ConfigureAwait(false); //TODO: Use user's name once implemented + await IdentityServerEvents.RaiseAsync(new UserLoginSuccessEvent(user.UserName, user.Id.ToString(), user.UserName)); //TODO: Use user's name once implemented return RedirectSafely(ReturnUrl, ReturnUrlHash); } @@ -176,15 +176,15 @@ namespace Volo.Abp.Account.Web.Pages.Account { if (_accountOptions.WindowsAuthenticationSchemeName == provider) { - return await ProcessWindowsLoginAsync().ConfigureAwait(false); + return await ProcessWindowsLoginAsync(); } - return await base.OnPostExternalLogin(provider).ConfigureAwait(false); + return await base.OnPostExternalLogin(provider); } private async Task ProcessWindowsLoginAsync() { - var result = await HttpContext.AuthenticateAsync(_accountOptions.WindowsAuthenticationSchemeName).ConfigureAwait(false); + var result = await HttpContext.AuthenticateAsync(_accountOptions.WindowsAuthenticationSchemeName); if (!(result?.Principal is WindowsPrincipal windowsPrincipal)) { return Challenge(_accountOptions.WindowsAuthenticationSchemeName); @@ -219,7 +219,7 @@ namespace Volo.Abp.Account.Web.Pages.Account IdentityServer4.IdentityServerConstants.ExternalCookieAuthenticationScheme, new ClaimsPrincipal(identity), props - ).ConfigureAwait(false); + ); return RedirectSafely(props.RedirectUri); } diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs new file mode 100644 index 0000000000..ab403ea5a1 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs @@ -0,0 +1,44 @@ +using IdentityServer4.Services; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Account.Web.Pages.Account +{ + [ExposeServices(typeof(LogoutModel))] + public class IdentityServerSupportedLogoutModel : LogoutModel + { + protected IIdentityServerInteractionService Interaction { get; } + + public IdentityServerSupportedLogoutModel(IIdentityServerInteractionService interaction) + { + Interaction = interaction; + } + + public override async Task OnGetAsync() + { + await SignInManager.SignOutAsync(); + + var logoutId = Request.Query["logoutId"].ToString(); + + if (!string.IsNullOrEmpty(logoutId)) + { + var logoutContext = await Interaction.GetLogoutContextAsync(logoutId); + + var postLogoutUri = logoutContext.PostLogoutRedirectUri; + + if (!string.IsNullOrEmpty(postLogoutUri)) + { + return Redirect(postLogoutUri); + } + } + + if (ReturnUrl != null) + { + return LocalRedirect(ReturnUrl); + } + + return RedirectToPage("/Account/Login"); + } + } +} diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs index e34f6e98f1..3fb68feaca 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs @@ -44,19 +44,19 @@ namespace Volo.Abp.Account.Web.Pages public virtual async Task OnGet() { - var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl).ConfigureAwait(false); + var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); if (request == null) { throw new ApplicationException($"No consent request matching request: {ReturnUrl}"); } - var client = await _clientStore.FindEnabledClientByIdAsync(request.ClientId).ConfigureAwait(false); + var client = await _clientStore.FindEnabledClientByIdAsync(request.ClientId); if (client == null) { throw new ApplicationException($"Invalid client id: {request.ClientId}"); } - var resources = await _resourceStore.FindEnabledResourcesByScopeAsync(request.ScopesRequested).ConfigureAwait(false); + var resources = await _resourceStore.FindEnabledResourcesByScopeAsync(request.ScopesRequested); if (resources == null || (!resources.IdentityResources.Any() && !resources.ApiResources.Any())) { throw new ApplicationException($"No scopes matching: {request.ScopesRequested.Aggregate((x, y) => x + ", " + y)}"); @@ -78,7 +78,7 @@ namespace Volo.Abp.Account.Web.Pages public virtual async Task OnPost(string userDecision) { - var result = await ProcessConsentAsync().ConfigureAwait(false); + var result = await ProcessConsentAsync(); if (result.IsRedirect) { @@ -122,13 +122,13 @@ namespace Volo.Abp.Account.Web.Pages if (grantedConsent != null) { - var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl).ConfigureAwait(false); + var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); if (request == null) { return result; } - await _interaction.GrantConsentAsync(request, grantedConsent).ConfigureAwait(false); + await _interaction.GrantConsentAsync(request, grantedConsent); result.RedirectUri = ReturnUrl; //TODO: ReturnUrlHash? } diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj index 81f0ee4375..2ab190b724 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs index d1f433e343..48b8da5c38 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs @@ -1,10 +1,13 @@ -using System; +using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Settings; using Volo.Abp.Account.Web.Areas.Account.Controllers.Models; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Identity; +using Volo.Abp.Settings; using Volo.Abp.Validation; using SignInResult = Microsoft.AspNetCore.Identity.SignInResult; using UserLoginInfo = Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo; @@ -21,27 +24,40 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers { private readonly SignInManager _signInManager; private readonly IdentityUserManager _userManager; + private readonly ISettingProvider _settingProvider; - public AccountController(SignInManager signInManager, IdentityUserManager userManager) + public AccountController(SignInManager signInManager, IdentityUserManager userManager, ISettingProvider settingProvider) { + LocalizationResource = typeof(AccountResource); + _signInManager = signInManager; _userManager = userManager; + _settingProvider = settingProvider; } [HttpPost] [Route("login")] public virtual async Task Login(UserLoginInfo login) { - ValidateLoginInfo(login); + await CheckLocalLoginAsync(); - await ReplaceEmailToUsernameOfInputIfNeeds(login).ConfigureAwait(false); + ValidateLoginInfo(login); + await ReplaceEmailToUsernameOfInputIfNeeds(login); + return GetAbpLoginResult(await _signInManager.PasswordSignInAsync( login.UserNameOrEmailAddress, login.Password, login.RememberMe, true - ).ConfigureAwait(false)); + )); + } + + [HttpGet] + [Route("logout")] + public virtual async Task Logout() + { + await _signInManager.SignOutAsync(); } [HttpPost] @@ -50,16 +66,16 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers { ValidateLoginInfo(login); - await ReplaceEmailToUsernameOfInputIfNeeds(login).ConfigureAwait(false); + await ReplaceEmailToUsernameOfInputIfNeeds(login); - var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress).ConfigureAwait(false); + var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress); if (identityUser == null) { return new AbpLoginResult(LoginResultType.InvalidUserNameOrPassword); } - return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true).ConfigureAwait(false)); + return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true)); } protected virtual async Task ReplaceEmailToUsernameOfInputIfNeeds(UserLoginInfo login) @@ -69,13 +85,13 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers return; } - var userByUsername = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress).ConfigureAwait(false); + var userByUsername = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress); if (userByUsername != null) { return; } - var userByEmail = await _userManager.FindByEmailAsync(login.UserNameOrEmailAddress).ConfigureAwait(false); + var userByEmail = await _userManager.FindByEmailAsync(login.UserNameOrEmailAddress); if (userByEmail == null) { return; @@ -126,5 +142,13 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers throw new ArgumentNullException(nameof(login.Password)); } } + + private async Task CheckLocalLoginAsync() + { + if (!await _settingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false)) + { + throw new UserFriendlyException(L["LocalLoginDisabledMessage"]); + } + } } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs deleted file mode 100644 index 878f2aa2d5..0000000000 --- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc; -using IdentityUser = Volo.Abp.Identity.IdentityUser; - -namespace Volo.Abp.Account.Web.Areas.Account.Controllers -{ - [Area("Account")] - public class LogoutController : AbpController - { - private readonly SignInManager _signInManager; - - public LogoutController(SignInManager signInManager) - { - _signInManager = signInManager; - } - - //todo@alper: this method can be moved to AccountController like "account/logout" - public async Task Index(string returnUrl = null) - { - await _signInManager.SignOutAsync().ConfigureAwait(false); - - if (returnUrl != null) - { - return LocalRedirect(returnUrl); - } - - return RedirectToPage("/Account/Login"); - } - } -} diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/Models/UserLoginInfo.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/Models/UserLoginInfo.cs index 03231a0717..fe86445a85 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/Models/UserLoginInfo.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/Models/UserLoginInfo.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; +using Volo.Abp.Auditing; namespace Volo.Abp.Account.Web.Areas.Account.Controllers.Models { @@ -12,6 +13,7 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers.Models [Required] [StringLength(32)] [DataType(DataType.Password)] + [DisableAuditing] public string Password { get; set; } public bool RememberMe { get; set; } diff --git a/modules/account/src/Volo.Abp.Account.Web/FodyWeavers.xml b/modules/account/src/Volo.Abp.Account.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/FodyWeavers.xsd b/modules/account/src/Volo.Abp.Account.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs index eb4ad4ad04..53954fd9e4 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs @@ -11,6 +11,7 @@ using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Volo.Abp.Account.Settings; +using Volo.Abp.Auditing; using Volo.Abp.Identity; using Volo.Abp.Security.Claims; using Volo.Abp.Settings; @@ -62,7 +63,7 @@ namespace Volo.Abp.Account.Web.Pages.Account { LoginInput = new LoginInputModel(); - var schemes = await _schemeProvider.GetAllSchemesAsync().ConfigureAwait(false); + var schemes = await _schemeProvider.GetAllSchemesAsync(); var providers = schemes .Where(x => x.DisplayName != null || x.Name.Equals(_accountOptions.WindowsAuthenticationSchemeName, StringComparison.OrdinalIgnoreCase)) @@ -73,7 +74,7 @@ namespace Volo.Abp.Account.Web.Pages.Account }) .ToList(); - EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false); + EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); ExternalProviders = providers.ToArray(); @@ -89,18 +90,18 @@ namespace Volo.Abp.Account.Web.Pages.Account [UnitOfWork] //TODO: Will be removed when we implement action filter public virtual async Task OnPostAsync(string action) { - EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false); + await CheckLocalLoginAsync(); ValidateModel(); - await ReplaceEmailToUsernameOfInputIfNeeds().ConfigureAwait(false); + await ReplaceEmailToUsernameOfInputIfNeeds(); var result = await SignInManager.PasswordSignInAsync( LoginInput.UserNameOrEmailAddress, LoginInput.Password, LoginInput.RememberMe, true - ).ConfigureAwait(false); + ); if (result.RequiresTwoFactor) { @@ -131,8 +132,8 @@ namespace Volo.Abp.Account.Web.Pages.Account } //TODO: Find a way of getting user's id from the logged in user and do not query it again like that! - var user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress).ConfigureAwait(false) ?? - await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress).ConfigureAwait(false); + var user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ?? + await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress); Debug.Assert(user != null, nameof(user) + " != null"); @@ -163,7 +164,7 @@ namespace Volo.Abp.Account.Web.Pages.Account return RedirectToPage("./Login"); } - var loginInfo = await SignInManager.GetExternalLoginInfoAsync().ConfigureAwait(false); + var loginInfo = await SignInManager.GetExternalLoginInfoAsync(); if (loginInfo == null) { Logger.LogWarning("External login info is not available"); @@ -175,7 +176,7 @@ namespace Volo.Abp.Account.Web.Pages.Account loginInfo.ProviderKey, isPersistent: false, bypassTwoFactor: true - ).ConfigureAwait(false); + ); if (result.IsLockedOut) { @@ -190,15 +191,15 @@ namespace Volo.Abp.Account.Web.Pages.Account //TODO: Handle other cases for result! // Get the information about the user from the external login provider - var info = await SignInManager.GetExternalLoginInfoAsync().ConfigureAwait(false); + var info = await SignInManager.GetExternalLoginInfoAsync(); if (info == null) { throw new ApplicationException("Error loading external login information during confirmation."); } - var user = await CreateExternalUserAsync(info).ConfigureAwait(false); + var user = await CreateExternalUserAsync(info); - await SignInManager.SignInAsync(user, false).ConfigureAwait(false); + await SignInManager.SignInAsync(user, false); return RedirectSafely(returnUrl, returnUrlHash); } @@ -208,9 +209,9 @@ namespace Volo.Abp.Account.Web.Pages.Account var user = new IdentityUser(GuidGenerator.Create(), emailAddress, emailAddress, CurrentTenant.Id); - CheckIdentityErrors(await UserManager.CreateAsync(user).ConfigureAwait(false)); - CheckIdentityErrors(await UserManager.SetEmailAsync(user, emailAddress).ConfigureAwait(false)); - CheckIdentityErrors(await UserManager.AddLoginAsync(user, info).ConfigureAwait(false)); + CheckIdentityErrors(await UserManager.CreateAsync(user)); + CheckIdentityErrors(await UserManager.SetEmailAsync(user, emailAddress)); + CheckIdentityErrors(await UserManager.AddLoginAsync(user, info)); return user; } @@ -222,13 +223,13 @@ namespace Volo.Abp.Account.Web.Pages.Account return; } - var userByUsername = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress).ConfigureAwait(false); + var userByUsername = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress); if (userByUsername != null) { return; } - var userByEmail = await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress).ConfigureAwait(false); + var userByEmail = await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress); if (userByEmail == null) { return; @@ -237,6 +238,14 @@ namespace Volo.Abp.Account.Web.Pages.Account LoginInput.UserNameOrEmailAddress = userByEmail.UserName; } + protected virtual async Task CheckLocalLoginAsync() + { + if (!await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false)) + { + throw new UserFriendlyException(L["LocalLoginDisabledMessage"]); + } + } + public class LoginInputModel { [Required] @@ -246,6 +255,7 @@ namespace Volo.Abp.Account.Web.Pages.Account [Required] [StringLength(IdentityUserConsts.MaxPasswordLength)] [DataType(DataType.Password)] + [DisableAuditing] public string Password { get; set; } public bool RememberMe { get; set; } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml new file mode 100644 index 0000000000..f57c7258d1 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml @@ -0,0 +1,3 @@ +@page "/Account/Logout" +@inherits Volo.Abp.Account.Web.Pages.Account.AccountPage +@model Volo.Abp.Account.Web.Pages.Account.LogoutModel \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs new file mode 100644 index 0000000000..8245cc5a77 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace Volo.Abp.Account.Web.Pages.Account +{ + public class LogoutModel : AccountPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrl { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrlHash { get; set; } + + public virtual async Task OnGetAsync() + { + await SignInManager.SignOutAsync(); + if (ReturnUrl != null) + { + return RedirectSafely(ReturnUrl, ReturnUrlHash); + } + + return RedirectToPage("/Account/Login"); + } + } +} diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml index 1ff0686f55..cd601649db 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml @@ -1,11 +1,12 @@ @page -@model Volo.Abp.Account.Web.Pages.Account.ManageModel +@using Volo.Abp.Account.Web.Pages.Account @using Volo.Abp.Identity.Settings @using Volo.Abp.Settings @using Volo.Abp.AspNetCore.Mvc.UI.Theming @inject ISettingProvider SettingManager @inject IThemeManager ThemeManager @inherits Volo.Abp.Account.Web.Pages.Account.AccountPage +@model ManageModel @{ Layout = ThemeManager.CurrentTheme.GetApplicationLayout(); var isUserNameUpdateEnabled = string.Equals(await SettingManager.GetOrNullAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled), "true", @@ -15,10 +16,12 @@ StringComparison.OrdinalIgnoreCase); } @section scripts { - + + + } - +

    @L["ChangePassword"].Value


    diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs index 7c94f747cd..9fba470929 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Account.Web.Pages.Account public async Task OnGetAsync() { - var user = await _profileAppService.GetAsync().ConfigureAwait(false); + var user = await _profileAppService.GetAsync(); PersonalSettingsInfoModel = ObjectMapper.Map(user); } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs index 40b819e0e1..7e47c55367 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs @@ -1,8 +1,11 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Account.Settings; +using Volo.Abp.Auditing; +using Volo.Abp.Application.Dtos; using Volo.Abp.Identity; using Volo.Abp.Settings; using Volo.Abp.Uow; @@ -12,6 +15,8 @@ namespace Volo.Abp.Account.Web.Pages.Account { public class RegisterModel : AccountPageModel { + private readonly IAccountAppService _accountAppService; + [BindProperty(SupportsGet = true)] public string ReturnUrl { get; set; } @@ -21,9 +26,14 @@ namespace Volo.Abp.Account.Web.Pages.Account [BindProperty] public PostInput Input { get; set; } - public virtual async Task OnGet() + public RegisterModel(IAccountAppService accountAppService) + { + _accountAppService = accountAppService; + } + + public virtual async Task OnGetAsync() { - await CheckSelfRegistrationAsync().ConfigureAwait(false); + await CheckSelfRegistrationAsync(); } [UnitOfWork] //TODO: Will be removed when we implement action filter @@ -31,23 +41,30 @@ namespace Volo.Abp.Account.Web.Pages.Account { ValidateModel(); - await CheckSelfRegistrationAsync().ConfigureAwait(false); + await CheckSelfRegistrationAsync(); + + var registerDto = new RegisterDto + { + AppName = "MVC", + EmailAddress = Input.EmailAddress, + Password = Input.Password, + UserName = Input.UserName + }; - var user = new IdentityUser(GuidGenerator.Create(), Input.UserName, Input.EmailAddress, CurrentTenant.Id); + var userDto = await _accountAppService.RegisterAsync(registerDto); + var user = await UserManager.GetByIdAsync(userDto.Id); - (await UserManager.CreateAsync(user, Input.Password).ConfigureAwait(false)).CheckErrors(); - - await UserManager.SetEmailAsync(user, Input.EmailAddress).ConfigureAwait(false); + await UserManager.SetEmailAsync(user, Input.EmailAddress); - await SignInManager.SignInAsync(user, isPersistent: false).ConfigureAwait(false); + await SignInManager.SignInAsync(user, isPersistent: false); return Redirect(ReturnUrl ?? "/"); //TODO: How to ensure safety? IdentityServer requires it however it should be checked somehow! } protected virtual async Task CheckSelfRegistrationAsync() { - if (!await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled).ConfigureAwait(false) || - !await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin).ConfigureAwait(false)) + if (!await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled) || + !await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin)) { throw new UserFriendlyException(L["SelfRegistrationDisabledMessage"]); } @@ -67,6 +84,7 @@ namespace Volo.Abp.Account.Web.Pages.Account [Required] [StringLength(IdentityUserConsts.MaxPasswordLength)] [DataType(DataType.Password)] + [DisableAuditing] public string Password { get; set; } } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/SendSecurityCode.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/SendSecurityCode.cshtml.cs index ab8abd4853..5923d8972c 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/SendSecurityCode.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/SendSecurityCode.cshtml.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.Account.Web.Pages.Account public async Task OnGetAsync() { - var user = await SignInManager.GetTwoFactorAuthenticationUserAsync().ConfigureAwait(false); + var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); if (user == null) { return RedirectToPage("./Login"); diff --git a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj index 880353ceab..09e4b2cc6f 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj +++ b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj @@ -1,5 +1,6 @@ - + + @@ -29,7 +30,6 @@ - diff --git a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj index 2055dfc4ef..027e32bd09 100644 --- a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj +++ b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs index 14d257993c..b11d19b7a6 100644 --- a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs +++ b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs @@ -32,16 +32,16 @@ namespace Volo.Abp.Account AppName = "MVC" }; - await _accountAppService.RegisterAsync(registerDto).ConfigureAwait(false); + await _accountAppService.RegisterAsync(registerDto); var user = await _identityUserRepository.FindByNormalizedUserNameAsync( - _lookupNormalizer.NormalizeName("bob.lee")).ConfigureAwait(false); + _lookupNormalizer.NormalizeName("bob.lee")); user.ShouldNotBeNull(); user.UserName.ShouldBe("bob.lee"); user.Email.ShouldBe("bob.lee@abp.io"); - (await _userManager.CheckPasswordAsync(user, "P@ssW0rd").ConfigureAwait(false)).ShouldBeTrue(); + (await _userManager.CheckPasswordAsync(user, "P@ssW0rd")).ShouldBeTrue(); } } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/FodyWeavers.xml b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/FodyWeavers.xsd b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj index 44c36fd1d1..ce65a161ce 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/FodyWeavers.xml b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/FodyWeavers.xsd b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj index f33375143a..161e952593 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditingStore.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditingStore.cs index 50380549dc..8aaed79d5f 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditingStore.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditingStore.cs @@ -37,13 +37,13 @@ namespace Volo.Abp.AuditLogging { if (!Options.HideErrors) { - await SaveLogAsync(auditInfo).ConfigureAwait(false); + await SaveLogAsync(auditInfo); return; } try { - await SaveLogAsync(auditInfo).ConfigureAwait(false); + await SaveLogAsync(auditInfo); } catch (Exception ex) { @@ -56,8 +56,8 @@ namespace Volo.Abp.AuditLogging { using (var uow = _unitOfWorkManager.Begin(true)) { - await _auditLogRepository.InsertAsync(new AuditLog(_guidGenerator, auditInfo)).ConfigureAwait(false); - await uow.SaveChangesAsync().ConfigureAwait(false); + await _auditLogRepository.InsertAsync(new AuditLog(_guidGenerator, auditInfo)); + await uow.SaveChangesAsync(); } } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/FodyWeavers.xml b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/FodyWeavers.xsd b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj index 93422d8f3f..d94e707ba0 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs index 0b68932224..094f946777 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs @@ -54,7 +54,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore var auditLogs = await query.OrderBy(sorting ?? "executionTime desc") .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); return auditLogs; } @@ -87,7 +87,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore httpStatusCode ); - var totalCount = await query.LongCountAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + var totalCount = await query.LongCountAsync(GetCancellationToken(cancellationToken)); return totalCount; } @@ -129,7 +129,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore .OrderBy(t => t.ExecutionTime) .GroupBy(t => new { t.ExecutionTime.Date }) .Select(g => new { Day = g.Min(t => t.ExecutionTime), avgExecutionTime = g.Average(t => t.ExecutionDuration) }) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); return result.ToDictionary(element => element.Day.ClearTime(), element => element.avgExecutionTime); } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/FodyWeavers.xml b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/FodyWeavers.xsd b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj index 0e86989a77..c22202f7f9 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs index 51ae55d86a..8beeff86a3 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs @@ -55,7 +55,7 @@ namespace Volo.Abp.AuditLogging.MongoDB return await query.OrderBy(sorting ?? "executionTime desc").As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync( @@ -87,7 +87,7 @@ namespace Volo.Abp.AuditLogging.MongoDB ); var count = await query.As>() - .LongCountAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .LongCountAsync(GetCancellationToken(cancellationToken)); return count; } @@ -134,7 +134,7 @@ namespace Volo.Abp.AuditLogging.MongoDB t.ExecutionTime.Day }) .Select(g => new { Day = g.Min(t => t.ExecutionTime), avgExecutionTime = g.Average(t => t.ExecutionDuration) }) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); return result.ToDictionary(element => element.Day.ClearTime(), element => element.avgExecutionTime); } diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj index 8ee9a2e2f6..8868a88e37 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj index b5c7084cf2..ffc1906dce 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj index 157301aecb..ced62e3c1b 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs index e1878bdcc8..f88c10c079 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Net; using System.Threading.Tasks; @@ -117,11 +118,11 @@ namespace Volo.Abp.AuditLogging } }; - await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log1)).ConfigureAwait(false); - await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)).ConfigureAwait(false); + await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log1)); + await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)); //Assert - var logs = await AuditLogRepository.GetListAsync().ConfigureAwait(false); + var logs = await AuditLogRepository.GetListAsync(); logs.ShouldNotBeNull(); logs.ShouldContain(x => x.UserId == userId); logs.ShouldContain(x => x.UserId == userId2); @@ -221,11 +222,11 @@ namespace Volo.Abp.AuditLogging } }; - await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log1)).ConfigureAwait(false); - await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)).ConfigureAwait(false); + await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log1)); + await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)); //Assert - var logs = await AuditLogRepository.GetCountAsync().ConfigureAwait(false); + var logs = await AuditLogRepository.GetCountAsync(); logs.ShouldBe(2); } @@ -243,7 +244,7 @@ namespace Volo.Abp.AuditLogging UserId = userId, ImpersonatorUserId = Guid.NewGuid(), ImpersonatorTenantId = Guid.NewGuid(), - ExecutionTime = DateTime.Parse("2020-01-01 01:00:00"), + ExecutionTime = DateTime.SpecifyKind(DateTime.Parse("2020-01-01 01:00:00"), DateTimeKind.Utc), ExecutionDuration = 45, ClientIpAddress = ipAddress, ClientName = "MyDesktop", @@ -294,7 +295,7 @@ namespace Volo.Abp.AuditLogging UserId = userId2, ImpersonatorUserId = Guid.NewGuid(), ImpersonatorTenantId = Guid.NewGuid(), - ExecutionTime = DateTime.Parse("2020-01-01 03:00:00"), + ExecutionTime = DateTime.SpecifyKind(DateTime.Parse("2020-01-01 03:00:00"), DateTimeKind.Utc), ExecutionDuration = 55, ClientIpAddress = ipAddress, ClientName = "MyDesktop", @@ -323,12 +324,12 @@ namespace Volo.Abp.AuditLogging } }; - await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log1)).ConfigureAwait(false); - await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)).ConfigureAwait(false); + await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log1)); + await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)); //Assert var date = DateTime.Parse("2020-01-01"); - var results = await AuditLogRepository.GetAverageExecutionDurationPerDayAsync(date, date).ConfigureAwait(false); + var results = await AuditLogRepository.GetAverageExecutionDurationPerDayAsync(date, date); results.Count.ShouldBe(1); results.Values.First().ShouldBe(50); // (45 + 55) / 2 } diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditStore_Basic_Tests.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditStore_Basic_Tests.cs index 9744930c09..05dc829440 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditStore_Basic_Tests.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditStore_Basic_Tests.cs @@ -64,7 +64,7 @@ namespace Volo.Abp.AuditLogging }; //Act - await _auditingStore.SaveAsync(auditLog).ConfigureAwait(false); + await _auditingStore.SaveAsync(auditLog); //Assert @@ -170,14 +170,14 @@ namespace Volo.Abp.AuditLogging } }; - await _auditingStore.SaveAsync(log1).ConfigureAwait(false); - await _auditingStore.SaveAsync(log2).ConfigureAwait(false); + await _auditingStore.SaveAsync(log1); + await _auditingStore.SaveAsync(log2); - var allLogsCount = await _auditLogRepository.GetCountAsync().ConfigureAwait(false); + var allLogsCount = await _auditLogRepository.GetCountAsync(); - var onlyLog1QueryResult = await _auditLogRepository.GetListAsync(includeDetails: true, userName: "Douglas").ConfigureAwait(false); + var onlyLog1QueryResult = await _auditLogRepository.GetListAsync(includeDetails: true, userName: "Douglas"); - var onlyLog2QueryResult = await _auditLogRepository.GetListAsync(includeDetails: true, httpStatusCode: HttpStatusCode.BadGateway).ConfigureAwait(false); + var onlyLog2QueryResult = await _auditLogRepository.GetListAsync(includeDetails: true, httpStatusCode: HttpStatusCode.BadGateway); allLogsCount.ShouldBe(2); diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj index 31a70aa5b1..ccfb554d58 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo/Abp/AuditLogging/MultiTenantAuditLog_Tests.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo/Abp/AuditLogging/MultiTenantAuditLog_Tests.cs index 04c885be20..6e92bc6f7f 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo/Abp/AuditLogging/MultiTenantAuditLog_Tests.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo/Abp/AuditLogging/MultiTenantAuditLog_Tests.cs @@ -59,12 +59,12 @@ namespace Volo.Abp.AuditLogging } ); - await scope.SaveAsync().ConfigureAwait(false); + await scope.SaveAsync(); } //Assert - var auditLogs = await _auditLogRepository.GetListAsync(applicationName: applicationName, includeDetails: true).ConfigureAwait(false); + var auditLogs = await _auditLogRepository.GetListAsync(applicationName: applicationName, includeDetails: true); auditLogs.Count.ShouldBe(1); var auditLog = auditLogs.First(); auditLog.EntityChanges.ShouldNotBeNull(); diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/FodyWeavers.xml b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/FodyWeavers.xsd b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj index 3490b31f67..f27272bd28 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj @@ -1,4 +1,6 @@ - + + + Exe diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/FodyWeavers.xml b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/FodyWeavers.xsd b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj index adcf9be1aa..460716fb26 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj @@ -1,4 +1,6 @@ - + + + Exe diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/FodyWeavers.xml b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/FodyWeavers.xsd b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Jobs/SampleJobCreator.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Jobs/SampleJobCreator.cs index 3c05c4abd3..b131c5943d 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Jobs/SampleJobCreator.cs +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Jobs/SampleJobCreator.cs @@ -20,10 +20,10 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.Shared.Jobs public async Task CreateJobsAsync() { - await _backgroundJobManager.EnqueueAsync(new WriteToConsoleGreenJobArgs { Value = "test 1 (green)" }).ConfigureAwait(false); - await _backgroundJobManager.EnqueueAsync(new WriteToConsoleGreenJobArgs { Value = "test 2 (green)" }).ConfigureAwait(false); - await _backgroundJobManager.EnqueueAsync(new WriteToConsoleYellowJobArgs { Value = "test 1 (yellow)" }).ConfigureAwait(false); - await _backgroundJobManager.EnqueueAsync(new WriteToConsoleYellowJobArgs { Value = "test 2 (yellow)" }).ConfigureAwait(false); + await _backgroundJobManager.EnqueueAsync(new WriteToConsoleGreenJobArgs { Value = "test 1 (green)" }); + await _backgroundJobManager.EnqueueAsync(new WriteToConsoleGreenJobArgs { Value = "test 2 (green)" }); + await _backgroundJobManager.EnqueueAsync(new WriteToConsoleYellowJobArgs { Value = "test 1 (yellow)" }); + await _backgroundJobManager.EnqueueAsync(new WriteToConsoleYellowJobArgs { Value = "test 2 (yellow)" }); } } } diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj index 3bd6feee59..582cc3d634 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj @@ -1,4 +1,6 @@ - + + + netstandard2.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/FodyWeavers.xml b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/FodyWeavers.xsd b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj index b3bc53a2ed..6c9c118af4 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj @@ -1,4 +1,6 @@ - + + + Exe diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/FodyWeavers.xml b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/FodyWeavers.xsd b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj index e7334e2348..4c79e9bcfd 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/FodyWeavers.xml b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/FodyWeavers.xsd b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj index 82fd254232..7eb9015b73 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs index 2fe3a0fdda..b8d30b6940 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs @@ -24,38 +24,38 @@ namespace Volo.Abp.BackgroundJobs { return ObjectMapper.Map( await BackgroundJobRepository.FindAsync(jobId) -.ConfigureAwait(false)); + ); } public virtual async Task InsertAsync(BackgroundJobInfo jobInfo) { await BackgroundJobRepository.InsertAsync( ObjectMapper.Map(jobInfo) - ).ConfigureAwait(false); + ); } public virtual async Task> GetWaitingJobsAsync(int maxResultCount) { return ObjectMapper.Map, List>( await BackgroundJobRepository.GetWaitingListAsync(maxResultCount) -.ConfigureAwait(false)); + ); } public virtual async Task DeleteAsync(Guid jobId) { - await BackgroundJobRepository.DeleteAsync(jobId).ConfigureAwait(false); + await BackgroundJobRepository.DeleteAsync(jobId); } public virtual async Task UpdateAsync(BackgroundJobInfo jobInfo) { - var backgroundJobRecord = await BackgroundJobRepository.FindAsync(jobInfo.Id).ConfigureAwait(false); + var backgroundJobRecord = await BackgroundJobRepository.FindAsync(jobInfo.Id); if (backgroundJobRecord == null) { return; } ObjectMapper.Map(jobInfo, backgroundJobRecord); - await BackgroundJobRepository.UpdateAsync(backgroundJobRecord).ConfigureAwait(false); + await BackgroundJobRepository.UpdateAsync(backgroundJobRecord); } } } diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/FodyWeavers.xml b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/FodyWeavers.xsd b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj index eb92972675..7103c0570e 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs index 22b8e6ab46..8c786c9f37 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore public async Task> GetWaitingListAsync(int maxResultCount) { return await GetWaitingListQuery(maxResultCount) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); } private IQueryable GetWaitingListQuery(int maxResultCount) diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/FodyWeavers.xml b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/FodyWeavers.xsd b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj index 4b3184d0ab..56c1391ab9 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs index cd266eeac4..33903c1e9f 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.BackgroundJobs.MongoDB public async Task> GetWaitingListAsync(int maxResultCount) { return await GetWaitingListQuery(maxResultCount) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); } private IMongoQueryable GetWaitingListQuery(int maxResultCount) diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj index c7d43a8e71..1326240199 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs index 94b9375d83..caa9a3c445 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs @@ -26,9 +26,9 @@ namespace Volo.Abp.BackgroundJobs await _backgroundJobStore.InsertAsync( jobInfo - ).ConfigureAwait(false); + ); - var jobInfo2 = await _backgroundJobStore.FindAsync(jobInfo.Id).ConfigureAwait(false); + var jobInfo2 = await _backgroundJobStore.FindAsync(jobInfo.Id); jobInfo2.ShouldNotBeNull(); jobInfo2.Id.ShouldBe(jobInfo.Id); jobInfo2.JobArgs.ShouldBe(jobInfo.JobArgs); diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj index 25434f3b06..e37ab4380f 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj index faece9ea33..3878875e65 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj index 538f9376fb..8563f2b04a 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobRepository_Tests.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobRepository_Tests.cs index 2187db533e..59a2709edd 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobRepository_Tests.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobRepository_Tests.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.BackgroundJobs [InlineData(5)] public async Task GetWaitingListAsync(int maxResultCount) { - var backgroundJobs = await _backgroundJobRepository.GetWaitingListAsync(maxResultCount).ConfigureAwait(false); + var backgroundJobs = await _backgroundJobRepository.GetWaitingListAsync(maxResultCount); backgroundJobs.Count.ShouldBeGreaterThan(0); backgroundJobs.Count.ShouldBeLessThanOrEqualTo(maxResultCount); diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs index 90ec92ea35..16bcc667f5 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.BackgroundJobs CreationTime = _clock.Now.Subtract(TimeSpan.FromMinutes(2)), TryCount = 0 } - ).ConfigureAwait(false); + ); await _backgroundJobRepository.InsertAsync( new BackgroundJobRecord(_testData.JobId2) @@ -49,7 +49,7 @@ namespace Volo.Abp.BackgroundJobs CreationTime = _clock.Now.Subtract(TimeSpan.FromDays(2)), TryCount = 3 } - ).ConfigureAwait(false); + ); await _backgroundJobRepository.InsertAsync( new BackgroundJobRecord(_testData.JobId3) @@ -63,7 +63,7 @@ namespace Volo.Abp.BackgroundJobs CreationTime = _clock.Now.Subtract(TimeSpan.FromMinutes(90)), TryCount = 2 } - ).ConfigureAwait(false); + ); } } } \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/FodyWeavers.xml b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/FodyWeavers.xsd b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj index 27fa209d2c..341f5fdc14 100644 --- a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj @@ -1,7 +1,9 @@ - + + + - netstandard2.1 + netstandard2.0 diff --git a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/FodyWeavers.xml b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/FodyWeavers.xsd b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj index 0f21d360e4..cf886e234f 100644 --- a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj @@ -1,4 +1,6 @@ - + + + netstandard2.0 diff --git a/modules/blogging/app/Volo.BloggingTestApp/FodyWeavers.xml b/modules/blogging/app/Volo.BloggingTestApp/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/FodyWeavers.xsd b/modules/blogging/app/Volo.BloggingTestApp/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index 1ef5fb5c4c..918c42c1ad 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -1,4 +1,6 @@ - + + + netcoreapp3.1 @@ -14,7 +16,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj index dccdef1e0d..ba9aa67e7a 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json new file mode 100644 index 0000000000..bca246ba43 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json @@ -0,0 +1,14 @@ +{ + "culture": "zh-Hant", + "texts": { + "Permission:Blogging": "部落格", + "Permission:Blogs": "部落格", + "Permission:Posts": "文章", + "Permission:Tags": "標籤", + "Permission:Comments": "評論", + "Permission:Management": "管理", + "Permission:Edit": "標及", + "Permission:Create": "新增", + "Permission:Delete": "刪除" + } + } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Application/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Application/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj index a162d644df..9c4070fe25 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj +++ b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj index c71ae5aef5..da706316f9 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hant.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..fcafc171de --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hant.json @@ -0,0 +1,47 @@ +{ + "culture": "zh-Hant", + "texts": { + "Menu:Blogs": "部落格", + "Menu:BlogManagement": "部落格管理", + "Title": "標題", + "Delete": "刪除", + "Reply": "回覆", + "ReplyTo": "回覆 {0}", + "ContinueReading": "繼續閱讀", + "DaysAgo": "{0}天前", + "YearsAgo": "{0}年前", + "MonthsAgo": "{0}個月前", + "WeeksAgo": "{0}週前", + "MinutesAgo": "{0}分前", + "SecondsAgo": "{0}秒前", + "HoursAgo": "{0}小時前", + "Now": "剛剛", + "Content": "內容", + "SeeAll": "查看所有", + "PopularTags": "熱門標籤", + "WiewsWithCount": "{0}人查看", + "LastPosts": "最後的文章", + "LeaveComment": "發表評論", + "TagsInThisArticle": "文章中的標籤", + "Posts": "文章", + "Edit": "編輯", + "BLOG": "部落格", + "CommentDeletionWarningMessage": "評論將被刪除.", + "PostDeletionWarningMessage": "文章將被刪除.", + "BlogDeletionWarningMessage": "部落格將被刪除.", + "AreYouSure": "您確定嗎?", + "CommentWithCount": "{0}個評論", + "Comment": "評論", + "ShareOnTwitter": "分享到Twitter", + "CoverImage": "封面圖", + "CreateANewPost": "新增一篇文章", + "CreateANewBlog": "新增一個部落格", + "WhatIsNew": "最新消息", + "Name": "名稱", + "ShortName": "簡稱", + "CreationTime": "建立時間", + "Description": "描述", + "Blogs": "部落格", + "Tags": "標籤" + } +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj index b30b54fede..a7cbc2c7c6 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj index 122385c76f..e74e255466 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Blogging.EntityFrameworkCore Volo.Blogging.EntityFrameworkCore diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj index 0c688104db..754382f89c 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj index 8965b8782e..94181bf3fe 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj b/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj index 0d299c1f3d..5019b843f2 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/src/Volo.Blogging.Web/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js index 0d8e8b3641..c2a18e083d 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js @@ -9,6 +9,7 @@ serverSide: true, paging: false, info: false, + scrollX: true, searching: false, autoWidth: false, scrollCollapse: true, diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index d85f182bcc..7313becddb 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj index 473f1442c8..926daa142c 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj index dbc49033d3..4c77689067 100644 --- a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj index 8b92f8b67b..ffae92b6c8 100644 --- a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj index cc46eead03..d58c4ce66f 100644 --- a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj index bdc6873c3a..39cc02fafa 100644 --- a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj +++ b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/FodyWeavers.xml b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/FodyWeavers.xsd b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj index 0f9f7bde5e..1173121c3c 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/FodyWeavers.xml b/modules/client-simulation/src/Volo.ClientSimulation.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/FodyWeavers.xsd b/modules/client-simulation/src/Volo.ClientSimulation.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj index 108c048937..ad0ce496f5 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/client-simulation/src/Volo.ClientSimulation/FodyWeavers.xml b/modules/client-simulation/src/Volo.ClientSimulation/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/client-simulation/src/Volo.ClientSimulation/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/client-simulation/src/Volo.ClientSimulation/FodyWeavers.xsd b/modules/client-simulation/src/Volo.ClientSimulation/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/client-simulation/src/Volo.ClientSimulation/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj index 82a5932188..3876e7deb5 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/app/VoloDocs.EntityFrameworkCore/FodyWeavers.xml b/modules/docs/app/VoloDocs.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/app/VoloDocs.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.EntityFrameworkCore/FodyWeavers.xsd b/modules/docs/app/VoloDocs.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/app/VoloDocs.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj index d7f8b49bae..b2b54a234f 100644 --- a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj +++ b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj @@ -1,7 +1,9 @@ - + + + - netstandard2.1 + netstandard2.0 diff --git a/modules/docs/app/VoloDocs.Migrator/FodyWeavers.xml b/modules/docs/app/VoloDocs.Migrator/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/app/VoloDocs.Migrator/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Migrator/FodyWeavers.xsd b/modules/docs/app/VoloDocs.Migrator/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/app/VoloDocs.Migrator/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj b/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj index 7304dda469..e1fba61428 100644 --- a/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj +++ b/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj @@ -1,4 +1,6 @@ - + + + netcoreapp3.1 diff --git a/modules/docs/app/VoloDocs.Web/FodyWeavers.xml b/modules/docs/app/VoloDocs.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/FodyWeavers.xsd b/modules/docs/app/VoloDocs.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hant.json b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hant.json new file mode 100644 index 0000000000..643b875562 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hant.json @@ -0,0 +1,10 @@ +{ + "culture": "zh-Hant", + "texts": { + "DocsTitle": "VoloDocs", + "WelcomeVoloDocs": "歡迎使用VoloDocs!", + "NoProjectWarning": "目前沒有專案!", + "CreateYourFirstProject": "建立您的第一個專案", + "NoProject": "沒有專案!" + } +} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj index c5e164247b..a4243c1701 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj +++ b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj @@ -1,4 +1,6 @@ - + + + netcoreapp3.1 @@ -16,7 +18,7 @@ - + diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj index 2805d03357..16ef215c5c 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hant.json b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hant.json new file mode 100644 index 0000000000..0a8415ccad --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hant.json @@ -0,0 +1,32 @@ +{ + "culture": "zh-Hant", + "texts": { + "Permission:DocumentManagement": "文件管理", + "Permission:Projects": "專案", + "Permission:Edit": "編輯", + "Permission:Delete": "刪除", + "Permission:Create": "建立", + "Menu:DocumentManagement": "文件管理", + "Menu:ProjectManagement": "專案管理", + "CreateANewProject": "建立新專案", + "Edit": "編輯", + "Create": "建立", + "Projects": "專案", + "Name": "名稱", + "ShortName": "簡稱", + "DocumentStoreType": "文件存儲類型", + "Format": "格式", + "ShortNameInfoText": "將用於唯一的URL.", + "DisplayName:Name": "名稱", + "DisplayName:ShortName": "簡稱", + "DisplayName:Format": "格式", + "DisplayName:DefaultDocumentName": "預設文件名稱", + "DisplayName:NavigationDocumentName": "導覽文件名稱", + "DisplayName:MinimumVersion": "最低版本", + "DisplayName:MainWebsiteUrl": "主網站網址", + "DisplayName:LatestVersionBranchName": "最新版本的分支名稱", + "DisplayName:GitHubRootUrl": "GitHub根網址", + "DisplayName:GitHubAccessToken": "GitHub 存取Token ", + "DisplayName:GitHubUserAgent": "GitHub 使用者代理" + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Admin.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Admin.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj index 73d2afc26b..666b4dd79d 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj index 13f2faebf5..50e135a237 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Admin.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Admin.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj index ef87e7a6e4..eb0da981f4 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Admin.Web/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Admin.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Web/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Admin.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js index f1ce283543..d25d04d671 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js +++ b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js @@ -16,6 +16,7 @@ var _dataTable = $('#ProjectsTable').DataTable(abp.libs.datatables.normalizeConfiguration({ processing: true, serverSide: true, + scrollX: true, paging: true, searching: false, autoWidth: false, diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj index ab6da2e1d0..4cad3d9e71 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Application.Contracts/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Application.Contracts/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj b/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj index 2dc6d77b21..15df62ac54 100644 --- a/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj +++ b/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Application/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Application/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj index 1d2f977806..1009305c17 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj +++ b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj b/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj index 185bc84d5b..453026ef95 100644 --- a/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj +++ b/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Domain/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj index 9de0a675ea..234832ef1a 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj +++ b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs index bd399a4f83..c84772ff26 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs @@ -57,7 +57,7 @@ namespace Volo.Docs.GitHub.Documents LocalDirectory = localDirectory, FileName = fileName, Contributors = new List(), - //Contributors = !isNavigationDocument && !isParameterDocument ? await GetContributors(commitHistoryUrl, token, userAgent): new List(), + //Contributors = !isNavigationDocument && !isParameterDocument && !isPartialTemplatesDocumentName ? await GetContributors(commitHistoryUrl, token, userAgent): new List(), Version = version, Content = await DownloadWebContentAsStringAsync(rawDocumentUrl, token, userAgent) }; diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json index 6ca29e5420..743218aeba 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json @@ -15,6 +15,7 @@ "DocumentNotFound": "Ups, vyžádaný dokument neexistuje!", "NavigationDocumentNotFound": "Tato verze nemá navigační dokument!", "DocumentNotFoundInSelectedLanguage": "Tento dokument není dostupný ve vybraném jazyce. Zobrazen dokument ve výchozím jazyce.", - "FilterTopics": "Filtrovat témata" + "FilterTopics": "Filtrovat témata", + "MultipleVersionDocumentInfo": "Tento dokument má více verzí. Vyberte možnosti, které vám nejlépe vyhovují." } } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json new file mode 100644 index 0000000000..34ded108f1 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json @@ -0,0 +1,20 @@ +{ + "culture": "zh-Hant", + "texts": { + "Documents": "文件", + "BackToWebsite": "返回主網站", + "Contributors": "貢獻者", + "ShareOn": "分享到", + "Version": "版本", + "Edit": "編輯", + "Delete": "刪除", + "InThisDocument": "在此文件中", + "GoToTop": "到最上方", + "Projects": "專案", + "NoProjectWarning": "沒有專案!", + "DocumentNotFound": "找不到要求的文件!", + "NavigationDocumentNotFound": "這個版本沒有導覽文件!", + "DocumentNotFoundInSelectedLanguage": "本文件不適用於所選語系,將以預設語系顯示.", + "FilterTopics": "過濾主題" + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/FodyWeavers.xml b/modules/docs/src/Volo.Docs.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj index 1111fa62a2..cd0dbdf97c 100644 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Docs.EntityFrameworkCore Volo.Docs.EntityFrameworkCore diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/FodyWeavers.xml b/modules/docs/src/Volo.Docs.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj index eedcfc905c..f527001c45 100644 --- a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.HttpApi/FodyWeavers.xml b/modules/docs/src/Volo.Docs.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.HttpApi/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj b/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj index 60dfef5bd4..671d5dbbac 100644 --- a/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj +++ b/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.MongoDB/FodyWeavers.xml b/modules/docs/src/Volo.Docs.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.MongoDB/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj b/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj index ebe3500cac..9a5cd19550 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/src/Volo.Docs.Web/FodyWeavers.xml b/modules/docs/src/Volo.Docs.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Web/FodyWeavers.xsd b/modules/docs/src/Volo.Docs.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentPartialTemplateContent.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentPartialTemplateContent.cs new file mode 100644 index 0000000000..5db9fc8164 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentPartialTemplateContent.cs @@ -0,0 +1,9 @@ +namespace Volo.Docs.HtmlConverting +{ + public class DocumentPartialTemplateContent + { + public string Path { get; set; } + + public string Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentPartialTemplateWithValuesDto.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentPartialTemplateWithValuesDto.cs new file mode 100644 index 0000000000..d3ea14921c --- /dev/null +++ b/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentPartialTemplateWithValuesDto.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace Volo.Docs.HtmlConverting +{ + public class DocumentPartialTemplateWithValuesDto + { + public string Path { get; set; } + + public Dictionary Parameters { get; set; } + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/IDocumentSectionRenderer.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/IDocumentSectionRenderer.cs index 2d9511d05b..0738b4fd5c 100644 --- a/modules/docs/src/Volo.Docs.Web/HtmlConverting/IDocumentSectionRenderer.cs +++ b/modules/docs/src/Volo.Docs.Web/HtmlConverting/IDocumentSectionRenderer.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; @@ -8,8 +6,10 @@ namespace Volo.Docs.HtmlConverting { public interface IDocumentSectionRenderer: ITransientDependency { - Task RenderAsync(string doucment, DocumentRenderParameters parameters); + Task RenderAsync(string doucment, DocumentRenderParameters parameters = null, List partialTemplates = null); Task>> GetAvailableParametersAsync(string document); + + Task> GetPartialTemplatesInDocumentAsync(string documentContent); } } diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanDocumentSectionRenderer.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanDocumentSectionRenderer.cs index df95bf985d..4a4f3b2142 100644 --- a/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanDocumentSectionRenderer.cs +++ b/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanDocumentSectionRenderer.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using Scriban; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Volo.Docs.Documents; namespace Volo.Docs.HtmlConverting { @@ -14,6 +16,7 @@ namespace Volo.Docs.HtmlConverting private const string jsonOpener = "````json"; private const string jsonCloser = "````"; private const string docs_param = "//[doc-params]"; + private const string docs_templates = "//[doc-template]"; public ILogger Logger { get; set; } @@ -22,8 +25,13 @@ namespace Volo.Docs.HtmlConverting Logger = NullLogger.Instance; } - public async Task RenderAsync(string document, DocumentRenderParameters parameters = null) + public async Task RenderAsync(string document, DocumentRenderParameters parameters = null, List partialTemplates = null) { + if (partialTemplates != null && partialTemplates.Any()) + { + document = SetPartialTemplates(document, partialTemplates); + } + var scribanTemplate = Template.Parse(document); if (parameters == null) @@ -99,7 +107,7 @@ namespace Volo.Docs.HtmlConverting if (jsonBeginningIndex < 0) { - return (-1,-1,""); + return (-1, -1, ""); } var jsonEndingIndex = document.Substring(jsonBeginningIndex).IndexOf(jsonCloser, StringComparison.Ordinal) + jsonBeginningIndex; @@ -116,5 +124,78 @@ namespace Volo.Docs.HtmlConverting return (-1, -1, ""); } + + public async Task> GetPartialTemplatesInDocumentAsync(string documentContent) + { + var templates = new List(); + + while (documentContent.Contains(jsonOpener)) + { + var afterJsonOpener = documentContent.Substring( + documentContent.IndexOf(jsonOpener, StringComparison.Ordinal) + jsonOpener.Length); + + var betweenJsonOpenerAndCloser = afterJsonOpener.Substring(0, + afterJsonOpener.IndexOf(jsonCloser, StringComparison.Ordinal)); + + documentContent = afterJsonOpener.Substring( + afterJsonOpener.IndexOf(jsonCloser, StringComparison.Ordinal) + jsonCloser.Length); + + if (!betweenJsonOpenerAndCloser.Contains(docs_templates)) + { + continue; + } + + var json = betweenJsonOpenerAndCloser.Substring(betweenJsonOpenerAndCloser.IndexOf(docs_templates, StringComparison.Ordinal) + docs_templates.Length); + + var template = JsonConvert.DeserializeObject(json); + + templates.Add(template); + } + + return templates; + } + + private string SetPartialTemplates(string document, List templates) + { + var newDocument = new StringBuilder(); + + while (document.Contains(jsonOpener)) + { + var beforeJson = document.Substring(0, + document.IndexOf(jsonOpener, StringComparison.Ordinal) + jsonOpener.Length); + + var afterJsonOpener = document.Substring( + document.IndexOf(jsonOpener, StringComparison.Ordinal) + jsonOpener.Length); + + var betweenJsonOpenerAndCloser = afterJsonOpener.Substring(0, + afterJsonOpener.IndexOf(jsonCloser, StringComparison.Ordinal)); + + if (!betweenJsonOpenerAndCloser.Contains(docs_templates)) + { + document = afterJsonOpener.Substring( + afterJsonOpener.IndexOf(jsonCloser, StringComparison.Ordinal) + jsonCloser.Length); + newDocument.Append(beforeJson + betweenJsonOpenerAndCloser + jsonCloser); + continue; + } + + var json = betweenJsonOpenerAndCloser.Substring(betweenJsonOpenerAndCloser.IndexOf(docs_templates, StringComparison.Ordinal) + docs_templates.Length); + + var templatePath = JsonConvert.DeserializeObject(json)?.Path; + + var template = templates.FirstOrDefault(t => t.Path == templatePath); + + var beforeTemplate = document.Substring(0, + document.IndexOf(jsonOpener, StringComparison.Ordinal)); + + newDocument.Append(beforeTemplate + template?.Content + jsonCloser); + + document = afterJsonOpener.Substring( + afterJsonOpener.IndexOf(jsonCloser, StringComparison.Ordinal) + jsonCloser.Length); + } + + newDocument.Append(document); + + return newDocument.ToString(); + } } } diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index c653068baa..82b58ad117 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Volo.Abp; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; using Volo.Abp.Domain.Entities; @@ -60,7 +61,7 @@ namespace Volo.Docs.Pages.Documents.Project public DocumentParametersDto DocumentPreferences { get; set; } - public DocumentRenderParameters UserPreferences { get; set; } + public DocumentRenderParameters UserPreferences { get; set; } = new DocumentRenderParameters(); private readonly IDocumentAppService _documentAppService; private readonly IDocumentToHtmlConverterFactory _documentToHtmlConverterFactory; @@ -394,10 +395,9 @@ namespace Volo.Docs.Pages.Documents.Project await SetDocumentPreferencesAsync(); SetUserPreferences(); - UserPreferences.Add("Document_Language_Code", LanguageCode); - UserPreferences.Add("Document_Version", Version); + var partialTemplates = await GetDocumentPartialTemplatesAsync(); - Document.Content = await _documentSectionRenderer.RenderAsync(Document.Content, UserPreferences); + Document.Content = await _documentSectionRenderer.RenderAsync(Document.Content, UserPreferences, partialTemplates); var converter = _documentToHtmlConverterFactory.Create(Document.Format ?? Project.Format); var content = converter.Convert(Project, Document, GetSpecificVersionOrLatest(), LanguageCode); @@ -418,9 +418,56 @@ namespace Volo.Docs.Pages.Documents.Project Document.Content = content; } + private async Task> GetDocumentPartialTemplatesAsync() + { + var partialTemplatesInDocument = await _documentSectionRenderer.GetPartialTemplatesInDocumentAsync(Document.Content); + + if (!partialTemplatesInDocument?.Any(t => t.Parameters != null) ?? true) + { + return null; + } + + foreach (var partialTemplates in partialTemplatesInDocument) + { + foreach (var parameter in partialTemplates.Parameters) + { + if (!UserPreferences.ContainsKey(parameter.Key)) + { + UserPreferences.Add(parameter.Key, parameter.Value); + } + else + { + UserPreferences[parameter.Key] = parameter.Value; + } + } + } + + var contents = new List(); + + foreach (var partialTemplate in partialTemplatesInDocument) + { + var content = (await _documentAppService.GetAsync(new GetDocumentInput + { + LanguageCode = LanguageCode, + Name = partialTemplate.Path, + ProjectId = Project.Id, + Version = Version + })).Content; + + contents.Add(new DocumentPartialTemplateContent + { + Path = partialTemplate.Path, + Content = content + }); + } + + return contents; + } + private void SetUserPreferences() { - UserPreferences = new DocumentRenderParameters(); + UserPreferences.Add("Document_Language_Code", LanguageCode); + UserPreferences.Add("Document_Version", Version); var cookie = Request.Cookies["AbpDocsPreferences"]; @@ -473,6 +520,7 @@ namespace Volo.Docs.Pages.Documents.Project UserPreferences.Add(parameter.Name + "_Value", parameter.Values.FirstOrDefault().Value); } } + } public async Task SetDocumentPreferencesAsync() @@ -485,6 +533,7 @@ namespace Volo.Docs.Pages.Documents.Project Version = Version }); + if (projectParameters?.Parameters == null) { return; diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js index a95677891e..9cbfd547ab 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js @@ -5,7 +5,6 @@ var $navigation = $("#" + navigationContainerId); - var getShownDocumentLinks = function () { return $navigation.find(".mCSB_container > li a:visible").not(".tree-toggle"); }; @@ -140,6 +139,12 @@ window.history.replaceState({}, document.title, new_uri); }; + var getTenYearsLater = function () { + var tenYearsLater = new Date(); + tenYearsLater.setTime(tenYearsLater.getTime() + (365 * 10 * 24 * 60 * 60 * 1000)); + return tenYearsLater; + }; + var setCookies = function () { var cookie = abp.utils.getCookieValue("AbpDocsPreferences"); @@ -161,7 +166,6 @@ if (splitted.length > 0 && splitted[0] === key) { keyValues[k] = key + "=" + value; - console.log(keyValues[k]); changed = true; } } @@ -171,7 +175,7 @@ } } - abp.utils.setCookieValue("AbpDocsPreferences", keyValues.join('|')); + abp.utils.setCookieValue("AbpDocsPreferences", keyValues.join('|'), getTenYearsLater(), '/'); }; $(".doc-section-combobox").change(function () { diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css index 6b58aea222..cbff2c6272 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css @@ -137,17 +137,17 @@ .docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand strong { font-weight: 300; text-transform: uppercase; - font-size: .9rem; - opacity: .6; } + font-size: .7em; + letter-spacing: 1px; } .docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site { color: #000; - opacity: .15; - transition: .4s; - font-size: .75rem; + opacity: .65; + transition: .2s; + font-size: .8em; font-weight: 300; } .docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site:hover { text-decoration: none; - opacity: .5; } + opacity: 1; } .docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc { font-size: .85em; } .docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc strong { @@ -193,61 +193,63 @@ margin-left: 10px; } .docs-page .docs-content .docs-text-field { padding: 2rem; } - .docs-page .docs-content article.docs-body h1 { - padding-top: 1rem; - font-size: 2.25rem; - padding-bottom: 10px; } - .docs-page .docs-content article.docs-body h2 { - padding-top: 2rem; - padding-bottom: 10px; - font-size: 2rem; } - .docs-page .docs-content article.docs-body h3, .docs-page .docs-content article.docs-body h4, .docs-page .docs-content article.docs-body h5, .docs-page .docs-content article.docs-body h6 { - padding-top: 20px; - padding-bottom: 5px; - font-size: 1.5rem; } - .docs-page .docs-content article.docs-body h1, .docs-page .docs-content article.docs-body h2, .docs-page .docs-content article.docs-body h3, .docs-page .docs-content article.docs-body h4, .docs-page .docs-content article.docs-body h5, .docs-page .docs-content article.docs-body h6 { - position: relative; } - .docs-page .docs-content article.docs-body h1 .anchor, .docs-page .docs-content article.docs-body h2 .anchor, .docs-page .docs-content article.docs-body h3 .anchor, .docs-page .docs-content article.docs-body h4 .anchor, .docs-page .docs-content article.docs-body h5 .anchor, .docs-page .docs-content article.docs-body h6 .anchor { - position: absolute; - right: -26px; - font-size: 18px; - bottom: 5px; - color: #999; - opacity: 0; - transition: .5s; } - .docs-page .docs-content article.docs-body h1:hover .anchor, .docs-page .docs-content article.docs-body h2:hover .anchor, .docs-page .docs-content article.docs-body h3:hover .anchor, .docs-page .docs-content article.docs-body h4:hover .anchor, .docs-page .docs-content article.docs-body h5:hover .anchor, .docs-page .docs-content article.docs-body h6:hover .anchor { - opacity: 1; } - .docs-page .docs-content article.docs-body .blockquote { - margin-bottom: 1rem; - margin-left: 0; - border-left: 2px solid gray; - padding: 1em; - background-color: #eee; - padding-bottom: .2em; } - .docs-page .docs-content article.docs-body img { - max-width: 100%; - border: 1px solid #f4f5f7; - margin: 15px 0 25px; - box-shadow: 0 0 45px #f8f9fa; - border-radius: 6px; } - .docs-page .docs-content article.docs-body table { - display: block; - overflow: auto; - width: 100%; } - .docs-page .docs-content article.docs-body table thead tr { - border-bottom: 2px inset; } - .docs-page .docs-content article.docs-body table th { - font-weight: 600; } - .docs-page .docs-content article.docs-body table td, .docs-page .docs-content article.docs-body table th { - border: 1px solid #dfe2e5; - padding: 6px 13px; } - .docs-page .docs-content article.docs-body table tr { - background-color: #fff; - border-top: 1px solid #c6cbd1; } - .docs-page .docs-content article.docs-body table tr:nth-child(2n) { - background-color: #f6f8fa; } - .docs-page .docs-content article.docs-body table img { - background-color: initial; } + .docs-page .docs-content article.docs-body { + word-break: break-word; } + .docs-page .docs-content article.docs-body h1 { + padding-top: 1rem; + font-size: 2.25rem; + padding-bottom: 10px; } + .docs-page .docs-content article.docs-body h2 { + padding-top: 2rem; + padding-bottom: 10px; + font-size: 2rem; } + .docs-page .docs-content article.docs-body h3, .docs-page .docs-content article.docs-body h4, .docs-page .docs-content article.docs-body h5, .docs-page .docs-content article.docs-body h6 { + padding-top: 20px; + padding-bottom: 5px; + font-size: 1.5rem; } + .docs-page .docs-content article.docs-body h1, .docs-page .docs-content article.docs-body h2, .docs-page .docs-content article.docs-body h3, .docs-page .docs-content article.docs-body h4, .docs-page .docs-content article.docs-body h5, .docs-page .docs-content article.docs-body h6 { + position: relative; } + .docs-page .docs-content article.docs-body h1 .anchor, .docs-page .docs-content article.docs-body h2 .anchor, .docs-page .docs-content article.docs-body h3 .anchor, .docs-page .docs-content article.docs-body h4 .anchor, .docs-page .docs-content article.docs-body h5 .anchor, .docs-page .docs-content article.docs-body h6 .anchor { + position: absolute; + right: -26px; + font-size: 18px; + bottom: 5px; + color: #999; + opacity: 0; + transition: .5s; } + .docs-page .docs-content article.docs-body h1:hover .anchor, .docs-page .docs-content article.docs-body h2:hover .anchor, .docs-page .docs-content article.docs-body h3:hover .anchor, .docs-page .docs-content article.docs-body h4:hover .anchor, .docs-page .docs-content article.docs-body h5:hover .anchor, .docs-page .docs-content article.docs-body h6:hover .anchor { + opacity: 1; } + .docs-page .docs-content article.docs-body .blockquote { + margin-bottom: 1rem; + margin-left: 0; + border-left: 2px solid gray; + padding: 1em; + background-color: #eee; + padding-bottom: .2em; } + .docs-page .docs-content article.docs-body img { + max-width: 100%; + border: 1px solid #f4f5f7; + margin: 15px 0 25px; + box-shadow: 0 0 45px #f8f9fa; + border-radius: 6px; } + .docs-page .docs-content article.docs-body table { + display: block; + overflow: auto; + width: 100%; } + .docs-page .docs-content article.docs-body table thead tr { + border-bottom: 2px inset; } + .docs-page .docs-content article.docs-body table th { + font-weight: 600; } + .docs-page .docs-content article.docs-body table td, .docs-page .docs-content article.docs-body table th { + border: 1px solid #dfe2e5; + padding: 6px 13px; } + .docs-page .docs-content article.docs-body table tr { + background-color: #fff; + border-top: 1px solid #c6cbd1; } + .docs-page .docs-content article.docs-body table tr:nth-child(2n) { + background-color: #f6f8fa; } + .docs-page .docs-content article.docs-body table img { + background-color: initial; } .docs-page .docs-page-index { min-height: 96vh; } .docs-page .docs-page-index #scroll-index { diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.min.css b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.min.css index 4605cb9eff..2111ae8075 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.min.css +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.min.css @@ -1 +1 @@ -body{position:relative;}.docs-page{background:#f5f7f9;}.docs-page .anchorjs-link{transition:all .25s linear;}.docs-page *:hover>.anchorjs-link{margin-left:-1.125em !important;transition:color .25s linear;color:#808080;}.docs-page .anchorjs-link:hover{color:#007bff;text-decoration:none;}.docs-page .docs-sidebar{background:#f5f7f9;padding-right:1rem;position:relative;top:0;left:0;position:fixed;}.docs-page .docs-sidebar .docs-sidebar-wrapper{width:270px;float:right;}.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control{background:none;background:#fff;border:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:focus,.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:active,.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:hover,.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:visited{box-shadow:none;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version{position:relative;padding:0 1rem;margin:.25rem 0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select{border-radius:3px;border:1px solid #e9ecef;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select .input-group-text{padding:.375rem .6rem;font-size:.9rem;width:32px;height:30px;line-height:1;border-radius:0;border:1px solid #e9ecef;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control{padding:0 10px;border:0;min-height:30px;height:30px;font-size:.85em;border-radius:1px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:focus,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:active,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:hover,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:visited,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:focus,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:active,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:hover,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:visited{box-shadow:none;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control{padding-left:6px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-filter{padding:0 1rem;margin:.5rem 0;font-size:.9em;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-filter .filter-icon i.fa{color:#ddd;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list{height:100vh;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list>ul{display:block;height:calc(100vh - 220px);overflow-y:auto;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul{font-size:.935em;list-style:none;padding:0 1rem;margin:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li{margin-left:0;padding-left:24px;display:block;width:100%;position:relative;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a{color:#999;font-weight:700;padding:7px 0;display:block;border-bottom:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a:hover{color:#000;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a.last-link{top:11px;color:#aaa;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li span.tree-toggle{color:#999;padding:7px 0;display:block;border-bottom:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li .plus-icon{font-size:.85em;transition:.3s;width:18px;height:18px;text-align:center;padding:0;line-height:1;border-radius:50%;margin-right:4px;position:absolute;left:2px;top:11px;color:#aaa;cursor:default;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li .plus-icon .fa-long-arrow-right.no-link{color:#555;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li .plus-icon .fa-chevron-right{cursor:pointer;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul{padding:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul li a{font-weight:400;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul li ul{padding:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul li ul li a{font-weight:300;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a{color:#000;transition:.4s;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>span .fa{transform:rotate(90deg);color:#007bff;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree.last-link>span .fa{transform:rotate(0deg);}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand{font-size:1.5rem;color:#000;font-weight:700;padding:20px 0 10px;line-height:1;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand strong{font-weight:300;text-transform:uppercase;font-size:.9rem;opacity:.6;}.docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site{color:#000;opacity:.15;transition:.4s;font-size:.75rem;font-weight:300;}.docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site:hover{text-decoration:none;opacity:.5;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc{font-size:.85em;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc strong{display:block;}.docs-page .docs-content{overflow-x:scroll;}.docs-page .docs-content .contributors{position:absolute;top:15px;right:5px;}.docs-page .docs-content .contributors .contributors-avatar{border-radius:21px;width:21px;height:21px;}.docs-page .docs-content .contributors a{padding:0;width:21px;height:21px;display:inline-block;margin:0 0 0 2px;}.docs-page .docs-content .contributors a:hover{text-decoration:none;}.docs-page .docs-content .docs-link-btns{border-bottom:1px solid #f4f5f7;background:#fdfdfd;padding:10px 20px;margin:0 -15px;text-align:right;font-size:.8em;min-height:40px;}.docs-page .docs-content .docs-link-btns a{color:#999;}.docs-page .docs-content .docs-link-btns a:hover{color:#444;text-decoration:none;}.docs-page .docs-content .docs-link-btns .twitter{color:#00acee;}.docs-page .docs-content .docs-link-btns .linkedin{color:#0077b5;}.docs-page .docs-content .docs-link-btns .email{color:#5a5a5a;}.docs-page .docs-content .docs-link-btns .share-button{margin-left:10px;}.docs-page .docs-content .docs-text-field{padding:2rem;}.docs-page .docs-content article.docs-body h1{padding-top:1rem;font-size:2.25rem;padding-bottom:10px;}.docs-page .docs-content article.docs-body h2{padding-top:2rem;padding-bottom:10px;font-size:2rem;}.docs-page .docs-content article.docs-body h3,.docs-page .docs-content article.docs-body h4,.docs-page .docs-content article.docs-body h5,.docs-page .docs-content article.docs-body h6{padding-top:20px;padding-bottom:5px;font-size:1.5rem;}.docs-page .docs-content article.docs-body h1,.docs-page .docs-content article.docs-body h2,.docs-page .docs-content article.docs-body h3,.docs-page .docs-content article.docs-body h4,.docs-page .docs-content article.docs-body h5,.docs-page .docs-content article.docs-body h6{position:relative;}.docs-page .docs-content article.docs-body h1 .anchor,.docs-page .docs-content article.docs-body h2 .anchor,.docs-page .docs-content article.docs-body h3 .anchor,.docs-page .docs-content article.docs-body h4 .anchor,.docs-page .docs-content article.docs-body h5 .anchor,.docs-page .docs-content article.docs-body h6 .anchor{position:absolute;right:-26px;font-size:18px;bottom:5px;color:#999;opacity:0;transition:.5s;}.docs-page .docs-content article.docs-body h1:hover .anchor,.docs-page .docs-content article.docs-body h2:hover .anchor,.docs-page .docs-content article.docs-body h3:hover .anchor,.docs-page .docs-content article.docs-body h4:hover .anchor,.docs-page .docs-content article.docs-body h5:hover .anchor,.docs-page .docs-content article.docs-body h6:hover .anchor{opacity:1;}.docs-page .docs-content article.docs-body .blockquote{margin-bottom:1rem;margin-left:0;border-left:2px solid #808080;padding:1em;background-color:#eee;padding-bottom:.2em;}.docs-page .docs-content article.docs-body img{max-width:100%;border:1px solid #f4f5f7;margin:15px 0 25px;box-shadow:0 0 45px #f8f9fa;border-radius:6px;}.docs-page .docs-content article.docs-body table{display:block;overflow:auto;width:100%;}.docs-page .docs-content article.docs-body table thead tr{border-bottom:2px inset;}.docs-page .docs-content article.docs-body table th{font-weight:600;}.docs-page .docs-content article.docs-body table td,.docs-page .docs-content article.docs-body table th{border:1px solid #dfe2e5;padding:6px 13px;}.docs-page .docs-content article.docs-body table tr{background-color:#fff;border-top:1px solid #c6cbd1;}.docs-page .docs-content article.docs-body table tr:nth-child(2n){background-color:#f6f8fa;}.docs-page .docs-content article.docs-body table img{background-color:initial;}.docs-page .docs-page-index{min-height:96vh;}.docs-page .docs-page-index #scroll-index{max-height:96vh;}.docs-page .docs-page-index .docs-inner-anchors{position:fixed;top:0;padding:10px;font-size:.9em;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills{font-size:.92em;margin-left:15px;border-left:1px solid #eee;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link{padding:3px 14px 4px;color:#aaa;line-height:1.2;position:relative;border-left:1px solid #eee;border-radius:0;margin-left:-1px;margin-top:1px;margin-bottom:1px;transition:.2s;font-weight:normal;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link.active{border-left:1px solid #007bff;background:none;color:#007bff;font-weight:normal;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-pills .nav-link.active{color:#007bff;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-pills .nav-pills .nav-link.active{color:#007bff;}.docs-page .docs-page-index .docs-inner-anchors .index-scroll{margin-left:-30px;}.docs-page .docs-page-index .docs-inner-anchors .docs-anchors-wrapper{max-width:300px;float:left;}.docs-page .docs-page-index .scroll-top-btn{display:none;font-size:.85em;color:#aaa;text-decoration:none;padding-left:18px;}.docs-page .docs-page-index .scroll-top-btn.showup{display:block;}@media(min-width:1100px){.container{max-width:1080px;}.docs-page .docs-sidebar.dark-sidebar{background:#191919;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select{border:1px solid #333;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control,.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control{background:#191919;border-color:#191919;color:#999;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control{background:#191919;border-color:#191919;color:#999;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control::placeholder{color:#999;opacity:.5;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select label{background:#333;border-color:#333;color:#ddd;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-filter .form-control{background:#333;color:#999;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-filter select{border:0;border-radius:6px;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-filter .filter-icon i.fa{color:#aaa;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a{color:#aaa;border-bottom:0;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a:hover{color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon{font-size:.85em;transition:.3s;width:18px;height:18px;text-align:center;padding:0;line-height:1;border-radius:50%;margin-right:4px;position:absolute;left:2px;top:11px;color:#aaa;cursor:default;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon .fa-long-arrow-right.no-link{color:#555;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon .fa-chevron-right{cursor:pointer;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon.last-link{top:11px;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li span.tree-toggle{color:#555;padding:7px 0;display:block;border-bottom:0;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a{color:#fff;transition:.4s;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a span .fa{color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a span:not(.last-link) .fa{transform:rotate(90deg);color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-top .navbar-logo .navbar-brand{color:#fff;text-transform:uppercase;white-space:unset;}.docs-page .docs-sidebar.dark-sidebar .docs-top .navbar-logo .go-back-site{color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-top .navbar-logo .navbar-logo-desc{color:#ddd;}}@media(min-width:1366px){.container{max-width:1340px;}}@media(min-width:1440px){.container{max-width:1400px;}}@media(max-width:767px){.docs-page .docs-content article.docs-body h1{padding-top:1.5rem;}.docs-page{background:#f5f7f9;}.docs-page>.container-fluid{display:block;}.docs-page>.container-fluid>.row{display:block;}.docs-page .docs-sidebar{position:fixed;max-width:100%;width:100%;display:block;padding:0 !important;top:0;left:0;z-index:100;right:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper{max-width:100%;width:100%;top:0;position:relative;margin:0 !important;height:72px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list{padding:.5rem 1.5rem 2rem 1.5rem;position:fixed;top:70px;font-size:17px;left:0;width:100%;z-index:100;background:#f5f7f9;display:none;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list .docs-filter{padding:0 0 1rem !important;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version label{width:36px;text-align:center;padding-left:0;padding-right:0;display:inline-block;line-height:26px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version input.form-control{padding-left:12px !important;}.docs-page .docs-sidebar .docs-top .navbar-logo{padding:0;padding-top:.3rem;display:block;text-align:center;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand{font-size:1.5rem;font-weight:700;display:block;margin-right:0;padding:7px 0 10px;text-transform:uppercase;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand .docs-logo{width:110px;}.docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site{display:none;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc{font-size:1em;display:none;}.docs-page .docs-sidebar .docs-top .open-dmenu{position:absolute;top:10px;left:20px;}.docs-page .docs-content{padding-top:72px;max-width:100%;display:block !important;}.docs-page .docs-content .docs-text-field{padding:1rem 1.5rem;}.docs-page .docs-page-index{display:none;}}.for-mobile{display:none;}.for-desktop{display:inline-block;}pre[class*="language-"]{padding:1.4em 2em !important;margin:15px 0 25px !important;border-radius:6px;}code{padding:.2em .4em;margin:0;font-size:82%;background-color:#f0f1f3;border-radius:3px;color:#28a745;}pre code{padding:0;}pre .token.keyword{color:#569cd6;}pre .token.atrule,pre .token.attr-value,pre .token.function,pre .token.class-name{color:#d69d85;}:not(pre)>code[class*="language-"],pre[class*="language-"]{background:#191919 !important;}div.code-toolbar>.toolbar span{cursor:default;}div.code-toolbar>.toolbar a{cursor:copy;}@media(max-width:767px){body{font-size:14px;}.for-mobile{display:inline-block;}.for-desktop{display:none;}.close-mmenu,.close-dmenu{position:absolute;top:-78px;left:25px;color:#fff;font-size:68px;background:#fff;opacity:0;}.navbar{padding:.5rem 1.75rem;}.navbar .navbar-collapse{background:#38003d;position:fixed;top:86px;left:0;width:100%;height:100vh;height:calc(100vh - 86px);z-index:100 !important;}.navbar .navbar-collapse .navbar-nav{height:100vh;padding:20px 30px;overflow:auto;}.navbar .navbar-collapse .navbar-nav .nav-link{padding:1.2rem !important;}.navbar .navbar-toggler{padding:.5rem .75rem;font-size:1.5rem;line-height:1;background-color:transparent;border:0;border-radius:.25rem;color:#fff !important;margin-left:-1rem;}.section-with-logos img{margin:15px;opacity:1;-webkit-filter:grayscale(0%);filter:grayscale(0%);}span.code-arrow{padding:0 0 0;display:block;transform:rotate(90deg);font-size:2em;}.mb-5,.my-5{margin-bottom:2rem !important;}}@media screen and (max-width:767px){.navbar-logo .navbar-brand{display:inline-block;margin:0 auto !important;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}.alert-criteria{padding:1.25em 1.5em;max-width:100%;}.alert-criteria p.alert-p{font-size:.96em;}.alert-criteria .input-group .input-group-text,.alert-criteria .input-group .form-control{font-size:.96em;}@media screen and (max-width:767px){.alert-criteria .input-group .input-group-text,.alert-criteria .input-group .form-control{font-size:.88em;}}.alert-criteria .input-group .input-group-text{color:#004085;background-color:#bddcfd;border:1px solid #bddcfd;}@media screen and (max-width:1366px){.alert-criteria .input-group .input-group-text{display:none;}}.alert-criteria .input-group .form-control{color:#004085;background-color:#fff;border:1px solid #bddcfd;}@media screen and (max-width:1366px){.alert-criteria .input-group .form-control{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;}}.scrolledMore{padding-top:107px;}.scrolledMore .alert-criteria{position:fixed;top:0;z-index:10;border:0;border-radius:0;margin-left:-47px;padding:.5em .75em;}@media screen and (max-width:767px){.scrolledMore .alert-criteria{top:72px;margin-left:-36px;}}.scrolledMore .alert-criteria p.alert-p{display:none;} \ No newline at end of file +body{position:relative;}.docs-page{background:#f5f7f9;}.docs-page .anchorjs-link{transition:all .25s linear;}.docs-page *:hover>.anchorjs-link{margin-left:-1.125em !important;transition:color .25s linear;color:#808080;}.docs-page .anchorjs-link:hover{color:#007bff;text-decoration:none;}.docs-page .docs-sidebar{background:#f5f7f9;padding-right:1rem;position:relative;top:0;left:0;position:fixed;}.docs-page .docs-sidebar .docs-sidebar-wrapper{width:270px;float:right;}.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control{background:none;background:#fff;border:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:focus,.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:active,.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:hover,.docs-page .docs-sidebar .docs-sidebar-wrapper input.form-control:visited{box-shadow:none;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version{position:relative;padding:0 1rem;margin:.25rem 0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select{border-radius:3px;border:1px solid #e9ecef;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select .input-group-text{padding:.375rem .6rem;font-size:.9rem;width:32px;height:30px;line-height:1;border-radius:0;border:1px solid #e9ecef;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control{padding:0 10px;border:0;min-height:30px;height:30px;font-size:.85em;border-radius:1px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:focus,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:active,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:hover,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:visited,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:focus,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:active,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:hover,.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:visited{box-shadow:none;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control{padding-left:6px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-filter{padding:0 1rem;margin:.5rem 0;font-size:.9em;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-filter .filter-icon i.fa{color:#ddd;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list{height:100vh;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list>ul{display:block;height:calc(100vh - 220px);overflow-y:auto;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul{font-size:.935em;list-style:none;padding:0 1rem;margin:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li{margin-left:0;padding-left:24px;display:block;width:100%;position:relative;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a{color:#999;font-weight:700;padding:7px 0;display:block;border-bottom:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a:hover{color:#000;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a.last-link{top:11px;color:#aaa;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li span.tree-toggle{color:#999;padding:7px 0;display:block;border-bottom:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li .plus-icon{font-size:.85em;transition:.3s;width:18px;height:18px;text-align:center;padding:0;line-height:1;border-radius:50%;margin-right:4px;position:absolute;left:2px;top:11px;color:#aaa;cursor:default;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li .plus-icon .fa-long-arrow-right.no-link{color:#555;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li .plus-icon .fa-chevron-right{cursor:pointer;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul{padding:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul li a{font-weight:400;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul li ul{padding:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li ul li ul li a{font-weight:300;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a{color:#000;transition:.4s;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>span .fa{transform:rotate(90deg);color:#007bff;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree.last-link>span .fa{transform:rotate(0deg);}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand{font-size:1.5rem;color:#000;font-weight:700;padding:20px 0 10px;line-height:1;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand strong{font-weight:300;text-transform:uppercase;font-size:.7em;letter-spacing:1px;}.docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site{color:#000;opacity:.65;transition:.2s;font-size:.8em;font-weight:300;}.docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site:hover{text-decoration:none;opacity:1;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc{font-size:.85em;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc strong{display:block;}.docs-page .docs-content{overflow-x:scroll;}.docs-page .docs-content .contributors{position:absolute;top:15px;right:5px;}.docs-page .docs-content .contributors .contributors-avatar{border-radius:21px;width:21px;height:21px;}.docs-page .docs-content .contributors a{padding:0;width:21px;height:21px;display:inline-block;margin:0 0 0 2px;}.docs-page .docs-content .contributors a:hover{text-decoration:none;}.docs-page .docs-content .docs-link-btns{border-bottom:1px solid #f4f5f7;background:#fdfdfd;padding:10px 20px;margin:0 -15px;text-align:right;font-size:.8em;min-height:40px;}.docs-page .docs-content .docs-link-btns a{color:#999;}.docs-page .docs-content .docs-link-btns a:hover{color:#444;text-decoration:none;}.docs-page .docs-content .docs-link-btns .twitter{color:#00acee;}.docs-page .docs-content .docs-link-btns .linkedin{color:#0077b5;}.docs-page .docs-content .docs-link-btns .email{color:#5a5a5a;}.docs-page .docs-content .docs-link-btns .share-button{margin-left:10px;}.docs-page .docs-content .docs-text-field{padding:2rem;}.docs-page .docs-content article.docs-body{word-break:break-word;}.docs-page .docs-content article.docs-body h1{padding-top:1rem;font-size:2.25rem;padding-bottom:10px;}.docs-page .docs-content article.docs-body h2{padding-top:2rem;padding-bottom:10px;font-size:2rem;}.docs-page .docs-content article.docs-body h3,.docs-page .docs-content article.docs-body h4,.docs-page .docs-content article.docs-body h5,.docs-page .docs-content article.docs-body h6{padding-top:20px;padding-bottom:5px;font-size:1.5rem;}.docs-page .docs-content article.docs-body h1,.docs-page .docs-content article.docs-body h2,.docs-page .docs-content article.docs-body h3,.docs-page .docs-content article.docs-body h4,.docs-page .docs-content article.docs-body h5,.docs-page .docs-content article.docs-body h6{position:relative;}.docs-page .docs-content article.docs-body h1 .anchor,.docs-page .docs-content article.docs-body h2 .anchor,.docs-page .docs-content article.docs-body h3 .anchor,.docs-page .docs-content article.docs-body h4 .anchor,.docs-page .docs-content article.docs-body h5 .anchor,.docs-page .docs-content article.docs-body h6 .anchor{position:absolute;right:-26px;font-size:18px;bottom:5px;color:#999;opacity:0;transition:.5s;}.docs-page .docs-content article.docs-body h1:hover .anchor,.docs-page .docs-content article.docs-body h2:hover .anchor,.docs-page .docs-content article.docs-body h3:hover .anchor,.docs-page .docs-content article.docs-body h4:hover .anchor,.docs-page .docs-content article.docs-body h5:hover .anchor,.docs-page .docs-content article.docs-body h6:hover .anchor{opacity:1;}.docs-page .docs-content article.docs-body .blockquote{margin-bottom:1rem;margin-left:0;border-left:2px solid #808080;padding:1em;background-color:#eee;padding-bottom:.2em;}.docs-page .docs-content article.docs-body img{max-width:100%;border:1px solid #f4f5f7;margin:15px 0 25px;box-shadow:0 0 45px #f8f9fa;border-radius:6px;}.docs-page .docs-content article.docs-body table{display:block;overflow:auto;width:100%;}.docs-page .docs-content article.docs-body table thead tr{border-bottom:2px inset;}.docs-page .docs-content article.docs-body table th{font-weight:600;}.docs-page .docs-content article.docs-body table td,.docs-page .docs-content article.docs-body table th{border:1px solid #dfe2e5;padding:6px 13px;}.docs-page .docs-content article.docs-body table tr{background-color:#fff;border-top:1px solid #c6cbd1;}.docs-page .docs-content article.docs-body table tr:nth-child(2n){background-color:#f6f8fa;}.docs-page .docs-content article.docs-body table img{background-color:initial;}.docs-page .docs-page-index{min-height:96vh;}.docs-page .docs-page-index #scroll-index{max-height:96vh;}.docs-page .docs-page-index .docs-inner-anchors{position:fixed;top:0;padding:10px;font-size:.9em;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills{font-size:.92em;margin-left:15px;border-left:1px solid #eee;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link{padding:3px 14px 4px;color:#aaa;line-height:1.2;position:relative;border-left:1px solid #eee;border-radius:0;margin-left:-1px;margin-top:1px;margin-bottom:1px;transition:.2s;font-weight:normal;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link.active{border-left:1px solid #007bff;background:none;color:#007bff;font-weight:normal;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-pills .nav-link.active{color:#007bff;}.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-pills .nav-pills .nav-link.active{color:#007bff;}.docs-page .docs-page-index .docs-inner-anchors .index-scroll{margin-left:-30px;}.docs-page .docs-page-index .docs-inner-anchors .docs-anchors-wrapper{max-width:300px;float:left;}.docs-page .docs-page-index .scroll-top-btn{display:none;font-size:.85em;color:#aaa;text-decoration:none;padding-left:18px;}.docs-page .docs-page-index .scroll-top-btn.showup{display:block;}@media(min-width:1100px){.container{max-width:1080px;}.docs-page .docs-sidebar.dark-sidebar{background:#191919;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select{border:1px solid #333;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control,.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control{background:#191919;border-color:#191919;color:#999;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control{background:#191919;border-color:#191919;color:#999;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control::placeholder{color:#999;opacity:.5;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-version .version-select label{background:#333;border-color:#333;color:#ddd;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-filter .form-control{background:#333;color:#999;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-filter select{border:0;border-radius:6px;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-filter .filter-icon i.fa{color:#aaa;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a{color:#aaa;border-bottom:0;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a:hover{color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon{font-size:.85em;transition:.3s;width:18px;height:18px;text-align:center;padding:0;line-height:1;border-radius:50%;margin-right:4px;position:absolute;left:2px;top:11px;color:#aaa;cursor:default;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon .fa-long-arrow-right.no-link{color:#555;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon .fa-chevron-right{cursor:pointer;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li a .plus-icon.last-link{top:11px;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li span.tree-toggle{color:#555;padding:7px 0;display:block;border-bottom:0;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a{color:#fff;transition:.4s;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a span .fa{color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-sidebar-wrapper .docs-tree-list ul li.selected-tree>a span:not(.last-link) .fa{transform:rotate(90deg);color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-top .navbar-logo .navbar-brand{color:#fff;text-transform:uppercase;white-space:unset;}.docs-page .docs-sidebar.dark-sidebar .docs-top .navbar-logo .go-back-site{color:#fff;}.docs-page .docs-sidebar.dark-sidebar .docs-top .navbar-logo .navbar-logo-desc{color:#ddd;}}@media(min-width:1366px){.container{max-width:1340px;}}@media(min-width:1440px){.container{max-width:1400px;}}@media(max-width:767px){.docs-page .docs-content article.docs-body h1{padding-top:1.5rem;}.docs-page{background:#f5f7f9;}.docs-page>.container-fluid{display:block;}.docs-page>.container-fluid>.row{display:block;}.docs-page .docs-sidebar{position:fixed;max-width:100%;width:100%;display:block;padding:0 !important;top:0;left:0;z-index:100;right:0;}.docs-page .docs-sidebar .docs-sidebar-wrapper{max-width:100%;width:100%;top:0;position:relative;margin:0 !important;height:72px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list{padding:.5rem 1.5rem 2rem 1.5rem;position:fixed;top:70px;font-size:17px;left:0;width:100%;z-index:100;background:#f5f7f9;display:none;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-tree-list .docs-filter{padding:0 0 1rem !important;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version label{width:36px;text-align:center;padding-left:0;padding-right:0;display:inline-block;line-height:26px;}.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version input.form-control{padding-left:12px !important;}.docs-page .docs-sidebar .docs-top .navbar-logo{padding:0;padding-top:.3rem;display:block;text-align:center;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand{font-size:1.5rem;font-weight:700;display:block;margin-right:0;padding:7px 0 10px;text-transform:uppercase;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-brand .docs-logo{width:110px;}.docs-page .docs-sidebar .docs-top .navbar-logo .go-back-site{display:none;}.docs-page .docs-sidebar .docs-top .navbar-logo .navbar-logo-desc{font-size:1em;display:none;}.docs-page .docs-sidebar .docs-top .open-dmenu{position:absolute;top:10px;left:20px;}.docs-page .docs-content{padding-top:72px;max-width:100%;display:block !important;}.docs-page .docs-content .docs-text-field{padding:1rem 1.5rem;}.docs-page .docs-page-index{display:none;}}.for-mobile{display:none;}.for-desktop{display:inline-block;}pre[class*="language-"]{padding:1.4em 2em !important;margin:15px 0 25px !important;border-radius:6px;}code{padding:.2em .4em;margin:0;font-size:82%;background-color:#f0f1f3;border-radius:3px;color:#28a745;}pre code{padding:0;}pre .token.keyword{color:#569cd6;}pre .token.atrule,pre .token.attr-value,pre .token.function,pre .token.class-name{color:#d69d85;}:not(pre)>code[class*="language-"],pre[class*="language-"]{background:#191919 !important;}div.code-toolbar>.toolbar span{cursor:default;}div.code-toolbar>.toolbar a{cursor:copy;}@media(max-width:767px){body{font-size:14px;}.for-mobile{display:inline-block;}.for-desktop{display:none;}.close-mmenu,.close-dmenu{position:absolute;top:-78px;left:25px;color:#fff;font-size:68px;background:#fff;opacity:0;}.navbar{padding:.5rem 1.75rem;}.navbar .navbar-collapse{background:#38003d;position:fixed;top:86px;left:0;width:100%;height:100vh;height:calc(100vh - 86px);z-index:100 !important;}.navbar .navbar-collapse .navbar-nav{height:100vh;padding:20px 30px;overflow:auto;}.navbar .navbar-collapse .navbar-nav .nav-link{padding:1.2rem !important;}.navbar .navbar-toggler{padding:.5rem .75rem;font-size:1.5rem;line-height:1;background-color:transparent;border:0;border-radius:.25rem;color:#fff !important;margin-left:-1rem;}.section-with-logos img{margin:15px;opacity:1;-webkit-filter:grayscale(0%);filter:grayscale(0%);}span.code-arrow{padding:0 0 0;display:block;transform:rotate(90deg);font-size:2em;}.mb-5,.my-5{margin-bottom:2rem !important;}}@media screen and (max-width:767px){.navbar-logo .navbar-brand{display:inline-block;margin:0 auto !important;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}.alert-criteria{padding:1.25em 1.5em;max-width:100%;}.alert-criteria p.alert-p{font-size:.96em;}.alert-criteria .input-group .input-group-text,.alert-criteria .input-group .form-control{font-size:.96em;}@media screen and (max-width:767px){.alert-criteria .input-group .input-group-text,.alert-criteria .input-group .form-control{font-size:.88em;}}.alert-criteria .input-group .input-group-text{color:#004085;background-color:#bddcfd;border:1px solid #bddcfd;}@media screen and (max-width:1366px){.alert-criteria .input-group .input-group-text{display:none;}}.alert-criteria .input-group .form-control{color:#004085;background-color:#fff;border:1px solid #bddcfd;}@media screen and (max-width:1366px){.alert-criteria .input-group .form-control{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;}}.scrolledMore{padding-top:107px;}.scrolledMore .alert-criteria{position:fixed;top:0;z-index:10;border:0;border-radius:0;margin-left:-47px;padding:.5em .75em;}@media screen and (max-width:767px){.scrolledMore .alert-criteria{top:72px;margin-left:-36px;}}.scrolledMore .alert-criteria p.alert-p{display:none;} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss index cf6e577a28..771070f775 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss @@ -233,21 +233,21 @@ body { strong { font-weight: 300; text-transform: uppercase; - font-size: .9rem; - opacity: .6; + font-size: .7em; + letter-spacing: 1px; } } .go-back-site { color: #000; - opacity: .15; - transition: .4s; - font-size: .75rem; + opacity: .65; + transition: .2s; + font-size: .8em; font-weight: 300; &:hover { text-decoration: none; - opacity: .5; + opacity: 1; } } @@ -329,6 +329,8 @@ body { } article.docs-body { + word-break: break-word; + h1 { padding-top: 1rem; font-size: 2.25rem; diff --git a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj index 2adfb50de0..2e89e9b255 100644 --- a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj +++ b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj b/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj index 1063314379..91eb42aaf2 100644 --- a/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj +++ b/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj b/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj index 4b86efc543..2e4fcd6402 100644 --- a/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj +++ b/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj b/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj index ea4e45c897..5483881192 100644 --- a/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj +++ b/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj b/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj index c17dc2c2da..7f8c963c0c 100644 --- a/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj +++ b/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj index 3a8d3cb7d9..dac64c24c1 100644 --- a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj +++ b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj b/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj index aeed82e1dd..7a19db874e 100644 --- a/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj +++ b/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj index 760805086f..09376e7f2a 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj index 243ec87813..eab014478e 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs index 2290e79f00..097ea7ffa0 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.FeatureManagement public virtual async Task GetAsync([NotNull] string providerName, [NotNull] string providerKey) { - await CheckProviderPolicy(providerName).ConfigureAwait(false); + await CheckProviderPolicy(providerName); var featureDefinitions = _featureDefinitionManager.GetAll(); var features = new List(); @@ -48,7 +48,7 @@ namespace Volo.Abp.FeatureManagement ValueType = featureDefinition.ValueType, Description = featureDefinition.Description?.Localize(_stringLocalizerFactory), ParentName = featureDefinition.Parent?.Name, - Value = await _featureManager.GetOrNullAsync(featureDefinition.Name, providerName, providerKey).ConfigureAwait(false) + Value = await _featureManager.GetOrNullAsync(featureDefinition.Name, providerName, providerKey) }); } @@ -59,11 +59,11 @@ namespace Volo.Abp.FeatureManagement public virtual async Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateFeaturesDto input) { - await CheckProviderPolicy(providerName).ConfigureAwait(false); + await CheckProviderPolicy(providerName); foreach (var feature in input.Features) { - await _featureManager.SetAsync(feature.Name, feature.Value, providerName, providerKey).ConfigureAwait(false); + await _featureManager.SetAsync(feature.Name, feature.Value, providerName, providerKey); } } @@ -88,7 +88,7 @@ namespace Volo.Abp.FeatureManagement throw new AbpException($"No policy defined to get/set permissions for the provider '{policyName}'. Use {nameof(FeatureManagementOptions)} to map the policy."); } - await AuthorizationService.CheckAsync(policyName).ConfigureAwait(false); + await AuthorizationService.CheckAsync(policyName); } } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj index bfa20270c8..5ffd761bf0 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hant.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hant.json new file mode 100644 index 0000000000..bc4dbf268f --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "Features": "功能", + "NoFeatureFoundMessage": "沒有可用的功能." + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj index 8b29b704ce..10033847c2 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementProvider.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementProvider.cs index 58353321fa..1d0c59773b 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementProvider.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementProvider.cs @@ -16,17 +16,17 @@ namespace Volo.Abp.FeatureManagement public async Task GetOrNullAsync(FeatureDefinition feature, string providerKey) { - return await Store.GetOrNullAsync(feature.Name, Name, NormalizeProviderKey(providerKey)).ConfigureAwait(false); + return await Store.GetOrNullAsync(feature.Name, Name, NormalizeProviderKey(providerKey)); } public virtual async Task SetAsync(FeatureDefinition feature, string value, string providerKey) { - await Store.SetAsync(feature.Name, value, Name, NormalizeProviderKey(providerKey)).ConfigureAwait(false); + await Store.SetAsync(feature.Name, value, Name, NormalizeProviderKey(providerKey)); } public virtual async Task ClearAsync(FeatureDefinition feature, string providerKey) { - await Store.DeleteAsync(feature.Name, Name, NormalizeProviderKey(providerKey)).ConfigureAwait(false); + await Store.DeleteAsync(feature.Name, Name, NormalizeProviderKey(providerKey)); } protected virtual string NormalizeProviderKey(string providerKey) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementStore.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementStore.cs index 2970296381..94c4d48067 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementStore.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementStore.cs @@ -23,52 +23,52 @@ namespace Volo.Abp.FeatureManagement public async Task GetOrNullAsync(string name, string providerName, string providerKey) { - var cacheItem = await GetCacheItemAsync(name, providerName, providerKey).ConfigureAwait(false); + var cacheItem = await GetCacheItemAsync(name, providerName, providerKey); return cacheItem.Value; } public async Task SetAsync(string name, string value, string providerName, string providerKey) { - var featureValue = await FeatureValueRepository.FindAsync(name, providerName, providerKey).ConfigureAwait(false); + var featureValue = await FeatureValueRepository.FindAsync(name, providerName, providerKey); if (featureValue == null) { featureValue = new FeatureValue(GuidGenerator.Create(), name, value, providerName, providerKey); - await FeatureValueRepository.InsertAsync(featureValue).ConfigureAwait(false); + await FeatureValueRepository.InsertAsync(featureValue); } else { featureValue.Value = value; - await FeatureValueRepository.UpdateAsync(featureValue).ConfigureAwait(false); + await FeatureValueRepository.UpdateAsync(featureValue); } } public async Task DeleteAsync(string name, string providerName, string providerKey) { - var featureValue = await FeatureValueRepository.FindAsync(name, providerName, providerKey).ConfigureAwait(false); + var featureValue = await FeatureValueRepository.FindAsync(name, providerName, providerKey); if (featureValue != null) { - await FeatureValueRepository.DeleteAsync(featureValue).ConfigureAwait(false); + await FeatureValueRepository.DeleteAsync(featureValue); } } protected virtual async Task GetCacheItemAsync(string name, string providerName, string providerKey) { var cacheKey = CalculateCacheKey(name, providerName, providerKey); - var cacheItem = await Cache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await Cache.GetAsync(cacheKey); if (cacheItem != null) { return cacheItem; } - var featureValue = await FeatureValueRepository.FindAsync(name, providerName, providerKey).ConfigureAwait(false); + var featureValue = await FeatureValueRepository.FindAsync(name, providerName, providerKey); cacheItem = new FeatureValueCacheItem(featureValue?.Value); await Cache.SetAsync( cacheKey, cacheItem - ).ConfigureAwait(false); + ); return cacheItem; } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManager.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManager.cs index 8249166f20..06ca345bf6 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManager.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManager.cs @@ -82,7 +82,7 @@ namespace Volo.Abp.FeatureManagement var providerValue = await provider.GetOrNullAsync( feature, provider.Name == providerName ? providerKey : null - ).ConfigureAwait(false); + ); if (providerValue != null) { @@ -123,7 +123,7 @@ namespace Volo.Abp.FeatureManagement if (providers.Count > 1 && !forceToSet && value != null) { - var fallbackValue = await GetOrNullInternalAsync(name, providers[1].Name, null).ConfigureAwait(false); + var fallbackValue = await GetOrNullInternalAsync(name, providers[1].Name, null); if (fallbackValue == value) { //Clear the value if it's same as it's fallback value @@ -139,14 +139,14 @@ namespace Volo.Abp.FeatureManagement { foreach (var provider in providers) { - await provider.ClearAsync(feature, providerKey).ConfigureAwait(false); + await provider.ClearAsync(feature, providerKey); } } else { foreach (var provider in providers) { - await provider.SetAsync(feature, value, providerKey).ConfigureAwait(false); + await provider.SetAsync(feature, value, providerKey); } } } @@ -172,7 +172,7 @@ namespace Volo.Abp.FeatureManagement value = await provider.GetOrNullAsync( feature, provider.Name == providerName ? providerKey : null - ).ConfigureAwait(false); + ); if (value != null) { diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator.cs index 1d13d46e0a..63e207b1e7 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.FeatureManagement eventData.Entity.ProviderKey ); - await Cache.RemoveAsync(cacheKey).ConfigureAwait(false); + await Cache.RemoveAsync(cacheKey); } protected virtual string CalculateCacheKey(string name, string providerName, string providerKey) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj index 297d7fcaa4..ac13799b80 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs index 87251ff366..9545ac36b4 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore return await DbSet .FirstOrDefaultAsync( s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey - ).ConfigureAwait(false); + ); } public async Task> GetListAsync(string providerName, string providerKey) @@ -28,7 +28,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore return await DbSet .Where( s => s.ProviderName == providerName && s.ProviderKey == providerKey - ).ToListAsync().ConfigureAwait(false); + ).ToListAsync(); } } } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj index a99f8e0bfb..1a784f6e6c 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj index d49cd4f813..c809224e43 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj index 5f4d23bf4e..44c720110d 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs index 62e112b764..f57d125dce 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs @@ -19,14 +19,14 @@ namespace Volo.Abp.FeatureManagement.MongoDB public async Task FindAsync(string name, string providerName, string providerKey) { return await GetMongoQueryable() - .FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey).ConfigureAwait(false); + .FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey); } public async Task> GetListAsync(string providerName, string providerKey) { return await GetMongoQueryable() .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); } } } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FodyWeavers.xml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FodyWeavers.xsd b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs index 4360e0d72c..d9e0d7b2c4 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement public async Task OnGetAsync() { - FeatureListDto = await _featureAppService.GetAsync(ProviderName, ProviderKey).ConfigureAwait(false); + FeatureListDto = await _featureAppService.GetAsync(ProviderName, ProviderKey); } public async Task OnPostAsync() @@ -50,7 +50,7 @@ namespace Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement }).ToList() }; - await _featureAppService.UpdateAsync(ProviderName, ProviderKey, features).ConfigureAwait(false); + await _featureAppService.UpdateAsync(ProviderName, ProviderKey, features); return NoContent(); } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj index e44deb17e7..b4917d34d6 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj index ef81b4b9ea..19124ccf85 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureAppService_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureAppService_Tests.cs index 8987a232b0..b86e6be013 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureAppService_Tests.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureAppService_Tests.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.FeatureManagement Login(_testData.User1Id); var featureList = await _featureAppService.GetAsync(EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false); + TestEditionIds.Regular.ToString()); featureList.ShouldNotBeNull(); featureList.Features.ShouldContain(feature => feature.Name == TestFeatureDefinitionProvider.SocialLogins); @@ -61,10 +61,10 @@ namespace Volo.Abp.FeatureManagement Value = false.ToString().ToLowerInvariant() } } - }).ConfigureAwait(false); + }); (await _featureAppService.GetAsync(EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).Features.Any(x => + TestEditionIds.Regular.ToString())).Features.Any(x => x.Name == TestFeatureDefinitionProvider.SocialLogins && x.Value == false.ToString().ToLowerInvariant()) .ShouldBeTrue(); diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj index 585f399d3e..95793ffff4 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManager_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManager_Tests.cs index ac75fdd86e..d86bcfaa48 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManager_Tests.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManager_Tests.cs @@ -27,63 +27,63 @@ namespace Volo.Abp.FeatureManagement (await _featureManager.GetOrNullDefaultAsync( TestFeatureDefinitionProvider.SocialLogins - ).ConfigureAwait(false)).ShouldBeNull(); + )).ShouldBeNull(); (await _featureManager.GetOrNullDefaultAsync( TestFeatureDefinitionProvider.DailyAnalysis - ).ConfigureAwait(false)).ShouldBe(false.ToString().ToLowerInvariant()); + )).ShouldBe(false.ToString().ToLowerInvariant()); (await _featureManager.GetOrNullDefaultAsync( TestFeatureDefinitionProvider.ProjectCount - ).ConfigureAwait(false)).ShouldBe("1"); + )).ShouldBe("1"); (await _featureManager.GetOrNullDefaultAsync( TestFeatureDefinitionProvider.BackupCount - ).ConfigureAwait(false)).ShouldBe("0"); + )).ShouldBe("0"); //"Enterprise" edition values (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.SocialLogins, TestEditionIds.Enterprise - ).ConfigureAwait(false)).ShouldBe(true.ToString().ToLowerInvariant()); + )).ShouldBe(true.ToString().ToLowerInvariant()); (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.DailyAnalysis, TestEditionIds.Enterprise - ).ConfigureAwait(false)).ShouldBe(false.ToString().ToLowerInvariant()); + )).ShouldBe(false.ToString().ToLowerInvariant()); (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.ProjectCount, TestEditionIds.Enterprise - ).ConfigureAwait(false)).ShouldBe("3"); + )).ShouldBe("3"); (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.BackupCount, TestEditionIds.Enterprise - ).ConfigureAwait(false)).ShouldBe("5"); + )).ShouldBe("5"); //"Ultimate" edition values (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.SocialLogins, TestEditionIds.Ultimate - ).ConfigureAwait(false)).ShouldBe(true.ToString().ToLowerInvariant()); + )).ShouldBe(true.ToString().ToLowerInvariant()); (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.DailyAnalysis, TestEditionIds.Ultimate - ).ConfigureAwait(false)).ShouldBe(true.ToString().ToLowerInvariant()); + )).ShouldBe(true.ToString().ToLowerInvariant()); (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.ProjectCount, TestEditionIds.Ultimate - ).ConfigureAwait(false)).ShouldBe("10"); + )).ShouldBe("10"); (await _featureManager.GetOrNullForEditionAsync( TestFeatureDefinitionProvider.BackupCount, TestEditionIds.Ultimate - ).ConfigureAwait(false)).ShouldBe("10"); + )).ShouldBe("10"); } [Fact] diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator_Tests.cs index 7b3aa9f256..890e94663b 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator_Tests.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator_Tests.cs @@ -30,17 +30,17 @@ namespace Volo.Abp.FeatureManagement TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, TestEditionIds.Regular.ToString() - ).ConfigureAwait(false) + ) ).ShouldNotBeNull(); var feature = await _featureValueRepository.FindAsync( TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, TestEditionIds.Regular.ToString() - ).ConfigureAwait(false); + ); // Act - await _featureValueRepository.DeleteAsync(feature).ConfigureAwait(false); + await _featureValueRepository.DeleteAsync(feature); // Assert (await _cache.GetAsync( @@ -49,7 +49,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Regular.ToString() ) - ).ConfigureAwait(false) + ) ).ShouldBeNull(); } diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj index 8a8b62a666..ef8877a1f1 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj index 37ebd8aa4a..91ccb18368 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj index 571adf02c8..111643ce37 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementStore_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementStore_Tests.cs index 500e28233c..a6f040dde3 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementStore_Tests.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementStore_Tests.cs @@ -27,11 +27,11 @@ namespace Volo.Abp.FeatureManagement // Act (await FeatureManagementStore.GetOrNullAsync(Guid.NewGuid().ToString(), EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).ShouldBeNull(); + TestEditionIds.Regular.ToString())).ShouldBeNull(); (await FeatureManagementStore.GetOrNullAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).ShouldNotBeNull(); + TestEditionIds.Regular.ToString())).ShouldNotBeNull(); } [Fact] @@ -40,17 +40,17 @@ namespace Volo.Abp.FeatureManagement // Arrange (await FeatureManagementStore.GetOrNullAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).ShouldNotBeNull(); + TestEditionIds.Regular.ToString())).ShouldNotBeNull(); // Act await FeatureManagementStore.DeleteAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false); + TestEditionIds.Regular.ToString()); // Assert (await FeatureManagementStore.GetOrNullAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).ShouldBeNull(); + TestEditionIds.Regular.ToString())).ShouldBeNull(); } [Fact] @@ -59,18 +59,18 @@ namespace Volo.Abp.FeatureManagement // Arrange (await FeatureValueRepository.FindAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).Value.ShouldBe(true.ToString().ToLowerInvariant()); + TestEditionIds.Regular.ToString())).Value.ShouldBe(true.ToString().ToLowerInvariant()); // Act await FeatureManagementStore.SetAsync(TestFeatureDefinitionProvider.SocialLogins, false.ToString().ToUpperInvariant(), EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false); + TestEditionIds.Regular.ToString()); // Assert (await FeatureValueRepository.FindAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).Value.ShouldBe(false.ToString().ToUpperInvariant()); + TestEditionIds.Regular.ToString())).Value.ShouldBe(false.ToString().ToUpperInvariant()); } [Fact] @@ -79,18 +79,18 @@ namespace Volo.Abp.FeatureManagement // Arrange (await FeatureValueRepository.FindAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).ShouldNotBeNull(); + TestEditionIds.Regular.ToString())).ShouldNotBeNull(); // Act await FeatureManagementStore.DeleteAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false); + TestEditionIds.Regular.ToString()); // Assert (await FeatureValueRepository.FindAsync(TestFeatureDefinitionProvider.SocialLogins, EditionFeatureValueProvider.ProviderName, - TestEditionIds.Regular.ToString()).ConfigureAwait(false)).ShouldBeNull(); + TestEditionIds.Regular.ToString())).ShouldBeNull(); } diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs index dc286e6782..0629693dbd 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Regular.ToString() ) - ).ConfigureAwait(false); + ); //UserCount await _featureValueRepository.InsertAsync( @@ -45,7 +45,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Regular.ToString() ) - ).ConfigureAwait(false); + ); //ProjectCount await _featureValueRepository.InsertAsync( @@ -56,7 +56,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Regular.ToString() ) - ).ConfigureAwait(false); + ); #endregion @@ -71,7 +71,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() ) - ).ConfigureAwait(false); + ); //EmailSupport await _featureValueRepository.InsertAsync( @@ -82,7 +82,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() ) - ).ConfigureAwait(false); + ); //UserCount await _featureValueRepository.InsertAsync( @@ -93,7 +93,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() ) - ).ConfigureAwait(false); + ); //ProjectCount await _featureValueRepository.InsertAsync( @@ -104,7 +104,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() ) - ).ConfigureAwait(false); + ); //BackupCount await _featureValueRepository.InsertAsync( @@ -115,7 +115,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() ) - ).ConfigureAwait(false); + ); #endregion @@ -130,7 +130,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Ultimate.ToString() ) - ).ConfigureAwait(false); + ); //EmailSupport await _featureValueRepository.InsertAsync( @@ -141,7 +141,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Ultimate.ToString() ) - ).ConfigureAwait(false); + ); //EmailSupport await _featureValueRepository.InsertAsync( @@ -152,7 +152,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Ultimate.ToString() ) - ).ConfigureAwait(false); + ); //UserCount await _featureValueRepository.InsertAsync( @@ -163,7 +163,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Ultimate.ToString() ) - ).ConfigureAwait(false); + ); //ProjectCount await _featureValueRepository.InsertAsync( @@ -174,7 +174,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Ultimate.ToString() ) - ).ConfigureAwait(false); + ); //BackupCount await _featureValueRepository.InsertAsync( @@ -185,7 +185,7 @@ namespace Volo.Abp.FeatureManagement EditionFeatureValueProvider.ProviderName, TestEditionIds.Ultimate.ToString() ) - ).ConfigureAwait(false); + ); #endregion } diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureValueRepository_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureValueRepository_Tests.cs index 8c3904ef24..c7cbb0d8ae 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureValueRepository_Tests.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo/Abp/FeatureManagement/FeatureValueRepository_Tests.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.FeatureManagement TestFeatureDefinitionProvider.ProjectCount, EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() - ).ConfigureAwait(false); + ); featureValue.ShouldNotBeNull(); featureValue.Value.ShouldBe("3"); @@ -35,7 +35,7 @@ namespace Volo.Abp.FeatureManagement TestFeatureDefinitionProvider.ProjectCount, EditionFeatureValueProvider.ProviderName, "undefined-edition-id" - ).ConfigureAwait(false); + ); featureValue.ShouldBeNull(); } @@ -46,7 +46,7 @@ namespace Volo.Abp.FeatureManagement var featureValues = await Repository.GetListAsync( EditionFeatureValueProvider.ProviderName, TestEditionIds.Enterprise.ToString() - ).ConfigureAwait(false); + ); featureValues.Count.ShouldBeGreaterThan(0); diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo.Abp.Identity.Application.Contracts.csproj b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo.Abp.Identity.Application.Contracts.csproj index f14910c068..9703b293d8 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo.Abp.Identity.Application.Contracts.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo.Abp.Identity.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateDto.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateDto.cs index cc2e21eeda..a572c7db2c 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateDto.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateDto.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Auditing; namespace Volo.Abp.Identity { @@ -6,6 +7,7 @@ namespace Volo.Abp.Identity { [Required] [StringLength(IdentityUserConsts.MaxPasswordLength)] + [DisableAuditing] public string Password { get; set; } } } \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserUpdateDto.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserUpdateDto.cs index 4c1c90d4cc..216a55df9e 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserUpdateDto.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserUpdateDto.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Auditing; using Volo.Abp.Domain.Entities; namespace Volo.Abp.Identity @@ -6,6 +7,7 @@ namespace Volo.Abp.Identity public class IdentityUserUpdateDto : IdentityUserCreateOrUpdateDtoBase, IHasConcurrencyStamp { [StringLength(IdentityUserConsts.MaxPasswordLength)] + [DisableAuditing] public string Password { get; set; } public string ConcurrencyStamp { get; set; } diff --git a/modules/identity/src/Volo.Abp.Identity.Application/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj b/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj index 8eac9e9162..fc01ba4400 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs index 44b97a82ea..ffc13fdbca 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs @@ -24,13 +24,13 @@ namespace Volo.Abp.Identity public virtual async Task GetAsync(Guid id) { return ObjectMapper.Map( - await _roleManager.GetByIdAsync(id).ConfigureAwait(false)); + await _roleManager.GetByIdAsync(id)); } public virtual async Task> GetListAsync(PagedAndSortedResultRequestDto input) { - var list = await _roleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); - var totalCount = await _roleRepository.GetCountAsync().ConfigureAwait(false); + var list = await _roleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount); + var totalCount = await _roleRepository.GetCountAsync(); return new PagedResultDto( totalCount, @@ -46,8 +46,8 @@ namespace Volo.Abp.Identity role.IsDefault = input.IsDefault; role.IsPublic = input.IsPublic; - (await _roleManager.CreateAsync(role).ConfigureAwait(false)).CheckErrors(); - await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false); + (await _roleManager.CreateAsync(role)).CheckErrors(); + await CurrentUnitOfWork.SaveChangesAsync(); return ObjectMapper.Map(role); } @@ -55,16 +55,16 @@ namespace Volo.Abp.Identity [Authorize(IdentityPermissions.Roles.Update)] public virtual async Task UpdateAsync(Guid id, IdentityRoleUpdateDto input) { - var role = await _roleManager.GetByIdAsync(id).ConfigureAwait(false); + var role = await _roleManager.GetByIdAsync(id); role.ConcurrencyStamp = input.ConcurrencyStamp; - (await _roleManager.SetRoleNameAsync(role, input.Name).ConfigureAwait(false)).CheckErrors(); + (await _roleManager.SetRoleNameAsync(role, input.Name)).CheckErrors(); role.IsDefault = input.IsDefault; role.IsPublic = input.IsPublic; - (await _roleManager.UpdateAsync(role).ConfigureAwait(false)).CheckErrors(); - await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false); + (await _roleManager.UpdateAsync(role)).CheckErrors(); + await CurrentUnitOfWork.SaveChangesAsync(); return ObjectMapper.Map(role); } @@ -72,13 +72,13 @@ namespace Volo.Abp.Identity [Authorize(IdentityPermissions.Roles.Delete)] public virtual async Task DeleteAsync(Guid id) { - var role = await _roleManager.FindByIdAsync(id.ToString()).ConfigureAwait(false); + var role = await _roleManager.FindByIdAsync(id.ToString()); if (role == null) { return; } - (await _roleManager.DeleteAsync(role).ConfigureAwait(false)).CheckErrors(); + (await _roleManager.DeleteAsync(role)).CheckErrors(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 365fac604f..c1d0f8f28b 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -26,14 +26,14 @@ namespace Volo.Abp.Identity { return ObjectMapper.Map( await _userManager.GetByIdAsync(id) -.ConfigureAwait(false)); + ); } [Authorize(IdentityPermissions.Users.Default)] public virtual async Task> GetListAsync(GetIdentityUsersInput input) { - var count = await _userRepository.GetCountAsync(input.Filter).ConfigureAwait(false); - var list = await _userRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter).ConfigureAwait(false); + var count = await _userRepository.GetCountAsync(input.Filter); + var list = await _userRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter); return new PagedResultDto( count, @@ -44,7 +44,7 @@ namespace Volo.Abp.Identity [Authorize(IdentityPermissions.Users.Default)] public virtual async Task> GetRolesAsync(Guid id) { - var roles = await _userRepository.GetRolesAsync(id).ConfigureAwait(false); + var roles = await _userRepository.GetRolesAsync(id); return new ListResultDto( ObjectMapper.Map, List>(roles) ); @@ -55,10 +55,10 @@ namespace Volo.Abp.Identity { var user = new IdentityUser(GuidGenerator.Create(), input.UserName, input.Email, CurrentTenant.Id); - (await _userManager.CreateAsync(user, input.Password).ConfigureAwait(false)).CheckErrors(); - await UpdateUserByInput(user, input).ConfigureAwait(false); + (await _userManager.CreateAsync(user, input.Password)).CheckErrors(); + await UpdateUserByInput(user, input); - await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false); + await CurrentUnitOfWork.SaveChangesAsync(); return ObjectMapper.Map(user); } @@ -66,20 +66,20 @@ namespace Volo.Abp.Identity [Authorize(IdentityPermissions.Users.Update)] public virtual async Task UpdateAsync(Guid id, IdentityUserUpdateDto input) { - var user = await _userManager.GetByIdAsync(id).ConfigureAwait(false); + var user = await _userManager.GetByIdAsync(id); user.ConcurrencyStamp = input.ConcurrencyStamp; - (await _userManager.SetUserNameAsync(user, input.UserName).ConfigureAwait(false)).CheckErrors(); - await UpdateUserByInput(user, input).ConfigureAwait(false); - (await _userManager.UpdateAsync(user).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); + await UpdateUserByInput(user, input); + (await _userManager.UpdateAsync(user)).CheckErrors(); if (!input.Password.IsNullOrEmpty()) { - (await _userManager.RemovePasswordAsync(user).ConfigureAwait(false)).CheckErrors(); - (await _userManager.AddPasswordAsync(user, input.Password).ConfigureAwait(false)).CheckErrors(); + (await _userManager.RemovePasswordAsync(user)).CheckErrors(); + (await _userManager.AddPasswordAsync(user, input.Password)).CheckErrors(); } - await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false); + await CurrentUnitOfWork.SaveChangesAsync(); return ObjectMapper.Map(user); } @@ -92,21 +92,21 @@ namespace Volo.Abp.Identity throw new BusinessException(code: IdentityErrorCodes.UserSelfDeletion); } - var user = await _userManager.FindByIdAsync(id.ToString()).ConfigureAwait(false); + var user = await _userManager.FindByIdAsync(id.ToString()); if (user == null) { return; } - (await _userManager.DeleteAsync(user).ConfigureAwait(false)).CheckErrors(); + (await _userManager.DeleteAsync(user)).CheckErrors(); } [Authorize(IdentityPermissions.Users.Update)] public virtual async Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) { - var user = await _userManager.GetByIdAsync(id).ConfigureAwait(false); - (await _userManager.SetRolesAsync(user, input.RoleNames).ConfigureAwait(false)).CheckErrors(); - await _userRepository.UpdateAsync(user).ConfigureAwait(false); + var user = await _userManager.GetByIdAsync(id); + (await _userManager.SetRolesAsync(user, input.RoleNames)).CheckErrors(); + await _userRepository.UpdateAsync(user); } [Authorize(IdentityPermissions.Users.Default)] @@ -114,7 +114,7 @@ namespace Volo.Abp.Identity { return ObjectMapper.Map( await _userManager.FindByNameAsync(username) -.ConfigureAwait(false)); + ); } [Authorize(IdentityPermissions.Users.Default)] @@ -122,30 +122,30 @@ namespace Volo.Abp.Identity { return ObjectMapper.Map( await _userManager.FindByEmailAsync(email) -.ConfigureAwait(false)); + ); } private async Task UpdateUserByInput(IdentityUser user, IdentityUserCreateOrUpdateDtoBase input) { if (!string.Equals(user.Email, input.Email, StringComparison.InvariantCultureIgnoreCase)) { - (await _userManager.SetEmailAsync(user, input.Email).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetEmailAsync(user, input.Email)).CheckErrors(); } if (!string.Equals(user.PhoneNumber, input.PhoneNumber, StringComparison.InvariantCultureIgnoreCase)) { - (await _userManager.SetPhoneNumberAsync(user, input.PhoneNumber).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); } - (await _userManager.SetTwoFactorEnabledAsync(user, input.TwoFactorEnabled).ConfigureAwait(false)).CheckErrors(); - (await _userManager.SetLockoutEnabledAsync(user, input.LockoutEnabled).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetTwoFactorEnabledAsync(user, input.TwoFactorEnabled)).CheckErrors(); + (await _userManager.SetLockoutEnabledAsync(user, input.LockoutEnabled)).CheckErrors(); user.Name = input.Name; user.Surname = input.Surname; if (input.RoleNames != null) { - (await _userManager.SetRolesAsync(user, input.RoleNames).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetRolesAsync(user, input.RoleNames)).CheckErrors(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs index ca2b25f83b..48d42c4579 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.Identity public virtual async Task FindByIdAsync(Guid id) { - var userData = await UserLookupServiceProvider.FindByIdAsync(id).ConfigureAwait(false); + var userData = await UserLookupServiceProvider.FindByIdAsync(id); if (userData == null) { return null; @@ -29,7 +29,7 @@ namespace Volo.Abp.Identity public virtual async Task FindByUserNameAsync(string userName) { - var userData = await UserLookupServiceProvider.FindByUserNameAsync(userName).ConfigureAwait(false); + var userData = await UserLookupServiceProvider.FindByUserNameAsync(userName); if (userData == null) { return null; diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs index 04d2c55a0b..0b8712b93d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs @@ -21,39 +21,39 @@ namespace Volo.Abp.Identity { return ObjectMapper.Map( await _userManager.GetByIdAsync(CurrentUser.GetId()) -.ConfigureAwait(false)); + ); } public virtual async Task UpdateAsync(UpdateProfileDto input) { - var user = await _userManager.GetByIdAsync(CurrentUser.GetId()).ConfigureAwait(false); + var user = await _userManager.GetByIdAsync(CurrentUser.GetId()); - if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled).ConfigureAwait(false)) + if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled)) { - (await _userManager.SetUserNameAsync(user, input.UserName).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); } - if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsEmailUpdateEnabled).ConfigureAwait(false)) + if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsEmailUpdateEnabled)) { - (await _userManager.SetEmailAsync(user, input.Email).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetEmailAsync(user, input.Email)).CheckErrors(); } - (await _userManager.SetPhoneNumberAsync(user, input.PhoneNumber).ConfigureAwait(false)).CheckErrors(); + (await _userManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); user.Name = input.Name; user.Surname = input.Surname; - (await _userManager.UpdateAsync(user).ConfigureAwait(false)).CheckErrors(); + (await _userManager.UpdateAsync(user)).CheckErrors(); - await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false); + await CurrentUnitOfWork.SaveChangesAsync(); return ObjectMapper.Map(user); } public virtual async Task ChangePasswordAsync(ChangePasswordInput input) { - var currentUser = await _userManager.GetByIdAsync(CurrentUser.GetId()).ConfigureAwait(false); - (await _userManager.ChangePasswordAsync(currentUser, input.CurrentPassword, input.NewPassword).ConfigureAwait(false)).CheckErrors(); + var currentUser = await _userManager.GetByIdAsync(CurrentUser.GetId()); + (await _userManager.ChangePasswordAsync(currentUser, input.CurrentPassword, input.NewPassword)).CheckErrors(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.AspNetCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.AspNetCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj index 7ecd91595f..5125c7a89c 100644 --- a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj +++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj index 460f5285e4..0af270c597 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json index 0f87bec5e5..8517adcf12 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json @@ -71,6 +71,32 @@ "Permission:Delete": "Smazat", "Permission:ChangePermissions": "Změnit oprávnění", "Permission:UserManagement": "Správa uživatelů", - "Permission:UserLookup": "Vyhledání uživatele" + "Permission:UserLookup": "Vyhledání uživatele", + "DisplayName:Abp.Identity.Password.RequiredLength": "Požadovaná délka", + "DisplayName:Abp.Identity.Password.RequiredUniqueChars": "Požadovaný počet unikátních znaků", + "DisplayName:Abp.Identity.Password.RequireNonAlphanumeric": "Požadován nealfanumerický znak", + "DisplayName:Abp.Identity.Password.RequireLowercase": "Požadováno malé písmeno", + "DisplayName:Abp.Identity.Password.RequireUppercase": "Požadováno velké písmeno", + "DisplayName:Abp.Identity.Password.RequireDigit": "Požadováno číslo", + "DisplayName:Abp.Identity.Lockout.AllowedForNewUsers": "Povoleno pro nové uživatele", + "DisplayName:Abp.Identity.Lockout.LockoutDuration": "Délka blokování (sekundy)", + "DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts": "Maximální počet neúspěšných pokusů o přístup", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail": "Požadovat potvrzený email", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "Požadovat potvrzené telefonní číslo", + "DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled": "Je povolena změna uživatelského jména", + "DisplayName:Abp.Identity.User.IsEmailUpdateEnabled": "Je povolena změna emailu", + "Description:Abp.Identity.Password.RequiredLength": "Minimální délka hesla.", + "Description:Abp.Identity.Password.RequiredUniqueChars": "Minimální počet jedinečných znaků, které musí heslo obsahovat.", + "Description:Abp.Identity.Password.RequireNonAlphanumeric": "Hesla musí obsahovat nealfanumerický znak.", + "Description:Abp.Identity.Password.RequireLowercase": "Pokud hesla musí obsahovat ASCII znak malých písmen.", + "Description:Abp.Identity.Password.RequireUppercase": "Pokud hesla musí obsahovat ASCII znak velkých písmen.", + "Description:Abp.Identity.Password.RequireDigit": "Pokud hesla musí obsahovat číslici.", + "Description:Abp.Identity.Lockout.AllowedForNewUsers": "Zda může být uzamčen nový uživatel.", + "Description:Abp.Identity.Lockout.LockoutDuration": "Doba, po kterou je uživatel zablokován, když dojde k zablokování.", + "Description:Abp.Identity.Lockout.MaxFailedAccessAttempts": "Počet neúspěšných pokusů o přístup než je uživatel uzamčen, za předpokladu, že je uzamčení povoleno.", + "Description:Abp.Identity.SignIn.RequireConfirmedEmail": "Zda je k přihlášení vyžadována potvrzená emailová adresa.", + "Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "Zda je pro přihlášení vyžadováno potvrzené telefonní číslo.", + "Description:Abp.Identity.User.IsUserNameUpdateEnabled": "Zda může uživatel změnit uživatelské jméno.", + "Description:Abp.Identity.User.IsEmailUpdateEnabled": "Zda může uživatel změnit email." } } \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json new file mode 100644 index 0000000000..240b7babdf --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json @@ -0,0 +1,103 @@ +{ + "culture": "zh-Hant", + "texts": { + "Menu:IdentityManagement": "身份識別管理", + "Users": "使用者", + "NewUser": "新使用者", + "UserName": "使用者名稱", + "EmailAddress": "電子信箱地址", + "PhoneNumber": "手機號碼", + "UserInformations": "用戶資訊", + "DisplayName:IsDefault": "預設", + "DisplayName:IsStatic": "靜態", + "DisplayName:IsPublic": "公開", + "Roles": "角色", + "Password": "密碼", + "PersonalInfo": " 個人資料", + "PersonalSettings": "個人設置", + "UserDeletionConfirmationMessage": "使用者 '{0}' 將被刪除. 你確定嗎?", + "RoleDeletionConfirmationMessage": "角色 '{0}' 將被刪除. 你確定嗎?", + "DisplayName:RoleName": "角色名稱", + "DisplayName:UserName": "使用者名稱", + "DisplayName:Name": "名子", + "DisplayName:Surname": "姓", + "DisplayName:Password": "密碼", + "DisplayName:Email": "電子信箱地址", + "DisplayName:PhoneNumber": "手機號碼", + "DisplayName:TwoFactorEnabled": "二次認證", + "DisplayName:LockoutEnabled": "登入失敗,帳號被鎖定", + "NewRole": "新角色", + "RoleName": "角色名稱", + "CreationTime": "建立時間", + "Permissions": "權限", + "DisplayName:CurrentPassword": "目前密碼", + "DisplayName:NewPassword": "新密碼", + "DisplayName:NewPasswordConfirm": "確認新密碼", + "PasswordChangedMessage": "你已成功更改密碼.", + "PersonalSettingsSavedMessage": "你的個人設置保存成功.", + "Identity.DefaultError": "發生了一個未知錯誤.", + "Identity.ConcurrencyFailure": "對象已被修改,因樂觀並行控制導致失敗.", + "Identity.DuplicateEmail": "電子信箱 '{0}' 已存在.", + "Identity.DuplicateRoleName": "角色名 '{0}' 已存在.", + "Identity.DuplicateUserName": "使用者名稱 '{0}' 已存在.", + "Identity.InvalidEmail": "電子信箱 '{0}' 無效.", + "Identity.InvalidPasswordHasherCompatibilityMode": "提供的 PasswordHasherCompatibilityMode 無效.", + "Identity.InvalidPasswordHasherIterationCount": "迭代計數必須是正整數.", + "Identity.InvalidRoleName": "角色名 '{0}' 無效.", + "Identity.InvalidToken": "token無效.", + "Identity.InvalidUserName": "使用者名稱 '{0}' 無效, 只能包含字母或數字.", + "Identity.LoginAlreadyAssociated": "此登入名的使用者已存在.", + "Identity.PasswordMismatch": "密碼錯誤.", + "Identity.PasswordRequiresDigit": "密碼至少包含一位數字 ('0'-'9').", + "Identity.PasswordRequiresLower": "密碼至少包含一位小寫字母 ('a'-'z').", + "Identity.PasswordRequiresNonAlphanumeric": "密碼至少包含一位非字母數字字元.", + "Identity.PasswordRequiresUpper": "密碼至少包含一位大寫字母 ('A'-'Z').", + "Identity.PasswordTooShort": "密碼至少為{0}個字元.", + "Identity.RoleNotFound": "角色 {0} 不存在.", + "Identity.UserAlreadyHasPassword": "使用者已設置密碼.", + "Identity.UserAlreadyInRole": "使用者已具有角色 '{0}'.", + "Identity.UserLockedOut": "使用者被鎖定.", + "Identity.UserLockoutNotEnabled": "該使用者未啟用鎖定.", + "Identity.UserNameNotFound": "使用者 {0} 不存在.", + "Identity.UserNotInRole": "使用者不具有 '{0}' 角色.", + "Identity.PasswordConfirmationFailed": "密碼或確認密碼不一致.", + "Identity.StaticRoleRenamingErrorMessage": "無法重命名靜態角色.", + "Identity.StaticRoleDeletionErrorMessage": "無法刪除靜態角色.", + "Volo.Abp.Identity:010001": "您無法刪除自己的帳號!", + "Permission:IdentityManagement": "身份識別管理", + "Permission:RoleManagement": "角色管理", + "Permission:Create": "建立", + "Permission:Edit": "編輯", + "Permission:Delete": "刪除", + "Permission:ChangePermissions": "更改權限", + "Permission:UserManagement": "使用者管理", + "Permission:UserLookup": "使用者查詢", + "DisplayName:Abp.Identity.Password.RequiredLength": "要求長度", + "DisplayName:Abp.Identity.Password.RequiredUniqueChars": "要求唯一字元數量", + "DisplayName:Abp.Identity.Password.RequireNonAlphanumeric": "要求非字母數字", + "DisplayName:Abp.Identity.Password.RequireLowercase": "要求小寫字母", + "DisplayName:Abp.Identity.Password.RequireUppercase": "要求大寫字母", + "DisplayName:Abp.Identity.Password.RequireDigit": "要求數字", + "DisplayName:Abp.Identity.Lockout.AllowedForNewUsers": "允許新使用者", + "DisplayName:Abp.Identity.Lockout.LockoutDuration": "鎖定時間(秒)", + "DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts": "最大失敗存取嘗試次數", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail": "要求驗證的電子信箱", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "要求驗證的手機號碼", + "DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled": "啟用使用者名稱更新", + "DisplayName:Abp.Identity.User.IsEmailUpdateEnabled": "啟用電子信箱更新", + "Description:Abp.Identity.Password.RequiredLength": "密碼的最小長度.", + "Description:Abp.Identity.Password.RequiredUniqueChars": "密碼必須包含唯一字元的數量.", + "Description:Abp.Identity.Password.RequireNonAlphanumeric": "密碼是否必須包含非字母數字.", + "Description:Abp.Identity.Password.RequireLowercase": "密碼是否必須包含小寫字母.", + "Description:Abp.Identity.Password.RequireUppercase": "密碼是否必須包含大小字母.", + "Description:Abp.Identity.Password.RequireDigit": "密碼是否必須包含數字.", + "Description:Abp.Identity.Lockout.AllowedForNewUsers": "允許新使用者被鎖定.", + "Description:Abp.Identity.Lockout.LockoutDuration": "當鎖定發生時使用者被鎖定的時間(秒).", + "Description:Abp.Identity.Lockout.MaxFailedAccessAttempts": "如果啟用鎖定,當使用者被鎖定前失敗的存取嘗試次數.", + "Description:Abp.Identity.SignIn.RequireConfirmedEmail": "登入時是否需要驗證電子信箱.", + "Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "登入時是否需要驗證手機號碼.", + "Description:Abp.Identity.User.IsUserNameUpdateEnabled": "是否允許使用者更新使用者名稱.", + "Description:Abp.Identity.User.IsEmailUpdateEnabled": "是否允許使用者更新電子信箱." + + } +} \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj b/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj index 3e348db1e3..f6eb1df909 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityOptionsFactory.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityOptionsFactory.cs index 3836783a01..89f2b11bc2 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityOptionsFactory.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityOptionsFactory.cs @@ -39,19 +39,19 @@ namespace Volo.Abp.Identity protected virtual async Task OverrideOptionsAsync(IdentityOptions options) { - options.Password.RequiredLength = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequiredLength, options.Password.RequiredLength).ConfigureAwait(false); - options.Password.RequiredUniqueChars = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequiredUniqueChars, options.Password.RequiredUniqueChars).ConfigureAwait(false); - options.Password.RequireNonAlphanumeric = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireNonAlphanumeric, options.Password.RequireNonAlphanumeric).ConfigureAwait(false); - options.Password.RequireLowercase = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireLowercase, options.Password.RequireLowercase).ConfigureAwait(false); - options.Password.RequireUppercase = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireUppercase, options.Password.RequireUppercase).ConfigureAwait(false); - options.Password.RequireDigit = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireDigit, options.Password.RequireDigit).ConfigureAwait(false); - - options.Lockout.AllowedForNewUsers = await _settingProvider.GetAsync(IdentitySettingNames.Lockout.AllowedForNewUsers, options.Lockout.AllowedForNewUsers).ConfigureAwait(false); + options.Password.RequiredLength = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequiredLength, options.Password.RequiredLength); + options.Password.RequiredUniqueChars = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequiredUniqueChars, options.Password.RequiredUniqueChars); + options.Password.RequireNonAlphanumeric = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireNonAlphanumeric, options.Password.RequireNonAlphanumeric); + options.Password.RequireLowercase = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireLowercase, options.Password.RequireLowercase); + options.Password.RequireUppercase = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireUppercase, options.Password.RequireUppercase); + options.Password.RequireDigit = await _settingProvider.GetAsync(IdentitySettingNames.Password.RequireDigit, options.Password.RequireDigit); + + options.Lockout.AllowedForNewUsers = await _settingProvider.GetAsync(IdentitySettingNames.Lockout.AllowedForNewUsers, options.Lockout.AllowedForNewUsers); options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromSeconds(await _settingProvider.GetAsync(IdentitySettingNames.Lockout.LockoutDuration, options.Lockout.DefaultLockoutTimeSpan.TotalSeconds.To())); - options.Lockout.MaxFailedAccessAttempts = await _settingProvider.GetAsync(IdentitySettingNames.Lockout.MaxFailedAccessAttempts, options.Lockout.MaxFailedAccessAttempts).ConfigureAwait(false); + options.Lockout.MaxFailedAccessAttempts = await _settingProvider.GetAsync(IdentitySettingNames.Lockout.MaxFailedAccessAttempts, options.Lockout.MaxFailedAccessAttempts); - options.SignIn.RequireConfirmedEmail = await _settingProvider.GetAsync(IdentitySettingNames.SignIn.RequireConfirmedEmail, options.SignIn.RequireConfirmedEmail).ConfigureAwait(false); - options.SignIn.RequireConfirmedPhoneNumber = await _settingProvider.GetAsync(IdentitySettingNames.SignIn.RequireConfirmedPhoneNumber, options.SignIn.RequireConfirmedPhoneNumber).ConfigureAwait(false); + options.SignIn.RequireConfirmedEmail = await _settingProvider.GetAsync(IdentitySettingNames.SignIn.RequireConfirmedEmail, options.SignIn.RequireConfirmedEmail); + options.SignIn.RequireConfirmedPhoneNumber = await _settingProvider.GetAsync(IdentitySettingNames.SignIn.RequireConfirmedPhoneNumber, options.SignIn.RequireConfirmedPhoneNumber); } } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpUserClaimsPrincipalFactory.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpUserClaimsPrincipalFactory.cs index 9425a91cdc..8db2b95942 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpUserClaimsPrincipalFactory.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpUserClaimsPrincipalFactory.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Identity [UnitOfWork] public override async Task CreateAsync(IdentityUser user) { - var principal = await base.CreateAsync(user).ConfigureAwait(false); + var principal = await base.CreateAsync(user); if (user.TenantId.HasValue) { diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs index 6ce3ce3c0c..3a344b3140 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs @@ -21,5 +21,10 @@ namespace Volo.Abp.Identity bool includeDetails = false, CancellationToken cancellationToken = default ); + + Task> GetDefaultOnesAsync( + bool includeDetails = false, + CancellationToken cancellationToken = default + ); } } \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs index ae468d272a..6e79b29d98 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs @@ -15,17 +15,17 @@ namespace Volo.Abp.Identity public virtual async Task CreateAsync(IdentityClaimType claimType) { - if (await _identityClaimTypeRepository.AnyAsync(claimType.Name).ConfigureAwait(false)) + if (await _identityClaimTypeRepository.AnyAsync(claimType.Name)) { throw new AbpException($"Name Exist: {claimType.Name}"); } - return await _identityClaimTypeRepository.InsertAsync(claimType).ConfigureAwait(false); + return await _identityClaimTypeRepository.InsertAsync(claimType); } public virtual async Task UpdateAsync(IdentityClaimType claimType) { - if (await _identityClaimTypeRepository.AnyAsync(claimType.Name, claimType.Id).ConfigureAwait(false)) + if (await _identityClaimTypeRepository.AnyAsync(claimType.Name, claimType.Id)) { throw new AbpException($"Name Exist: {claimType.Name}"); } @@ -36,7 +36,7 @@ namespace Volo.Abp.Identity } - return await _identityClaimTypeRepository.UpdateAsync(claimType).ConfigureAwait(false); + return await _identityClaimTypeRepository.UpdateAsync(claimType); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs index 92ebe6adfb..70945c2546 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs @@ -47,7 +47,7 @@ namespace Volo.Abp.Identity const string adminUserName = "admin"; var adminUser = await _userRepository.FindByNormalizedUserNameAsync( _lookupNormalizer.NormalizeName(adminUserName) - ).ConfigureAwait(false); + ); if (adminUser != null) { @@ -64,12 +64,12 @@ namespace Volo.Abp.Identity Name = adminUserName }; - (await _userManager.CreateAsync(adminUser, adminPassword).ConfigureAwait(false)).CheckErrors(); + (await _userManager.CreateAsync(adminUser, adminPassword)).CheckErrors(); result.CreatedAdminUser = true; //"admin" role const string adminRoleName = "admin"; - var adminRole = await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName(adminRoleName)).ConfigureAwait(false); + var adminRole = await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName(adminRoleName)); if (adminRole == null) { adminRole = new IdentityRole( @@ -82,11 +82,11 @@ namespace Volo.Abp.Identity IsPublic = true }; - (await _roleManager.CreateAsync(adminRole).ConfigureAwait(false)).CheckErrors(); + (await _roleManager.CreateAsync(adminRole)).CheckErrors(); result.CreatedAdminRole = true; } - (await _userManager.AddToRoleAsync(adminUser, adminRoleName).ConfigureAwait(false)).CheckErrors(); + (await _userManager.AddToRoleAsync(adminUser, adminRoleName)).CheckErrors(); return result; } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleManager.cs index 17f1b817aa..0a64d64aad 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleManager.cs @@ -41,7 +41,7 @@ namespace Volo.Abp.Identity public virtual async Task GetByIdAsync(Guid id) { - var role = await Store.FindByIdAsync(id.ToString(), CancellationToken).ConfigureAwait(false); + var role = await Store.FindByIdAsync(id.ToString(), CancellationToken); if (role == null) { throw new EntityNotFoundException(typeof(IdentityRole), id); @@ -57,7 +57,7 @@ namespace Volo.Abp.Identity throw new BusinessException(_localizer["Identity.StaticRoleRenamingErrorMessage"]); // TODO: localize & change exception type } - return await base.SetRoleNameAsync(role, name).ConfigureAwait(false); + return await base.SetRoleNameAsync(role, name); } public override async Task DeleteAsync(IdentityRole role) @@ -67,7 +67,7 @@ namespace Volo.Abp.Identity throw new BusinessException(_localizer["Identity.StaticRoleDeletionErrorMessage"]); // TODO: localize & change exception type } - return await base.DeleteAsync(role).ConfigureAwait(false); + return await base.DeleteAsync(role); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleStore.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleStore.cs index 004fc0c20c..ddff3ae844 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleStore.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleStore.cs @@ -67,7 +67,7 @@ namespace Volo.Abp.Identity Check.NotNull(role, nameof(role)); - await _roleRepository.InsertAsync(role, AutoSaveChanges, cancellationToken).ConfigureAwait(false); + await _roleRepository.InsertAsync(role, AutoSaveChanges, cancellationToken); return IdentityResult.Success; } @@ -86,7 +86,7 @@ namespace Volo.Abp.Identity try { - await _roleRepository.UpdateAsync(role, AutoSaveChanges, cancellationToken).ConfigureAwait(false); + await _roleRepository.UpdateAsync(role, AutoSaveChanges, cancellationToken); } catch (AbpDbConcurrencyException ex) { @@ -111,7 +111,7 @@ namespace Volo.Abp.Identity try { - await _roleRepository.DeleteAsync(role, AutoSaveChanges, cancellationToken).ConfigureAwait(false); + await _roleRepository.DeleteAsync(role, AutoSaveChanges, cancellationToken); } catch (AbpDbConcurrencyException ex) { @@ -249,7 +249,7 @@ namespace Volo.Abp.Identity Check.NotNull(role, nameof(role)); - await _roleRepository.EnsureCollectionLoadedAsync(role, r => r.Claims, cancellationToken).ConfigureAwait(false); + await _roleRepository.EnsureCollectionLoadedAsync(role, r => r.Claims, cancellationToken); return role.Claims.Select(c => c.ToClaim()).ToList(); } @@ -268,7 +268,7 @@ namespace Volo.Abp.Identity Check.NotNull(role, nameof(role)); Check.NotNull(claim, nameof(claim)); - await _roleRepository.EnsureCollectionLoadedAsync(role, r => r.Claims, cancellationToken).ConfigureAwait(false); + await _roleRepository.EnsureCollectionLoadedAsync(role, r => r.Claims, cancellationToken); role.AddClaim(_guidGenerator, claim); } @@ -285,7 +285,7 @@ namespace Volo.Abp.Identity Check.NotNull(role, nameof(role)); Check.NotNull(claim, nameof(claim)); - await _roleRepository.EnsureCollectionLoadedAsync(role, r => r.Claims, cancellationToken).ConfigureAwait(false); + await _roleRepository.EnsureCollectionLoadedAsync(role, r => r.Claims, cancellationToken); role.RemoveClaim(claim); } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs index 9e66b7b824..8723056452 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs @@ -25,7 +25,8 @@ namespace Volo.Abp.Identity IPasswordHasher passwordHasher, IEnumerable> userValidators, IEnumerable> passwordValidators, - ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, + ILookupNormalizer keyNormalizer, + IdentityErrorDescriber errors, IServiceProvider services, ILogger logger, ICancellationTokenProvider cancellationTokenProvider) @@ -45,7 +46,7 @@ namespace Volo.Abp.Identity public virtual async Task GetByIdAsync(Guid id) { - var user = await Store.FindByIdAsync(id.ToString(), CancellationToken).ConfigureAwait(false); + var user = await Store.FindByIdAsync(id.ToString(), CancellationToken); if (user == null) { throw new EntityNotFoundException(typeof(IdentityUser), id); @@ -59,15 +60,15 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); Check.NotNull(roleNames, nameof(roleNames)); - var currentRoleNames = await GetRolesAsync(user).ConfigureAwait(false); + var currentRoleNames = await GetRolesAsync(user); - var result = await RemoveFromRolesAsync(user, currentRoleNames.Except(roleNames).Distinct()).ConfigureAwait(false); + var result = await RemoveFromRolesAsync(user, currentRoleNames.Except(roleNames).Distinct()); if (!result.Succeeded) { return result; } - result = await AddToRolesAsync(user, roleNames.Except(currentRoleNames).Distinct()).ConfigureAwait(false); + result = await AddToRolesAsync(user, roleNames.Except(currentRoleNames).Distinct()); if (!result.Succeeded) { return result; diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs index 1fdc6ff934..75c2ef53a7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.Identity includeDetails: false, cancellationToken: cancellationToken ) -.ConfigureAwait(false))?.ToAbpUserData(); +)?.ToAbpUserData(); } public virtual async Task FindByUserNameAsync( @@ -43,7 +43,7 @@ namespace Volo.Abp.Identity includeDetails: false, cancellationToken: cancellationToken ) -.ConfigureAwait(false))?.ToAbpUserData(); +)?.ToAbpUserData(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserStore.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserStore.cs index cb03869ae6..e92f31797d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserStore.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserStore.cs @@ -163,7 +163,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - await _userRepository.InsertAsync(user, AutoSaveChanges, cancellationToken).ConfigureAwait(false); + await _userRepository.InsertAsync(user, AutoSaveChanges, cancellationToken); return IdentityResult.Success; } @@ -182,7 +182,7 @@ namespace Volo.Abp.Identity try { - await _userRepository.UpdateAsync(user, AutoSaveChanges, cancellationToken).ConfigureAwait(false); + await _userRepository.UpdateAsync(user, AutoSaveChanges, cancellationToken); } catch (AbpDbConcurrencyException ex) { @@ -207,7 +207,7 @@ namespace Volo.Abp.Identity try { - await _userRepository.DeleteAsync(user, AutoSaveChanges, cancellationToken).ConfigureAwait(false); + await _userRepository.DeleteAsync(user, AutoSaveChanges, cancellationToken); } catch (AbpDbConcurrencyException ex) { @@ -313,14 +313,14 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); Check.NotNull(normalizedRoleName, nameof(normalizedRoleName)); - var role = await _roleRepository.FindByNormalizedNameAsync(normalizedRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + var role = await _roleRepository.FindByNormalizedNameAsync(normalizedRoleName, cancellationToken: cancellationToken); if (role == null) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Role {0} does not exist!", normalizedRoleName)); } - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, cancellationToken); user.AddRole(role.Id); } @@ -343,13 +343,13 @@ namespace Volo.Abp.Identity throw new ArgumentException(nameof(normalizedRoleName) + " can not be null or whitespace"); } - var role = await _roleRepository.FindByNormalizedNameAsync(normalizedRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + var role = await _roleRepository.FindByNormalizedNameAsync(normalizedRoleName, cancellationToken: cancellationToken); if (role == null) { return; } - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, cancellationToken); user.RemoveRole(role.Id); } @@ -388,13 +388,13 @@ namespace Volo.Abp.Identity throw new ArgumentException(nameof(normalizedRoleName) + " can not be null or whitespace"); } - var role = await _roleRepository.FindByNormalizedNameAsync(normalizedRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + var role = await _roleRepository.FindByNormalizedNameAsync(normalizedRoleName, cancellationToken: cancellationToken); if (role == null) { return false; } - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, cancellationToken); return user.IsInRole(role.Id); } @@ -411,7 +411,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken); return user.Claims.Select(c => c.ToClaim()).ToList(); } @@ -430,7 +430,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); Check.NotNull(claims, nameof(claims)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken); user.AddClaims(_guidGenerator, claims); } @@ -451,7 +451,7 @@ namespace Volo.Abp.Identity Check.NotNull(claim, nameof(claim)); Check.NotNull(newClaim, nameof(newClaim)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken); user.ReplaceClaim(claim, newClaim); } @@ -470,7 +470,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); Check.NotNull(claims, nameof(claims)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Claims, cancellationToken); user.RemoveClaims(claims); } @@ -489,7 +489,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); Check.NotNull(login, nameof(login)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Logins, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Logins, cancellationToken); user.AddLogin(login); } @@ -510,7 +510,7 @@ namespace Volo.Abp.Identity Check.NotNull(loginProvider, nameof(loginProvider)); Check.NotNull(providerKey, nameof(providerKey)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Logins, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Logins, cancellationToken); user.RemoveLogin(loginProvider, providerKey); } @@ -529,7 +529,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Logins, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Logins, cancellationToken); return user.Logins.Select(l => l.ToUserLoginInfo()).ToList(); } @@ -988,7 +988,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Tokens, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Tokens, cancellationToken); user.SetToken(loginProvider, name, value); } @@ -1007,7 +1007,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Tokens, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Tokens, cancellationToken); user.RemoveToken(loginProvider, name); } @@ -1026,7 +1026,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Tokens, cancellationToken).ConfigureAwait(false); + await _userRepository.EnsureCollectionLoadedAsync(user, u => u.Tokens, cancellationToken); return user.FindToken(loginProvider, name)?.Value; } @@ -1053,7 +1053,7 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); - var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? ""; + var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken) ?? ""; if (mergedCodes.Length > 0) { return mergedCodes.Split(';').Length; @@ -1090,12 +1090,12 @@ namespace Volo.Abp.Identity Check.NotNull(user, nameof(user)); Check.NotNull(code, nameof(code)); - var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? ""; + var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken) ?? ""; var splitCodes = mergedCodes.Split(';'); if (splitCodes.Contains(code)) { var updatedCodes = new List(splitCodes.Where(s => s != code)); - await ReplaceCodesAsync(user, updatedCodes, cancellationToken).ConfigureAwait(false); + await ReplaceCodesAsync(user, updatedCodes, cancellationToken); return true; } return false; diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserRoleFinder.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserRoleFinder.cs index c366591a57..d2de24a568 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserRoleFinder.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserRoleFinder.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Identity public virtual async Task GetRolesAsync(Guid userId) { - return (await _identityUserRepository.GetRoleNamesAsync(userId).ConfigureAwait(false)).ToArray(); + return (await _identityUserRepository.GetRoleNamesAsync(userId)).ToArray(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj index 945905d75f..fc647ad159 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.Identity.EntityFrameworkCore Volo.Abp.Identity.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs index d7cb57d396..95b7a7fe42 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore { return await DbSet .WhereIf(ignoredId != null, ct => ct.Id != ignoredId) - .CountAsync(ct => ct.Name == name).ConfigureAwait(false) > 0; + .CountAsync(ct => ct.Name == name) > 0; } public async Task> GetListAsync(string sorting, int maxResultCount, int skipCount, string filter) @@ -34,7 +34,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore ) .OrderBy(sorting ?? "name desc") .PageBy(skipCount, maxResultCount) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); return identityClaimTypes; } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs index 731cc6df23..dfaaf51d91 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore { return await DbSet .IncludeDetails(includeDetails) - .FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -39,7 +39,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore .IncludeDetails(includeDetails) .OrderBy(sorting ?? nameof(IdentityRole.Name)) .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public virtual async Task> GetDefaultOnesAsync( + bool includeDetails = false, CancellationToken cancellationToken = default) + { + return await DbSet.IncludeDetails(includeDetails).Where(r => r.IsDefault).ToListAsync(GetCancellationToken(cancellationToken)); } public override IQueryable WithDetails() diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs index e3dfe6ee8c..cab891bc94 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore .FirstOrDefaultAsync( u => u.NormalizedUserName == normalizedUserName, GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } public virtual async Task> GetRoleNamesAsync( @@ -40,7 +40,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore where userRole.UserId == id select role.Name; - return await query.ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task FindByLoginAsync( @@ -52,7 +52,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore return await DbSet .IncludeDetails(includeDetails) .Where(u => u.Logins.Any(login => login.LoginProvider == loginProvider && login.ProviderKey == providerKey)) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public virtual async Task FindByNormalizedEmailAsync( @@ -62,7 +62,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore { return await DbSet .IncludeDetails(includeDetails) - .FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByClaimAsync( @@ -73,7 +73,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore return await DbSet .IncludeDetails(includeDetails) .Where(u => u.Claims.Any(c => c.ClaimType == claim.Type && c.ClaimValue == claim.Value)) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByNormalizedRoleNameAsync( @@ -83,7 +83,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore { var role = await DbContext.Roles .Where(x => x.NormalizedName == normalizedRoleName) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); if (role == null) { @@ -93,7 +93,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore return await DbSet .IncludeDetails(includeDetails) .Where(u => u.Roles.Any(r => r.RoleId == role.Id)) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -114,7 +114,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore ) .OrderBy(sorting ?? nameof(IdentityUser.UserName)) .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetRolesAsync( @@ -127,7 +127,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore where userRole.UserId == id select role; - return await query.ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task GetCountAsync( @@ -140,7 +140,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore u.UserName.Contains(filter) || u.Email.Contains(filter) ) - .LongCountAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .LongCountAsync(GetCancellationToken(cancellationToken)); } public override IQueryable WithDetails() diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj index 0f5d63db37..11fd0a40b6 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientUserRoleFinder.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientUserRoleFinder.cs index 1e5934cee5..a5fffe9848 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientUserRoleFinder.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientUserRoleFinder.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.Identity public async Task GetRolesAsync(Guid userId) { - var output = await _userAppService.GetRolesAsync(userId).ConfigureAwait(false); + var output = await _userAppService.GetRolesAsync(userId); return output.Items.Select(r => r.Name).ToArray(); } } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj index c7ca885378..55629d070e 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj index 06e5717e03..762582ef67 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs index beed5130f1..16ba528412 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs @@ -22,13 +22,13 @@ namespace Volo.Abp.Identity.MongoDB { return await GetMongoQueryable() .Where(ct => ct.Name == name) - .AnyAsync().ConfigureAwait(false); + .AnyAsync(); } else { return await GetMongoQueryable() .Where(ct => ct.Id != ignoredId && ct.Name == name) - .AnyAsync().ConfigureAwait(false); + .AnyAsync(); } } @@ -43,7 +43,7 @@ namespace Volo.Abp.Identity.MongoDB .OrderBy(sorting ?? nameof(IdentityClaimType.Name)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync().ConfigureAwait(false); + .ToListAsync(); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs index 4bae372c8e..10f77836c9 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken)); } public async Task> GetListAsync( @@ -41,7 +41,13 @@ namespace Volo.Abp.Identity.MongoDB .OrderBy(sorting ?? nameof(IdentityRole.Name)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public virtual async Task> GetDefaultOnesAsync( + bool includeDetails = false, CancellationToken cancellationToken = default) + { + return await GetMongoQueryable().Where(r => r.IsDefault).ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs index 9c3b8bcd0e..218c2e59e7 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs @@ -32,16 +32,16 @@ namespace Volo.Abp.Identity.MongoDB .FirstOrDefaultAsync( u => u.NormalizedUserName == normalizedUserName, GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } public async Task> GetRoleNamesAsync( Guid id, CancellationToken cancellationToken = default) { - var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)).ConfigureAwait(false); + var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)); var roleIds = user.Roles.Select(r => r.RoleId).ToArray(); - return await DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken)); } public async Task FindByLoginAsync( @@ -52,7 +52,7 @@ namespace Volo.Abp.Identity.MongoDB { return await GetMongoQueryable() .Where(u => u.Logins.Any(login => login.LoginProvider == loginProvider && login.ProviderKey == providerKey)) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public async Task FindByNormalizedEmailAsync( @@ -60,7 +60,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, GetCancellationToken(cancellationToken)); } public async Task> GetListByClaimAsync( @@ -70,7 +70,7 @@ namespace Volo.Abp.Identity.MongoDB { return await GetMongoQueryable() .Where(u => u.Claims.Any(c => c.ClaimType == claim.Type && c.ClaimValue == claim.Value)) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetListByNormalizedRoleNameAsync( @@ -78,7 +78,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var role = await DbContext.Roles.AsQueryable().Where(x => x.NormalizedName == normalizedRoleName).FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + var role = await DbContext.Roles.AsQueryable().Where(x => x.NormalizedName == normalizedRoleName).FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); if (role == null) { @@ -87,7 +87,7 @@ namespace Volo.Abp.Identity.MongoDB return await GetMongoQueryable() .Where(u => u.Roles.Any(r => r.RoleId == role.Id)) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetListAsync( @@ -108,7 +108,7 @@ namespace Volo.Abp.Identity.MongoDB .OrderBy(sorting ?? nameof(IdentityUser.UserName)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetRolesAsync( @@ -116,9 +116,9 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)).ConfigureAwait(false); + var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)); var roleIds = user.Roles.Select(r => r.RoleId).ToArray(); - return await DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)).ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync( @@ -132,7 +132,7 @@ namespace Volo.Abp.Identity.MongoDB u.UserName.Contains(filter) || u.Email.Contains(filter) ) - .LongCountAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .LongCountAsync(GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Web/FodyWeavers.xml b/modules/identity/src/Volo.Abp.Identity.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Web/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.Identity.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs b/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs index d6d61dcff4..34dc3dd4cd 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs @@ -18,8 +18,8 @@ namespace Volo.Abp.Identity.Web.Navigation var authorizationService = context.ServiceProvider.GetRequiredService(); - var hasRolePermission = await authorizationService.IsGrantedAsync(IdentityPermissions.Roles.Default).ConfigureAwait(false); - var hasUserPermission = await authorizationService.IsGrantedAsync(IdentityPermissions.Users.Default).ConfigureAwait(false); + var hasRolePermission = await authorizationService.IsGrantedAsync(IdentityPermissions.Roles.Default); + var hasUserPermission = await authorizationService.IsGrantedAsync(IdentityPermissions.Users.Default); if (hasRolePermission || hasUserPermission) { diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml.cs index 4861944c7f..b3fdad3a95 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Roles ValidateModel(); var input = ObjectMapper.Map(Role); - await _identityRoleAppService.CreateAsync(input).ConfigureAwait(false); + await _identityRoleAppService.CreateAsync(input); return NoContent(); } diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml.cs index 42f13b4bf5..8416e171b0 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Roles { Role = ObjectMapper.Map( await _identityRoleAppService.GetAsync(id) -.ConfigureAwait(false)); + ); } public async Task OnPostAsync() @@ -30,7 +30,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Roles ValidateModel(); var input = ObjectMapper.Map(Role); - await _identityRoleAppService.UpdateAsync(Role.Id, input).ConfigureAwait(false); + await _identityRoleAppService.UpdateAsync(Role.Id, input); return NoContent(); } diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js index eb0892338c..8332a95ac7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js @@ -17,6 +17,7 @@ searching: false, processing: true, serverSide: true, + scrollX: true, paging: true, ajax: abp.libs.datatables.createAjax(_identityRoleAppService.getList), columnDefs: [ diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs index e2dbedc660..aad90e73cc 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs @@ -1,8 +1,9 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Auditing; using Volo.Abp.Application.Dtos; namespace Volo.Abp.Identity.Web.Pages.Identity.Users @@ -28,7 +29,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users { UserInfo = new UserInfoViewModel(); - var roleDtoList = await _identityRoleAppService.GetListAsync(new PagedAndSortedResultRequestDto()).ConfigureAwait(false); + var roleDtoList = await _identityRoleAppService.GetListAsync(new PagedAndSortedResultRequestDto()); Roles = ObjectMapper.Map, AssignedRoleViewModel[]>(roleDtoList.Items); @@ -45,7 +46,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users var input = ObjectMapper.Map(UserInfo); input.RoleNames = Roles.Where(r => r.IsAssigned).Select(r => r.Name).ToArray(); - await _identityUserAppService.CreateAsync(input).ConfigureAwait(false); + await _identityUserAppService.CreateAsync(input); return NoContent(); } @@ -65,6 +66,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users [Required] [StringLength(IdentityUserConsts.MaxPasswordLength)] [DataType(DataType.Password)] + [DisableAuditing] public string Password { get; set; } [Required] diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs index 7a55711bd3..6c8d40c14d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs @@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Auditing; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; @@ -28,13 +29,13 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users public async Task OnGetAsync(Guid id) { - UserInfo = ObjectMapper.Map(await _identityUserAppService.GetAsync(id).ConfigureAwait(false)); + UserInfo = ObjectMapper.Map(await _identityUserAppService.GetAsync(id)); Roles = ObjectMapper.Map, AssignedRoleViewModel[]>( - (await _identityRoleAppService.GetListAsync(new PagedAndSortedResultRequestDto()).ConfigureAwait(false)).Items + (await _identityRoleAppService.GetListAsync(new PagedAndSortedResultRequestDto())).Items ); - var userRoleNames = (await _identityUserAppService.GetRolesAsync(UserInfo.Id).ConfigureAwait(false)).Items.Select(r => r.Name).ToList(); + var userRoleNames = (await _identityUserAppService.GetRolesAsync(UserInfo.Id)).Items.Select(r => r.Name).ToList(); foreach (var role in Roles) { if (userRoleNames.Contains(role.Name)) @@ -50,7 +51,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users var input = ObjectMapper.Map(UserInfo); input.RoleNames = Roles.Where(r => r.IsAssigned).Select(r => r.Name).ToArray(); - await _identityUserAppService.UpdateAsync(UserInfo.Id, input).ConfigureAwait(false); + await _identityUserAppService.UpdateAsync(UserInfo.Id, input); return NoContent(); } @@ -75,6 +76,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users [StringLength(IdentityUserConsts.MaxPasswordLength)] [DataType(DataType.Password)] + [DisableAuditing] public string Password { get; set; } [Required] diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js index 4d8486d256..64505509ba 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js @@ -15,6 +15,7 @@ order: [[1, "asc"]], processing: true, serverSide: true, + scrollX: true, paging: true, ajax: abp.libs.datatables.createAjax(_identityUserAppService.getList), columnDefs: [ diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj b/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj index 6a68d21e4b..98cdf702d4 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/FodyWeavers.xml b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/FodyWeavers.xsd b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj index ee8e336088..40a310cf2d 100644 --- a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs index 2c7920539c..09fb389163 100644 --- a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs @@ -39,11 +39,11 @@ namespace Volo.Abp.PermissionManagement.Identity if (providerName == UserPermissionValueProvider.ProviderName) { var userId = Guid.Parse(providerKey); - var roleNames = await _userRoleFinder.GetRolesAsync(userId).ConfigureAwait(false); + var roleNames = await _userRoleFinder.GetRolesAsync(userId); foreach (var roleName in roleNames) { - var permissionGrant = await PermissionGrantRepository.FindAsync(name, Name, roleName).ConfigureAwait(false); + var permissionGrant = await PermissionGrantRepository.FindAsync(name, Name, roleName); if (permissionGrant != null) { return new PermissionValueProviderGrantInfo(true, roleName); diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs index 54e8bec3b1..ca2695aaf5 100644 --- a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs @@ -27,16 +27,16 @@ namespace Volo.Abp.PermissionManagement.Identity public async Task HandleEventAsync(IdentityRoleNameChangedEvent eventData) { - var role = await RoleRepository.FindAsync(eventData.IdentityRole.Id, false).ConfigureAwait(false); + var role = await RoleRepository.FindAsync(eventData.IdentityRole.Id, false); if (role == null) { return; } - var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync(RolePermissionValueProvider.ProviderName, eventData.OldName).ConfigureAwait(false); + var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync(RolePermissionValueProvider.ProviderName, eventData.OldName); foreach (var permissionGrant in permissionGrantsInRole) { - await PermissionManager.UpdateProviderKeyAsync(permissionGrant, eventData.IdentityRole.Name).ConfigureAwait(false); + await PermissionManager.UpdateProviderKeyAsync(permissionGrant, eventData.IdentityRole.Name); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj index 58a34d0198..b86bcde846 100644 --- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj +++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityRoleAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityRoleAppService_Tests.cs index b743ee54e9..663cc07786 100644 --- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityRoleAppService_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityRoleAppService_Tests.cs @@ -23,11 +23,11 @@ namespace Volo.Abp.Identity { //Arrange - var moderator = await GetRoleAsync("moderator").ConfigureAwait(false); + var moderator = await GetRoleAsync("moderator"); //Act - var result = await _roleAppService.GetAsync(moderator.Id).ConfigureAwait(false); + var result = await _roleAppService.GetAsync(moderator.Id); //Assert @@ -39,7 +39,7 @@ namespace Volo.Abp.Identity { //Act - var result = await _roleAppService.GetListAsync(new PagedAndSortedResultRequestDto()).ConfigureAwait(false); + var result = await _roleAppService.GetListAsync(new PagedAndSortedResultRequestDto()); //Assert @@ -58,14 +58,14 @@ namespace Volo.Abp.Identity //Act - var result = await _roleAppService.CreateAsync(input).ConfigureAwait(false); + var result = await _roleAppService.CreateAsync(input); //Assert result.Id.ShouldNotBe(Guid.Empty); result.Name.ShouldBe(input.Name); - var role = await _roleRepository.GetAsync(result.Id).ConfigureAwait(false); + var role = await _roleRepository.GetAsync(result.Id); role.Name.ShouldBe(input.Name); } @@ -74,7 +74,7 @@ namespace Volo.Abp.Identity { //Arrange - var moderator = await GetRoleAsync("moderator").ConfigureAwait(false); + var moderator = await GetRoleAsync("moderator"); var input = new IdentityRoleUpdateDto { @@ -86,14 +86,14 @@ namespace Volo.Abp.Identity //Act - var result = await _roleAppService.UpdateAsync(moderator.Id, input).ConfigureAwait(false); + var result = await _roleAppService.UpdateAsync(moderator.Id, input); //Assert result.Id.ShouldBe(moderator.Id); result.Name.ShouldBe(input.Name); - var updatedRole = await _roleRepository.GetAsync(moderator.Id).ConfigureAwait(false); + var updatedRole = await _roleRepository.GetAsync(moderator.Id); updatedRole.Name.ShouldBe(input.Name); } @@ -102,15 +102,15 @@ namespace Volo.Abp.Identity { //Arrange - var moderator = await GetRoleAsync("moderator").ConfigureAwait(false); + var moderator = await GetRoleAsync("moderator"); //Act - await _roleAppService.DeleteAsync(moderator.Id).ConfigureAwait(false); + await _roleAppService.DeleteAsync(moderator.Id); //Assert - (await FindRoleAsync("moderator").ConfigureAwait(false)).ShouldBeNull(); + (await FindRoleAsync("moderator")).ShouldBeNull(); } private async Task GetRoleAsync(string roleName) diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs index 19cfb705fd..6fbf23ed73 100644 --- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.Identity //Act - var result = await _userAppService.GetAsync(johnNash.Id).ConfigureAwait(false); + var result = await _userAppService.GetAsync(johnNash.Id); //Assert @@ -44,7 +44,7 @@ namespace Volo.Abp.Identity { //Act - var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()).ConfigureAwait(false); + var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()); //Assert @@ -69,7 +69,7 @@ namespace Volo.Abp.Identity //Act - var result = await _userAppService.CreateAsync(input).ConfigureAwait(false); + var result = await _userAppService.CreateAsync(input); //Assert @@ -79,7 +79,7 @@ namespace Volo.Abp.Identity result.LockoutEnabled.ShouldBe(input.LockoutEnabled); result.PhoneNumber.ShouldBe(input.PhoneNumber); - var user = await _userRepository.GetAsync(result.Id).ConfigureAwait(false); + var user = await _userRepository.GetAsync(result.Id); user.Id.ShouldBe(result.Id); user.UserName.ShouldBe(input.UserName); user.Email.ShouldBe(input.Email); @@ -110,7 +110,7 @@ namespace Volo.Abp.Identity //Act - var result = await _userAppService.UpdateAsync(johnNash.Id, input).ConfigureAwait(false); + var result = await _userAppService.UpdateAsync(johnNash.Id, input); //Assert @@ -120,7 +120,7 @@ namespace Volo.Abp.Identity result.LockoutEnabled.ShouldBe(input.LockoutEnabled); result.PhoneNumber.ShouldBe(input.PhoneNumber); - var user = await _userRepository.GetAsync(result.Id).ConfigureAwait(false); + var user = await _userRepository.GetAsync(result.Id); user.Id.ShouldBe(result.Id); user.UserName.ShouldBe(input.UserName); user.Email.ShouldBe(input.Email); @@ -134,7 +134,7 @@ namespace Volo.Abp.Identity public async Task UpdateAsync_Concurrency_Exception() { //Get user - var johnNash = await _userAppService.GetAsync(_testData.UserJohnId).ConfigureAwait(false); + var johnNash = await _userAppService.GetAsync(_testData.UserJohnId); //Act @@ -151,13 +151,13 @@ namespace Volo.Abp.Identity ConcurrencyStamp = johnNash.ConcurrencyStamp }; - await _userAppService.UpdateAsync(johnNash.Id, input).ConfigureAwait(false); + await _userAppService.UpdateAsync(johnNash.Id, input); //Second update with same input will throw exception because the entity has been modified (await Assert.ThrowsAsync(async () => { - await _userAppService.UpdateAsync(johnNash.Id, input).ConfigureAwait(false); - }).ConfigureAwait(false)).Message.ShouldContain("Optimistic concurrency failure"); + await _userAppService.UpdateAsync(johnNash.Id, input); + })).Message.ShouldContain("Optimistic concurrency failure"); } [Fact] @@ -169,7 +169,7 @@ namespace Volo.Abp.Identity //Act - await _userAppService.DeleteAsync(johnNash.Id).ConfigureAwait(false); + await _userAppService.DeleteAsync(johnNash.Id); //Assert @@ -185,7 +185,7 @@ namespace Volo.Abp.Identity //Act - var result = await _userAppService.GetRolesAsync(johnNash.Id).ConfigureAwait(false); + var result = await _userAppService.GetRolesAsync(johnNash.Id); //Assert @@ -209,11 +209,11 @@ namespace Volo.Abp.Identity { RoleNames = new[] { "admin", "moderator" } } - ).ConfigureAwait(false); + ); //Assert - var roleNames = await _userRepository.GetRoleNamesAsync(johnNash.Id).ConfigureAwait(false); + var roleNames = await _userRepository.GetRoleNamesAsync(johnNash.Id); roleNames.Count.ShouldBe(2); roleNames.ShouldContain("admin"); roleNames.ShouldContain("moderator"); diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs index f28c65be83..227977cf15 100644 --- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs @@ -24,32 +24,32 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByIdAsync() { - var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserLookupAppService.FindByIdAsync(user.Id).ConfigureAwait(false)).UserName.ShouldBe(user.UserName); + (await _identityUserLookupAppService.FindByIdAsync(user.Id)).UserName.ShouldBe(user.UserName); } [Fact] public async Task FindById_NotExist_Should_Return_Null() { - var user = await _identityUserLookupAppService.FindByIdAsync(Guid.NewGuid()).ConfigureAwait(false); + var user = await _identityUserLookupAppService.FindByIdAsync(Guid.NewGuid()); user.ShouldBeNull(); } [Fact] public async Task FindByUserNameAsync() { - var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserLookupAppService.FindByUserNameAsync(user.UserName).ConfigureAwait(false)).UserName.ShouldBe(user.UserName); + (await _identityUserLookupAppService.FindByUserNameAsync(user.UserName)).UserName.ShouldBe(user.UserName); } [Fact] public async Task FindByUserName_NotExist_Should_Return_Null() { - var user = await _identityUserLookupAppService.FindByUserNameAsync(Guid.NewGuid().ToString()).ConfigureAwait(false); + var user = await _identityUserLookupAppService.FindByUserNameAsync(Guid.NewGuid().ToString()); user.ShouldBeNull(); } } diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/ProfileAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/ProfileAppService_Tests.cs index c6e2d45055..fc0334ce05 100644 --- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/ProfileAppService_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/ProfileAppService_Tests.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.Identity _currentUser.IsAuthenticated.Returns(true); //Act - var result = await _profileAppService.GetAsync().ConfigureAwait(false); + var result = await _profileAppService.GetAsync(); //Assert var johnNash = GetUser("john.nash"); @@ -62,7 +62,7 @@ namespace Volo.Abp.Identity }; //Act - var result = await _profileAppService.UpdateAsync(input).ConfigureAwait(false); + var result = await _profileAppService.UpdateAsync(input); //Assert result.UserName.ShouldBe(input.UserName); diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj index 59614115e4..731a1eeab1 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs index e16228290c..95e8f925c4 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs @@ -40,11 +40,11 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); - await _userManager.SetEmailAsync(user, "john.nash_UPDATED@abp.io").ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); + await _userManager.SetEmailAsync(user, "john.nash_UPDATED@abp.io"); _testCounter.GetValue("EntityUpdatedEto").ShouldBe(0); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } _testCounter.GetValue("EntityUpdatedEto").ShouldBe(1); diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs index c7622bec8b..c5c68d40c6 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Identity { var claimType = await _claimTypeManager.CreateAsync(new IdentityClaimType(Guid.NewGuid(), "Phone", false, false, null, - null, null, IdentityClaimValueType.String)).ConfigureAwait(false); + null, null, IdentityClaimValueType.String)); claimType.ShouldNotBeNull(); claimType.Name.ShouldBe("Phone"); @@ -36,17 +36,17 @@ namespace Volo.Abp.Identity { await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.CreateAsync( new IdentityClaimType( - Guid.NewGuid(), "Age")).ConfigureAwait(false)).ConfigureAwait(false); + Guid.NewGuid(), "Age"))); } [Fact] public async Task UpdateAsync() { - var ageClaim = await _identityClaimTypeRepository.FindAsync(_testData.AgeClaimId).ConfigureAwait(false); + var ageClaim = await _identityClaimTypeRepository.FindAsync(_testData.AgeClaimId); ageClaim.ShouldNotBeNull(); ageClaim.Description = "this is age"; - var updatedAgeClaimType = await _claimTypeManager.UpdateAsync(ageClaim).ConfigureAwait(false); + var updatedAgeClaimType = await _claimTypeManager.UpdateAsync(ageClaim); updatedAgeClaimType.ShouldNotBeNull(); updatedAgeClaimType.Description.ShouldBe("this is age"); } @@ -57,7 +57,7 @@ namespace Volo.Abp.Identity { await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync( new IdentityClaimType( - Guid.NewGuid(), "Age")).ConfigureAwait(false)).ConfigureAwait(false); + Guid.NewGuid(), "Age"))); } @@ -65,9 +65,9 @@ namespace Volo.Abp.Identity public async Task Static_IdentityClaimType_Cant_Not_Update() { var phoneClaim = new IdentityClaimType(Guid.NewGuid(), "Phone", true, true); - await _identityClaimTypeRepository.InsertAsync(phoneClaim).ConfigureAwait(false); + await _identityClaimTypeRepository.InsertAsync(phoneClaim); - await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync(phoneClaim).ConfigureAwait(false)).ConfigureAwait(false); + await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync(phoneClaim)); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs index fbb2a3c023..4314f3eac6 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.Identity [Fact] public async Task GetByIdAsync() { - var role = await _identityRoleManager.FindByIdAsync(_testData.RoleModeratorId.ToString()).ConfigureAwait(false); + var role = await _identityRoleManager.FindByIdAsync(_testData.RoleModeratorId.ToString()); role.ShouldNotBeNull(); role.Name.ShouldBe("moderator"); @@ -37,10 +37,10 @@ namespace Volo.Abp.Identity [Fact] public async Task SetRoleNameAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - (await _identityRoleManager.SetRoleNameAsync(role, "teacher").ConfigureAwait(false)).Succeeded.ShouldBeTrue(); + (await _identityRoleManager.SetRoleNameAsync(role, "teacher")).Succeeded.ShouldBeTrue(); role.Name.ShouldBe("teacher"); } @@ -48,12 +48,12 @@ namespace Volo.Abp.Identity [Fact] public async Task DeleteAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - await _identityRoleManager.DeleteAsync(role).ConfigureAwait(false); + await _identityRoleManager.DeleteAsync(role); - (await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false)).ShouldBeNull(); + (await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"))).ShouldBeNull(); } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs index 9a4d9d194d..11345a4a46 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs @@ -32,9 +32,9 @@ namespace Volo.Abp.Identity { var roleId = Guid.NewGuid(); var role = new IdentityRole(roleId, "teacher"); - (await _identityRoleStore.CreateAsync(role).ConfigureAwait(false)).Succeeded.ShouldBeTrue(); + (await _identityRoleStore.CreateAsync(role)).Succeeded.ShouldBeTrue(); - var teacher = await _identityRoleStore.FindByIdAsync(roleId.ToString()).ConfigureAwait(false); + var teacher = await _identityRoleStore.FindByIdAsync(roleId.ToString()); teacher.ShouldNotBeNull(); teacher.Name.ShouldBe("teacher"); @@ -43,11 +43,11 @@ namespace Volo.Abp.Identity [Fact] public async Task UpdateAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); role.IsDefault = true; - await _identityRoleStore.UpdateAsync(role).ConfigureAwait(false); + await _identityRoleStore.UpdateAsync(role); role.IsDefault.ShouldBeTrue(); } @@ -56,40 +56,40 @@ namespace Volo.Abp.Identity [Fact] public async Task DeleteAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - await _identityRoleStore.DeleteAsync(role).ConfigureAwait(false); + await _identityRoleStore.DeleteAsync(role); - (await _identityRoleStore.FindByIdAsync(_testData.RoleModeratorId.ToString()).ConfigureAwait(false)).ShouldBeNull(); + (await _identityRoleStore.FindByIdAsync(_testData.RoleModeratorId.ToString())).ShouldBeNull(); } [Fact] public async Task GetRoleIdAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - (await _identityRoleStore.GetRoleIdAsync(role).ConfigureAwait(false)).ShouldBe(_testData.RoleModeratorId.ToString()); + (await _identityRoleStore.GetRoleIdAsync(role)).ShouldBe(_testData.RoleModeratorId.ToString()); } [Fact] public async Task GetRoleNameAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - (await _identityRoleStore.GetRoleNameAsync(role).ConfigureAwait(false)).ShouldBe(role.Name); + (await _identityRoleStore.GetRoleNameAsync(role)).ShouldBe(role.Name); } [Fact] public async Task SetRoleNameAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - await _identityRoleStore.SetRoleNameAsync(role, "teacher").ConfigureAwait(false); + await _identityRoleStore.SetRoleNameAsync(role, "teacher"); role.Name.ShouldBe("teacher"); } @@ -97,7 +97,7 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByIdAsync() { - var role = await _identityRoleStore.FindByIdAsync(_testData.RoleModeratorId.ToString()).ConfigureAwait(false); + var role = await _identityRoleStore.FindByIdAsync(_testData.RoleModeratorId.ToString()); role.ShouldNotBeNull(); role.Name.ShouldBe("moderator"); @@ -106,7 +106,7 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByNameAsync() { - var role = await _identityRoleStore.FindByNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleStore.FindByNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); role.Name.ShouldBe("moderator"); @@ -115,19 +115,19 @@ namespace Volo.Abp.Identity [Fact] public async Task GetNormalizedRoleNameAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - (await _identityRoleStore.GetNormalizedRoleNameAsync(role).ConfigureAwait(false)).ShouldBe(role.NormalizedName); + (await _identityRoleStore.GetNormalizedRoleNameAsync(role)).ShouldBe(role.NormalizedName); } [Fact] public async Task SetNormalizedRoleNameAsync() { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - await _identityRoleStore.SetNormalizedRoleNameAsync(role, _lookupNormalizer.NormalizeName("teacher")).ConfigureAwait(false); + await _identityRoleStore.SetNormalizedRoleNameAsync(role, _lookupNormalizer.NormalizeName("teacher")); role.NormalizedName.ShouldBe(_lookupNormalizer.NormalizeName("teacher")); } @@ -137,15 +137,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - var claims = await _identityRoleStore.GetClaimsAsync(role).ConfigureAwait(false); + var claims = await _identityRoleStore.GetClaimsAsync(role); claims.ShouldNotBeEmpty(); claims.ShouldContain(x => x.Type == "test-claim" && x.Value == "test-value"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -156,7 +156,7 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); role.Claims.Add(new IdentityRoleClaim(Guid.NewGuid(), role.Id, "my-claim", "my-value", role.TenantId)); @@ -164,7 +164,7 @@ namespace Volo.Abp.Identity //role.Claims.ShouldContain(x => x.ClaimType == "my-claim" && x.ClaimValue == "my-value"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -173,7 +173,7 @@ namespace Volo.Abp.Identity throw; } - var role2 = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role2 = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role2.ShouldNotBeNull(); role2.Claims.ShouldContain(x => x.ClaimType == "my-claim" && x.ClaimValue == "my-value"); } @@ -183,14 +183,14 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator")); role.ShouldNotBeNull(); - await _identityRoleStore.RemoveClaimAsync(role, new Claim("test-claim", "test-value")).ConfigureAwait(false); + await _identityRoleStore.RemoveClaimAsync(role, new Claim("test-claim", "test-value")); role.Claims.ShouldNotContain(x => x.ClaimType == "test-claim" && x.ClaimValue == "test-value"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs index bc03f35c49..761655deb2 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.Identity [Fact] public async Task GetByIdAsync() { - var user = await _identityUserManager.GetByIdAsync(_testData.UserJohnId).ConfigureAwait(false); + var user = await _identityUserManager.GetByIdAsync(_testData.UserJohnId); user.ShouldNotBeNull(); user.UserName.ShouldBe("john.nash"); @@ -43,18 +43,18 @@ namespace Volo.Abp.Identity using (var uow = _unitOfWorkManager.Begin()) { var user = await _identityUserRepository.FindByNormalizedUserNameAsync( - _lookupNormalizer.NormalizeName("david")).ConfigureAwait(false); + _lookupNormalizer.NormalizeName("david")); user.ShouldNotBeNull(); var identityResult = await _identityUserManager.SetRolesAsync(user, new List() { "moderator", - }).ConfigureAwait(false); + }); identityResult.Succeeded.ShouldBeTrue(); user.Roles.ShouldContain(x => x.RoleId == _testData.RoleModeratorId); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -64,23 +64,23 @@ namespace Volo.Abp.Identity using (var uow = _unitOfWorkManager.Begin()) { var roleSupporter = - await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("supporter")).ConfigureAwait(false); + await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("supporter")); roleSupporter.ShouldNotBeNull(); var user = await _identityUserRepository.FindByNormalizedUserNameAsync( - _lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + _lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var identityResult = await _identityUserManager.SetRolesAsync(user, new List() { "admin", - }).ConfigureAwait(false); + }); identityResult.Succeeded.ShouldBeTrue(); user.Roles.ShouldNotContain(x => x.RoleId == _testData.RoleModeratorId); user.Roles.ShouldNotContain(x => x.RoleId == roleSupporter.Id); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs index 6c7b6610ae..6e84a88450 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs @@ -29,29 +29,29 @@ namespace Volo.Abp.Identity [Fact] public async Task GetUserIdAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetUserIdAsync(user).ConfigureAwait(false)).ShouldBe(user.Id.ToString()); + (await _identityUserStore.GetUserIdAsync(user)).ShouldBe(user.Id.ToString()); } [Fact] public async Task GetUserNameAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetUserNameAsync(user).ConfigureAwait(false)).ShouldBe(user.UserName); + (await _identityUserStore.GetUserNameAsync(user)).ShouldBe(user.UserName); } [Fact] public async Task SetUserNameAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetUserNameAsync(user, "bob.lee").ConfigureAwait(false); + await _identityUserStore.SetUserNameAsync(user, "bob.lee"); user.UserName.ShouldBe("bob.lee"); //user.NormalizedUserName.ShouldBe(_lookupNormalizer.Normalize("bob.lee")); } @@ -60,19 +60,19 @@ namespace Volo.Abp.Identity [Fact] public async Task GetNormalizedUserNameAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetNormalizedUserNameAsync(user).ConfigureAwait(false)).ShouldBe(user.NormalizedUserName); + (await _identityUserStore.GetNormalizedUserNameAsync(user)).ShouldBe(user.NormalizedUserName); } [Fact] public async Task SetNormalizedUserNameAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetNormalizedUserNameAsync(user, _lookupNormalizer.NormalizeName("bob.lee")).ConfigureAwait(false); + await _identityUserStore.SetNormalizedUserNameAsync(user, _lookupNormalizer.NormalizeName("bob.lee")); user.NormalizedUserName.ShouldBe(_lookupNormalizer.NormalizeName("bob.lee")); } @@ -83,9 +83,9 @@ namespace Volo.Abp.Identity var userId = Guid.NewGuid(); var user = new IdentityUser(userId, "bob.lee", "bob.lee@abp.io"); - await _identityUserStore.CreateAsync(user).ConfigureAwait(false); + await _identityUserStore.CreateAsync(user); - var bobLee = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("bob.lee")).ConfigureAwait(false); + var bobLee = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("bob.lee")); bobLee.ShouldNotBeNull(); bobLee.UserName.ShouldBe("bob.lee"); bobLee.Email.ShouldBe("bob.lee@abp.io"); @@ -94,26 +94,26 @@ namespace Volo.Abp.Identity [Fact] public async Task UpdateAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.Name = "lee"; - (await _identityUserStore.UpdateAsync(user).ConfigureAwait(false)).Succeeded.ShouldBeTrue(); + (await _identityUserStore.UpdateAsync(user)).Succeeded.ShouldBeTrue(); - (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false)).Name + (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"))).Name .ShouldBe("lee"); } [Fact] public async Task Update_Concurrency() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.UpdateAsync(user).ConfigureAwait(false)).Succeeded.ShouldBeTrue(); + (await _identityUserStore.UpdateAsync(user)).Succeeded.ShouldBeTrue(); user.ConcurrencyStamp = Guid.NewGuid().ToString(); - var identityResult = await _identityUserStore.UpdateAsync(user).ConfigureAwait(false); + var identityResult = await _identityUserStore.UpdateAsync(user); identityResult.Succeeded.ShouldBeFalse(); identityResult.Errors.ShouldContain(x => @@ -126,19 +126,19 @@ namespace Volo.Abp.Identity [Fact] public async Task DeleteAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.DeleteAsync(user).ConfigureAwait(false)).Succeeded.ShouldBeTrue(); + (await _identityUserStore.DeleteAsync(user)).Succeeded.ShouldBeTrue(); - (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false)).ShouldBeNull(); + (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"))).ShouldBeNull(); } [Fact] public async Task FindByIdAsync() { - var user = await _identityUserStore.FindByIdAsync(_testData.UserJohnId.ToString()).ConfigureAwait(false); + var user = await _identityUserStore.FindByIdAsync(_testData.UserJohnId.ToString()); user.ShouldNotBeNull(); user.UserName.ShouldBe("john.nash"); @@ -148,7 +148,7 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByNameAsync() { - var user = await _identityUserStore.FindByNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _identityUserStore.FindByNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.UserName.ShouldBe("john.nash"); @@ -158,11 +158,11 @@ namespace Volo.Abp.Identity [Fact] public async Task SetPasswordHashAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.PasswordHash.ShouldBeNull(); - await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd").ConfigureAwait(false); + await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd"); user.PasswordHash.ShouldBe("P@ssw0rd"); } @@ -170,23 +170,23 @@ namespace Volo.Abp.Identity [Fact] public async Task GetPasswordHashAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd").ConfigureAwait(false); + await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd"); - (await _identityUserStore.GetPasswordHashAsync(user).ConfigureAwait(false)).ShouldBe("P@ssw0rd"); + (await _identityUserStore.GetPasswordHashAsync(user)).ShouldBe("P@ssw0rd"); } [Fact] public async Task HasPasswordAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.HasPasswordAsync(user).ConfigureAwait(false)).ShouldBeFalse(); + (await _identityUserStore.HasPasswordAsync(user)).ShouldBeFalse(); - await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd").ConfigureAwait(false); - (await _identityUserStore.HasPasswordAsync(user).ConfigureAwait(false)).ShouldBeTrue(); + await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd"); + (await _identityUserStore.HasPasswordAsync(user)).ShouldBeTrue(); } [Fact] @@ -194,15 +194,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("david")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("david")); user.ShouldNotBeNull(); user.Roles.ShouldBeEmpty(); - await _identityUserStore.AddToRoleAsync(user, _lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + await _identityUserStore.AddToRoleAsync(user, _lookupNormalizer.NormalizeName("moderator")); user.Roles.ShouldContain(x => x.RoleId == _testData.RoleModeratorId); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -211,15 +211,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.Roles.ShouldContain(x => x.RoleId == _testData.RoleModeratorId); - await _identityUserStore.RemoveFromRoleAsync(user, _lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + await _identityUserStore.RemoveFromRoleAsync(user, _lookupNormalizer.NormalizeName("moderator")); user.Roles.ShouldNotContain(x => x.RoleId == _testData.RoleModeratorId); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -227,10 +227,10 @@ namespace Volo.Abp.Identity [Fact] public async Task GetRolesAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - var roleNames = await _identityUserStore.GetRolesAsync(user).ConfigureAwait(false); + var roleNames = await _identityUserStore.GetRolesAsync(user); roleNames.ShouldNotBeEmpty(); roleNames.ShouldContain(x => x == "moderator"); roleNames.ShouldContain(x => x == "supporter"); @@ -241,13 +241,13 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false)).ShouldBeTrue(); - (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.NormalizeName("moderatorNotExist")).ConfigureAwait(false)).ShouldBeFalse(); + (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.NormalizeName("moderator"))).ShouldBeTrue(); + (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.NormalizeName("moderatorNotExist"))).ShouldBeFalse(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -256,14 +256,14 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - var claims = await _identityUserStore.GetClaimsAsync(user).ConfigureAwait(false); + var claims = await _identityUserStore.GetClaimsAsync(user); claims.ShouldNotBeEmpty(); claims.ShouldContain(x => x.Type == "TestClaimType" && x.Value == "42"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -272,18 +272,18 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.Claims.ShouldNotContain(x => x.ClaimType == "MyClaimType" && x.ClaimValue == "MyClaimValue"); await _identityUserStore.AddClaimsAsync(user, new List() { new Claim("MyClaimType", "MyClaimValue") - }).ConfigureAwait(false); + }); user.Claims.ShouldContain(x => x.ClaimType == "MyClaimType" && x.ClaimValue == "MyClaimValue"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -292,15 +292,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.ReplaceClaimAsync(user, new Claim("TestClaimType", "42"), new Claim("MyClaimType", "MyClaimValue")).ConfigureAwait(false); + await _identityUserStore.ReplaceClaimAsync(user, new Claim("TestClaimType", "42"), new Claim("MyClaimType", "MyClaimValue")); user.Claims.ShouldNotContain(x => x.ClaimType == "TestClaimType" && x.ClaimValue == "42"); user.Claims.ShouldContain(x => x.ClaimType == "MyClaimType" && x.ClaimValue == "MyClaimValue"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -309,17 +309,17 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); await _identityUserStore.RemoveClaimsAsync(user, new List() { new Claim("TestClaimType", "42") - }).ConfigureAwait(false); + }); user.Claims.ShouldNotContain(x => x.ClaimType == "TestClaimType" && x.ClaimValue == "42"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -328,15 +328,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.Logins.ShouldNotContain(x => x.LoginProvider == "facebook" && x.ProviderKey == "john"); - await _identityUserStore.AddLoginAsync(user, new UserLoginInfo("facebook", "john", "John Nash")).ConfigureAwait(false); + await _identityUserStore.AddLoginAsync(user, new UserLoginInfo("facebook", "john", "John Nash")); user.Logins.ShouldContain(x => x.LoginProvider == "facebook" && x.ProviderKey == "john"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -345,15 +345,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); user.Logins.ShouldContain(x => x.LoginProvider == "github" && x.ProviderKey == "john"); - await _identityUserStore.RemoveLoginAsync(user, "github", "john").ConfigureAwait(false); + await _identityUserStore.RemoveLoginAsync(user, "github", "john"); user.Logins.ShouldNotContain(x => x.LoginProvider == "github" && x.ProviderKey == "john"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -363,16 +363,16 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - var logins = await _identityUserStore.GetLoginsAsync(user).ConfigureAwait(false); + var logins = await _identityUserStore.GetLoginsAsync(user); logins.ShouldNotBeNull(); logins.ShouldContain(x => x.LoginProvider == "github" && x.ProviderKey == "john"); logins.ShouldContain(x => x.LoginProvider == "twitter" && x.ProviderKey == "johnx"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -380,7 +380,7 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByLoginAsync() { - var user = await _identityUserStore.FindByLoginAsync("github", "john").ConfigureAwait(false); + var user = await _identityUserStore.FindByLoginAsync("github", "john"); user.ShouldNotBeNull(); user.UserName.ShouldBe("john.nash"); } @@ -389,21 +389,21 @@ namespace Volo.Abp.Identity [Fact] public async Task GetEmailConfirmedAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetEmailConfirmedAsync(user).ConfigureAwait(false)).ShouldBe(user.EmailConfirmed); + (await _identityUserStore.GetEmailConfirmedAsync(user)).ShouldBe(user.EmailConfirmed); } [Fact] public async Task SetEmailConfirmedAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var emailConfirmed = user.EmailConfirmed; - await _identityUserStore.SetEmailConfirmedAsync(user, !emailConfirmed).ConfigureAwait(false); + await _identityUserStore.SetEmailConfirmedAsync(user, !emailConfirmed); user.EmailConfirmed.ShouldBe(!emailConfirmed); } @@ -411,10 +411,10 @@ namespace Volo.Abp.Identity [Fact] public async Task SetEmailAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetEmailAsync(user, "john.nash.kobe@abp.io").ConfigureAwait(false); + await _identityUserStore.SetEmailAsync(user, "john.nash.kobe@abp.io"); user.Email.ShouldBe("john.nash.kobe@abp.io"); //user.NormalizedEmail.ShouldBe(_lookupNormalizer.Normalize("john.nash.kobe@abp.io")); @@ -423,28 +423,28 @@ namespace Volo.Abp.Identity [Fact] public async Task GetEmailAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetEmailAsync(user).ConfigureAwait(false)).ShouldBe(user.Email); + (await _identityUserStore.GetEmailAsync(user)).ShouldBe(user.Email); } [Fact] public async Task GetNormalizedEmailAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetNormalizedEmailAsync(user).ConfigureAwait(false)).ShouldBe(user.NormalizedEmail); + (await _identityUserStore.GetNormalizedEmailAsync(user)).ShouldBe(user.NormalizedEmail); } [Fact] public async Task SetNormalizedEmailAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetNormalizedEmailAsync(user, _lookupNormalizer.NormalizeEmail("john.nash.kobe@abp.io")).ConfigureAwait(false); + await _identityUserStore.SetNormalizedEmailAsync(user, _lookupNormalizer.NormalizeEmail("john.nash.kobe@abp.io")); user.NormalizedEmail.ShouldBe(_lookupNormalizer.NormalizeEmail("john.nash.kobe@abp.io")); } @@ -452,7 +452,7 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByEmailAsync() { - var user = await _identityUserStore.FindByEmailAsync(_lookupNormalizer.NormalizeEmail("john.nash@abp.io")).ConfigureAwait(false); + var user = await _identityUserStore.FindByEmailAsync(_lookupNormalizer.NormalizeEmail("john.nash@abp.io")); user.ShouldNotBeNull(); user.Email.ShouldBe("john.nash@abp.io"); @@ -461,19 +461,19 @@ namespace Volo.Abp.Identity [Fact] public async Task GetLockoutEndDateAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetLockoutEndDateAsync(user).ConfigureAwait(false)).ShouldBe(user.LockoutEnd); + (await _identityUserStore.GetLockoutEndDateAsync(user)).ShouldBe(user.LockoutEnd); } [Fact] public async Task SetLockoutEndDateAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetLockoutEndDateAsync(user, DateTimeOffset.Parse("01/01/2019")).ConfigureAwait(false); + await _identityUserStore.SetLockoutEndDateAsync(user, DateTimeOffset.Parse("01/01/2019")); user.LockoutEnd.ShouldBe(DateTimeOffset.Parse("01/01/2019")); } @@ -482,11 +482,11 @@ namespace Volo.Abp.Identity [Fact] public async Task IncrementAccessFailedCountAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var count = user.AccessFailedCount; - await _identityUserStore.IncrementAccessFailedCountAsync(user).ConfigureAwait(false); + await _identityUserStore.IncrementAccessFailedCountAsync(user); user.AccessFailedCount.ShouldBe(count + 1); } @@ -494,10 +494,10 @@ namespace Volo.Abp.Identity [Fact] public async Task ResetAccessFailedCountAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.ResetAccessFailedCountAsync(user).ConfigureAwait(false); + await _identityUserStore.ResetAccessFailedCountAsync(user); user.AccessFailedCount.ShouldBe(0); } @@ -505,29 +505,29 @@ namespace Volo.Abp.Identity [Fact] public async Task GetAccessFailedCountAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetAccessFailedCountAsync(user).ConfigureAwait(false)).ShouldBe(user.AccessFailedCount); + (await _identityUserStore.GetAccessFailedCountAsync(user)).ShouldBe(user.AccessFailedCount); } [Fact] public async Task GetLockoutEnabledAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetLockoutEnabledAsync(user).ConfigureAwait(false)).ShouldBe(user.LockoutEnabled); + (await _identityUserStore.GetLockoutEnabledAsync(user)).ShouldBe(user.LockoutEnabled); } [Fact] public async Task SetLockoutEnabledAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var lockoutEnabled = user.LockoutEnabled; - await _identityUserStore.SetLockoutEnabledAsync(user, !lockoutEnabled).ConfigureAwait(false); + await _identityUserStore.SetLockoutEnabledAsync(user, !lockoutEnabled); user.LockoutEnabled.ShouldBe(!lockoutEnabled); } @@ -536,10 +536,10 @@ namespace Volo.Abp.Identity [Fact] public async Task SetPhoneNumberAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetPhoneNumberAsync(user, "13800138000").ConfigureAwait(false); + await _identityUserStore.SetPhoneNumberAsync(user, "13800138000"); user.PhoneNumber.ShouldBe("13800138000"); } @@ -548,30 +548,30 @@ namespace Volo.Abp.Identity [Fact] public async Task GetPhoneNumberAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetPhoneNumberAsync(user).ConfigureAwait(false)).ShouldBe(user.PhoneNumber); + (await _identityUserStore.GetPhoneNumberAsync(user)).ShouldBe(user.PhoneNumber); } [Fact] public async Task GetPhoneNumberConfirmedAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetPhoneNumberConfirmedAsync(user).ConfigureAwait(false)).ShouldBe(user.PhoneNumberConfirmed); + (await _identityUserStore.GetPhoneNumberConfirmedAsync(user)).ShouldBe(user.PhoneNumberConfirmed); } [Fact] public async Task SetPhoneNumberConfirmedAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var phoneNumberConfirmed = user.PhoneNumberConfirmed; - await _identityUserStore.SetPhoneNumberConfirmedAsync(user, !phoneNumberConfirmed).ConfigureAwait(false); + await _identityUserStore.SetPhoneNumberConfirmedAsync(user, !phoneNumberConfirmed); user.PhoneNumberConfirmed.ShouldBe(!phoneNumberConfirmed); } @@ -580,11 +580,11 @@ namespace Volo.Abp.Identity [Fact] public async Task SetSecurityStampAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var securityStamp = Guid.NewGuid().ToString(); - await _identityUserStore.SetSecurityStampAsync(user, securityStamp).ConfigureAwait(false); + await _identityUserStore.SetSecurityStampAsync(user, securityStamp); user.SecurityStamp.ShouldBe(securityStamp); } @@ -592,21 +592,21 @@ namespace Volo.Abp.Identity [Fact] public async Task GetSecurityStampAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetSecurityStampAsync(user).ConfigureAwait(false)).ShouldBe(user.SecurityStamp); + (await _identityUserStore.GetSecurityStampAsync(user)).ShouldBe(user.SecurityStamp); } [Fact] public async Task SetTwoFactorEnabledAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); var twoFactorEnabled = user.TwoFactorEnabled; - await _identityUserStore.SetTwoFactorEnabledAsync(user, !twoFactorEnabled).ConfigureAwait(false); + await _identityUserStore.SetTwoFactorEnabledAsync(user, !twoFactorEnabled); user.TwoFactorEnabled.ShouldBe(!twoFactorEnabled); } @@ -615,16 +615,16 @@ namespace Volo.Abp.Identity [Fact] public async Task GetTwoFactorEnabledAsync() { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetTwoFactorEnabledAsync(user).ConfigureAwait(false)).ShouldBe(user.TwoFactorEnabled); + (await _identityUserStore.GetTwoFactorEnabledAsync(user)).ShouldBe(user.TwoFactorEnabled); } [Fact] public async Task GetUsersForClaimAsync() { - var user = await _identityUserStore.GetUsersForClaimAsync(new Claim("TestClaimType", "42")).ConfigureAwait(false); + var user = await _identityUserStore.GetUsersForClaimAsync(new Claim("TestClaimType", "42")); user.ShouldNotBeNull(); user.ShouldNotBeEmpty(); user.ShouldContain(x => x.UserName == "john.nash"); @@ -633,7 +633,7 @@ namespace Volo.Abp.Identity [Fact] public async Task GetUsersInRoleAsync() { - var user = await _identityUserStore.GetUsersInRoleAsync(_lookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var user = await _identityUserStore.GetUsersInRoleAsync(_lookupNormalizer.NormalizeName("moderator")); user.ShouldNotBeNull(); user.ShouldContain(x => x.UserName == "john.nash"); } @@ -643,15 +643,15 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetTokenAsync(user, "test-provider", "test-name", "123123").ConfigureAwait(false); + await _identityUserStore.SetTokenAsync(user, "test-provider", "test-name", "123123"); user.Tokens.ShouldNotBeEmpty(); user.Tokens.ShouldContain(x => x.LoginProvider == "test-provider" && x.Name == "test-name" && x.Value == "123123"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -660,14 +660,14 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.RemoveTokenAsync(user, "test-provider", "test-name").ConfigureAwait(false); + await _identityUserStore.RemoveTokenAsync(user, "test-provider", "test-name"); user.Tokens.ShouldNotContain(x => x.LoginProvider == "test-provider" && x.Name == "test-name" && x.Value == "123123"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -676,12 +676,12 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - (await _identityUserStore.GetTokenAsync(user, "test-provider", "test-name").ConfigureAwait(false)).ShouldBe("test-value"); + (await _identityUserStore.GetTokenAsync(user, "test-provider", "test-name")).ShouldBe("test-value"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -690,14 +690,14 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetAuthenticatorKeyAsync(user, "testKey").ConfigureAwait(false); + await _identityUserStore.SetAuthenticatorKeyAsync(user, "testKey"); user.Tokens.ShouldContain(x => x.LoginProvider == "[AspNetUserStore]" && x.Name == "AuthenticatorKey" && x.Value == "testKey"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -706,13 +706,13 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetAuthenticatorKeyAsync(user, "testKey").ConfigureAwait(false); + await _identityUserStore.SetAuthenticatorKeyAsync(user, "testKey"); - (await _identityUserStore.GetAuthenticatorKeyAsync(user).ConfigureAwait(false)).ShouldBe("testKey"); + (await _identityUserStore.GetAuthenticatorKeyAsync(user)).ShouldBe("testKey"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -722,13 +722,13 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetTokenAsync(user, "[AspNetUserStore]", "RecoveryCodes", "testKey;testKey2").ConfigureAwait(false); + await _identityUserStore.SetTokenAsync(user, "[AspNetUserStore]", "RecoveryCodes", "testKey;testKey2"); - (await _identityUserStore.CountCodesAsync(user).ConfigureAwait(false)).ShouldBe(2); + (await _identityUserStore.CountCodesAsync(user)).ShouldBe(2); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -737,18 +737,18 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); await _identityUserStore.ReplaceCodesAsync(user, new List() { "testKey", "testKey2" - }).ConfigureAwait(false); + }); user.Tokens.ShouldContain(x => x.LoginProvider == "[AspNetUserStore]" && x.Name == "RecoveryCodes" && x.Value == "testKey;testKey2"); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -757,13 +757,13 @@ namespace Volo.Abp.Identity { using (var uow = _unitOfWorkManager.Begin()) { - var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash")); user.ShouldNotBeNull(); - await _identityUserStore.SetTokenAsync(user, "[AspNetUserStore]", "RecoveryCodes", "testKey;testKey2").ConfigureAwait(false); + await _identityUserStore.SetTokenAsync(user, "[AspNetUserStore]", "RecoveryCodes", "testKey;testKey2"); - (await _identityUserStore.RedeemCodeAsync(user, "testKey").ConfigureAwait(false)).ShouldBeTrue(); + (await _identityUserStore.RedeemCodeAsync(user, "testKey")).ShouldBeTrue(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/PermissionManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/PermissionManager_Tests.cs index a098ba92c6..621cb4621f 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/PermissionManager_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/PermissionManager_Tests.cs @@ -24,19 +24,19 @@ namespace Volo.Abp.Identity public async Task Roles_Should_Have_Configured_Permissions() { //admin - var grantInfos = await _permissionManager.GetAllForRoleAsync("admin").ConfigureAwait(false); + var grantInfos = await _permissionManager.GetAllForRoleAsync("admin"); RoleShouldHavePermission(grantInfos, "admin", TestPermissionNames.MyPermission1); RoleShouldHavePermission(grantInfos, "admin", TestPermissionNames.MyPermission2); RoleShouldHavePermission(grantInfos, "admin", TestPermissionNames.MyPermission2_ChildPermission1); //moderator - grantInfos = await _permissionManager.GetAllForRoleAsync("moderator").ConfigureAwait(false); + grantInfos = await _permissionManager.GetAllForRoleAsync("moderator"); RoleShouldHavePermission(grantInfos, "moderator", TestPermissionNames.MyPermission1); RoleShouldHavePermission(grantInfos, "moderator", TestPermissionNames.MyPermission2); ShouldNotHavePermission(grantInfos, TestPermissionNames.MyPermission2_ChildPermission1); //supporter - grantInfos = await _permissionManager.GetAllForRoleAsync("supporter").ConfigureAwait(false); + grantInfos = await _permissionManager.GetAllForRoleAsync("supporter"); RoleShouldHavePermission(grantInfos, "supporter", TestPermissionNames.MyPermission1); ShouldNotHavePermission(grantInfos, TestPermissionNames.MyPermission2); ShouldNotHavePermission(grantInfos, TestPermissionNames.MyPermission2_ChildPermission1); @@ -45,21 +45,21 @@ namespace Volo.Abp.Identity [Fact] public async Task Should_Grant_Permission_To_Role() { - (await _permissionManager.GetForRoleAsync("supporter", TestPermissionNames.MyPermission2).ConfigureAwait(false)).IsGranted.ShouldBeFalse(); - (await _permissionStore.IsGrantedAsync(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "supporter").ConfigureAwait(false)).ShouldBeFalse(); + (await _permissionManager.GetForRoleAsync("supporter", TestPermissionNames.MyPermission2)).IsGranted.ShouldBeFalse(); + (await _permissionStore.IsGrantedAsync(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "supporter")).ShouldBeFalse(); - await _permissionManager.SetForRoleAsync("supporter", TestPermissionNames.MyPermission2, true).ConfigureAwait(false); + await _permissionManager.SetForRoleAsync("supporter", TestPermissionNames.MyPermission2, true); - (await _permissionManager.GetForRoleAsync("supporter", TestPermissionNames.MyPermission2).ConfigureAwait(false)).IsGranted.ShouldBeTrue(); - (await _permissionStore.IsGrantedAsync(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "supporter").ConfigureAwait(false)).ShouldBeTrue(); + (await _permissionManager.GetForRoleAsync("supporter", TestPermissionNames.MyPermission2)).IsGranted.ShouldBeTrue(); + (await _permissionStore.IsGrantedAsync(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "supporter")).ShouldBeTrue(); } [Fact] public async Task Should_Revoke_Permission_From_Role() { - (await _permissionManager.GetForRoleAsync("moderator", TestPermissionNames.MyPermission1).ConfigureAwait(false)).IsGranted.ShouldBeTrue(); - await _permissionManager.SetForRoleAsync("moderator", TestPermissionNames.MyPermission1, false).ConfigureAwait(false); - (await _permissionManager.GetForRoleAsync("moderator", TestPermissionNames.MyPermission1).ConfigureAwait(false)).IsGranted.ShouldBeFalse(); + (await _permissionManager.GetForRoleAsync("moderator", TestPermissionNames.MyPermission1)).IsGranted.ShouldBeTrue(); + await _permissionManager.SetForRoleAsync("moderator", TestPermissionNames.MyPermission1, false); + (await _permissionManager.GetForRoleAsync("moderator", TestPermissionNames.MyPermission1)).IsGranted.ShouldBeFalse(); } [Fact] @@ -67,21 +67,21 @@ namespace Volo.Abp.Identity { //administrator var user = GetUser("administrator"); - var grantInfos = await _permissionManager.GetAllForUserAsync(user.Id).ConfigureAwait(false); + var grantInfos = await _permissionManager.GetAllForUserAsync(user.Id); UserShouldHavePermission(grantInfos, user.Id, TestPermissionNames.MyPermission1, "admin"); UserShouldHavePermission(grantInfos, user.Id, TestPermissionNames.MyPermission2, "admin"); UserShouldHavePermission(grantInfos, user.Id, TestPermissionNames.MyPermission2_ChildPermission1, "admin"); //john.nash user = GetUser("john.nash"); - grantInfos = await _permissionManager.GetAllForUserAsync(user.Id).ConfigureAwait(false); + grantInfos = await _permissionManager.GetAllForUserAsync(user.Id); UserShouldHavePermission(grantInfos, user.Id, TestPermissionNames.MyPermission1, "moderator", "supporter"); UserShouldHavePermission(grantInfos, user.Id, TestPermissionNames.MyPermission2, "moderator"); ShouldNotHavePermission(grantInfos, TestPermissionNames.MyPermission2_ChildPermission1); //john.nash user = GetUser("david"); - grantInfos = await _permissionManager.GetAllForUserAsync(user.Id).ConfigureAwait(false); + grantInfos = await _permissionManager.GetAllForUserAsync(user.Id); UserShouldHavePermission(grantInfos, user.Id, TestPermissionNames.MyPermission1); ShouldNotHavePermission(grantInfos, TestPermissionNames.MyPermission2); ShouldNotHavePermission(grantInfos, TestPermissionNames.MyPermission2_ChildPermission1); diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs index 1a4405c9e4..c3c24a29cc 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs @@ -33,25 +33,25 @@ namespace Volo.Abp.Identity { var role = await RoleRepository .FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator")) - .ConfigureAwait(false); + ; - var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name).ConfigureAwait(false); + var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name); permissionGrantsInRole.ShouldNotBeNull(); permissionGrantsInRole.Count.ShouldBeGreaterThan(0); var count = permissionGrantsInRole.Count; using (var uow = UowManager.Begin()) { - var identityResult = await RoleManager.SetRoleNameAsync(role, "TestModerator").ConfigureAwait(false); + var identityResult = await RoleManager.SetRoleNameAsync(role, "TestModerator"); identityResult.Succeeded.ShouldBeTrue(); - var xx = await RoleRepository.UpdateAsync(role).ConfigureAwait(false); - await uow.CompleteAsync().ConfigureAwait(false); + var xx = await RoleRepository.UpdateAsync(role); + await uow.CompleteAsync(); } - role = await RoleRepository.GetAsync(role.Id).ConfigureAwait(false); + role = await RoleRepository.GetAsync(role.Id); role.Name.ShouldBe("TestModerator"); - permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name).ConfigureAwait(false); + permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name); permissionGrantsInRole.Count.ShouldBe(count); } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs index c53592d567..ad94e914b5 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs @@ -29,26 +29,26 @@ namespace Volo.Abp.Identity public async Task Build() { - await AddRolePermissions().ConfigureAwait(false); - await AddUserPermissions().ConfigureAwait(false); + await AddRolePermissions(); + await AddUserPermissions(); } private async Task AddRolePermissions() { - await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "admin").ConfigureAwait(false); - await AddPermission(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "admin").ConfigureAwait(false); - await AddPermission(TestPermissionNames.MyPermission2_ChildPermission1, RolePermissionValueProvider.ProviderName, "admin").ConfigureAwait(false); + await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "admin"); + await AddPermission(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "admin"); + await AddPermission(TestPermissionNames.MyPermission2_ChildPermission1, RolePermissionValueProvider.ProviderName, "admin"); - await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "moderator").ConfigureAwait(false); - await AddPermission(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "moderator").ConfigureAwait(false); + await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "moderator"); + await AddPermission(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "moderator"); - await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "supporter").ConfigureAwait(false); + await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "supporter"); } private async Task AddUserPermissions() { var david = AsyncHelper.RunSync(() => _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("david"))); - await AddPermission(TestPermissionNames.MyPermission1, UserPermissionValueProvider.ProviderName, david.Id.ToString()).ConfigureAwait(false); + await AddPermission(TestPermissionNames.MyPermission1, UserPermissionValueProvider.ProviderName, david.Id.ToString()); } private async Task AddPermission(string permissionName, string providerName, string providerKey) @@ -60,7 +60,7 @@ namespace Volo.Abp.Identity providerName, providerKey ) - ).ConfigureAwait(false); + ); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/UserRoleFinder_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/UserRoleFinder_Tests.cs index a8f2159fc2..ef06949500 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/UserRoleFinder_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/UserRoleFinder_Tests.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.Identity [Fact] public async Task GetRolesAsync() { - var roleNames = await _userRoleFinder.GetRolesAsync(_testData.UserJohnId).ConfigureAwait(false); + var roleNames = await _userRoleFinder.GetRolesAsync(_testData.UserJohnId); roleNames.ShouldNotBeEmpty(); roleNames.ShouldContain(x => x == "moderator"); roleNames.ShouldContain(x => x == "supporter"); diff --git a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj index 5e01379951..bb3329cb25 100644 --- a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj +++ b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj index 22edeae68a..73d1cbf32e 100644 --- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj +++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj index de9dc07587..0dd175fabc 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestBaseModule.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestBaseModule.cs index 0c8c545b8c..4b956ab16d 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestBaseModule.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestBaseModule.cs @@ -32,10 +32,10 @@ namespace Volo.Abp.Identity var dataSeeder = scope.ServiceProvider.GetRequiredService(); AsyncHelper.RunSync(async () => { - await dataSeeder.SeedAsync().ConfigureAwait(false); + await dataSeeder.SeedAsync(); await scope.ServiceProvider .GetRequiredService() - .Build().ConfigureAwait(false); + .Build(); }); } } diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs index ad36fe69a7..69361ff5a8 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs @@ -37,21 +37,21 @@ namespace Volo.Abp.Identity public async Task Build() { - await AddRoles().ConfigureAwait(false); - await AddUsers().ConfigureAwait(false); - await AddClaimTypes().ConfigureAwait(false); + await AddRoles(); + await AddUsers(); + await AddClaimTypes(); } private async Task AddRoles() { - _adminRole = await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("admin")).ConfigureAwait(false); + _adminRole = await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("admin")); _moderator = new IdentityRole(_testData.RoleModeratorId, "moderator"); _moderator.AddClaim(_guidGenerator, new Claim("test-claim", "test-value")); - await _roleRepository.InsertAsync(_moderator).ConfigureAwait(false); + await _roleRepository.InsertAsync(_moderator); _supporterRole = new IdentityRole(_guidGenerator.Create(), "supporter"); - await _roleRepository.InsertAsync(_supporterRole).ConfigureAwait(false); + await _roleRepository.InsertAsync(_supporterRole); } private async Task AddUsers() @@ -59,7 +59,7 @@ namespace Volo.Abp.Identity var adminUser = new IdentityUser(_guidGenerator.Create(), "administrator", "admin@abp.io"); adminUser.AddRole(_adminRole.Id); adminUser.AddClaim(_guidGenerator, new Claim("TestClaimType", "42")); - await _userRepository.InsertAsync(adminUser).ConfigureAwait(false); + await _userRepository.InsertAsync(adminUser); var john = new IdentityUser(_testData.UserJohnId, "john.nash", "john.nash@abp.io"); john.AddRole(_moderator.Id); @@ -68,23 +68,23 @@ namespace Volo.Abp.Identity john.AddLogin(new UserLoginInfo("twitter", "johnx", "John Nash")); john.AddClaim(_guidGenerator, new Claim("TestClaimType", "42")); john.SetToken("test-provider", "test-name", "test-value"); - await _userRepository.InsertAsync(john).ConfigureAwait(false); + await _userRepository.InsertAsync(john); var david = new IdentityUser(_testData.UserDavidId, "david", "david@abp.io"); - await _userRepository.InsertAsync(david).ConfigureAwait(false); + await _userRepository.InsertAsync(david); var neo = new IdentityUser(_testData.UserNeoId, "neo", "neo@abp.io"); neo.AddRole(_supporterRole.Id); neo.AddClaim(_guidGenerator, new Claim("TestClaimType", "43")); - await _userRepository.InsertAsync(neo).ConfigureAwait(false); + await _userRepository.InsertAsync(neo); } private async Task AddClaimTypes() { var ageClaim = new IdentityClaimType(_testData.AgeClaimId, "Age", false, false, null, null, null,IdentityClaimValueType.Int); - await _identityClaimTypeRepository.InsertAsync(ageClaim).ConfigureAwait(false); + await _identityClaimTypeRepository.InsertAsync(ageClaim); var educationClaim = new IdentityClaimType(_testData.EducationClaimId, "Education", true, false, null, null, null); - await _identityClaimTypeRepository.InsertAsync(educationClaim).ConfigureAwait(false); + await _identityClaimTypeRepository.InsertAsync(educationClaim); } } } \ No newline at end of file diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityClaimTypeRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityClaimTypeRepository_Tests.cs index afe117d421..3250c0b04a 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityClaimTypeRepository_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityClaimTypeRepository_Tests.cs @@ -28,11 +28,11 @@ namespace Volo.Abp.Identity { var claim = (await ClaimTypeRepository.GetListAsync()).FirstOrDefault(); - var result1 = await ClaimTypeRepository.AnyAsync(claim.Name).ConfigureAwait(false); + var result1 = await ClaimTypeRepository.AnyAsync(claim.Name); result1.ShouldBe(true); - var result2 = await ClaimTypeRepository.AnyAsync(Guid.NewGuid().ToString()).ConfigureAwait(false); + var result2 = await ClaimTypeRepository.AnyAsync(Guid.NewGuid().ToString()); result2.ShouldBe(false); } diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs index 0b6692f419..65eac5bc9d 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs @@ -25,11 +25,11 @@ namespace Volo.Abp.Identity [Fact] public async Task Should_Create_Admin_User_And_Role() { - await _identityDataSeeder.SeedAsync("admin@abp.io", "1q2w3E*").ConfigureAwait(false); + await _identityDataSeeder.SeedAsync("admin@abp.io", "1q2w3E*"); - (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("admin")).ConfigureAwait(false)).ShouldNotBeNull(); - (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("admin")).ConfigureAwait(false)).Name.ShouldBe("admin"); - (await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("admin")).ConfigureAwait(false)).ShouldNotBeNull(); + (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("admin"))).ShouldNotBeNull(); + (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("admin"))).Name.ShouldBe("admin"); + (await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("admin"))).ShouldNotBeNull(); } } } diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs index cd7ee1eb32..eb22de0600 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs @@ -23,29 +23,40 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByNormalizedNameAsync() { - (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("admin")).ConfigureAwait(false)).ShouldNotBeNull(); - (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("undefined-role")).ConfigureAwait(false)).ShouldBeNull(); + (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("admin"))).ShouldNotBeNull(); + (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("undefined-role"))).ShouldBeNull(); } [Fact] public async Task GetListAsync() { - var roles = await RoleRepository.GetListAsync().ConfigureAwait(false); + var roles = await RoleRepository.GetListAsync(); roles.ShouldContain(r => r.Name == "admin"); roles.ShouldContain(r => r.Name == "moderator"); roles.ShouldContain(r => r.Name == "supporter"); } + [Fact] + public async Task GetDefaultOnesAsync() + { + var roles = await RoleRepository.GetDefaultOnesAsync().ConfigureAwait(false); + + foreach (var role in roles) + { + role.IsDefault.ShouldBe(true); + } + } + [Fact] public async Task GetCountAsync() { - (await RoleRepository.GetCountAsync().ConfigureAwait(false)).ShouldBeGreaterThan(0); + (await RoleRepository.GetCountAsync()).ShouldBeGreaterThan(0); } [Fact] public async Task Should_Eager_Load_Role_Collections() { - var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator")).ConfigureAwait(false); + var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator")); role.Claims.ShouldNotBeNull(); role.Claims.Any().ShouldBeTrue(); } diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs index 98f25f6aee..4fa407a512 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs @@ -25,23 +25,23 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByNormalizedUserNameAsync() { - (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false)).ShouldNotBeNull(); - (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("undefined-user")).ConfigureAwait(false)).ShouldBeNull(); + (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"))).ShouldNotBeNull(); + (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("undefined-user"))).ShouldBeNull(); } [Fact] public async Task FindByNormalizedEmailAsync() { - (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("john.nash@abp.io")).ConfigureAwait(false)).ShouldNotBeNull(); - (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("david@abp.io")).ConfigureAwait(false)).ShouldNotBeNull(); - (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("undefined-user@abp.io")).ConfigureAwait(false)).ShouldBeNull(); + (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("john.nash@abp.io"))).ShouldNotBeNull(); + (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("david@abp.io"))).ShouldNotBeNull(); + (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("undefined-user@abp.io"))).ShouldBeNull(); } [Fact] public async Task GetRoleNamesAsync() { - var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); - var roles = await UserRepository.GetRoleNamesAsync(john.Id).ConfigureAwait(false); + var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")); + var roles = await UserRepository.GetRoleNamesAsync(john.Id); roles.Count.ShouldBe(2); roles.ShouldContain("moderator"); roles.ShouldContain("supporter"); @@ -50,37 +50,37 @@ namespace Volo.Abp.Identity [Fact] public async Task FindByLoginAsync() { - var user = await UserRepository.FindByLoginAsync("github", "john").ConfigureAwait(false); + var user = await UserRepository.FindByLoginAsync("github", "john"); user.ShouldNotBeNull(); user.UserName.ShouldBe("john.nash"); - user = await UserRepository.FindByLoginAsync("twitter", "johnx").ConfigureAwait(false); + user = await UserRepository.FindByLoginAsync("twitter", "johnx"); user.ShouldNotBeNull(); user.UserName.ShouldBe("john.nash"); - (await UserRepository.FindByLoginAsync("github", "undefinedid").ConfigureAwait(false)).ShouldBeNull(); + (await UserRepository.FindByLoginAsync("github", "undefinedid")).ShouldBeNull(); } [Fact] public async Task GetListByClaimAsync() { - var users = await UserRepository.GetListByClaimAsync(new Claim("TestClaimType", "42")).ConfigureAwait(false); + var users = await UserRepository.GetListByClaimAsync(new Claim("TestClaimType", "42")); users.Count.ShouldBe(2); users.ShouldContain(u => u.UserName == "administrator"); users.ShouldContain(u => u.UserName == "john.nash"); - users = await UserRepository.GetListByClaimAsync(new Claim("TestClaimType", "43")).ConfigureAwait(false); + users = await UserRepository.GetListByClaimAsync(new Claim("TestClaimType", "43")); users.Count.ShouldBe(1); users.ShouldContain(u => u.UserName == "neo"); - users = await UserRepository.GetListByClaimAsync(new Claim("TestClaimType", "undefined")).ConfigureAwait(false); + users = await UserRepository.GetListByClaimAsync(new Claim("TestClaimType", "undefined")); users.Count.ShouldBe(0); } [Fact] public async Task GetListByNormalizedRoleNameAsync() { - var users = await UserRepository.GetListByNormalizedRoleNameAsync(LookupNormalizer.NormalizeName("supporter")).ConfigureAwait(false); + var users = await UserRepository.GetListByNormalizedRoleNameAsync(LookupNormalizer.NormalizeName("supporter")); users.Count.ShouldBe(2); users.ShouldContain(u => u.UserName == "john.nash"); users.ShouldContain(u => u.UserName == "neo"); @@ -89,7 +89,7 @@ namespace Volo.Abp.Identity [Fact] public async Task GetListAsync() { - var users = await UserRepository.GetListAsync("UserName DESC", 5, 0, "n").ConfigureAwait(false); + var users = await UserRepository.GetListAsync("UserName DESC", 5, 0, "n"); users.Count.ShouldBeGreaterThan(1); users.Count.ShouldBeLessThanOrEqualTo(5); @@ -107,15 +107,15 @@ namespace Volo.Abp.Identity ).ShouldBeGreaterThan(0); } - users = await UserRepository.GetListAsync(null, 999, 0, "undefined-username").ConfigureAwait(false); + users = await UserRepository.GetListAsync(null, 999, 0, "undefined-username"); users.Count.ShouldBe(0); } [Fact] public async Task GetRolesAsync() { - var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); - var roles = await UserRepository.GetRolesAsync(john.Id).ConfigureAwait(false); + var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")); + var roles = await UserRepository.GetRolesAsync(john.Id); roles.Count.ShouldBe(2); roles.ShouldContain(r => r.Name == "moderator"); roles.ShouldContain(r => r.Name == "supporter"); @@ -124,14 +124,14 @@ namespace Volo.Abp.Identity [Fact] public async Task GetCountAsync() { - (await UserRepository.GetCountAsync("n").ConfigureAwait(false)).ShouldBeGreaterThan(1); - (await UserRepository.GetCountAsync("undefined-username").ConfigureAwait(false)).ShouldBe(0); + (await UserRepository.GetCountAsync("n")).ShouldBeGreaterThan(1); + (await UserRepository.GetCountAsync("undefined-username")).ShouldBe(0); } [Fact] public async Task Should_Eager_Load_User_Collections() { - var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")).ConfigureAwait(false); + var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash")); john.Roles.ShouldNotBeNull(); john.Roles.Any().ShouldBeTrue(); diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs index 3313803436..1ae671dd4f 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs @@ -28,11 +28,11 @@ namespace Volo.Abp.Identity { using (var uow = GetRequiredService().Begin()) { - var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator"), includeDetails: false).ConfigureAwait(false); + var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator"), includeDetails: false); role.Claims.ShouldNotBeNull(); role.Claims.Any().ShouldBeTrue(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } @@ -41,7 +41,7 @@ namespace Volo.Abp.Identity { using (var uow = GetRequiredService().Begin()) { - var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"), includeDetails: false).ConfigureAwait(false); + var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"), includeDetails: false); john.Roles.ShouldNotBeNull(); john.Roles.Any().ShouldBeTrue(); @@ -55,7 +55,7 @@ namespace Volo.Abp.Identity john.Tokens.ShouldNotBeNull(); john.Tokens.Any().ShouldBeTrue(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/FodyWeavers.xml b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/FodyWeavers.xsd b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo.Abp.IdentityServer.Domain.Shared.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo.Abp.IdentityServer.Domain.Shared.csproj index 71d99b826b..e8a623fad6 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo.Abp.IdentityServer.Domain.Shared.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo.Abp.IdentityServer.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hant.json b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..859e8c29b7 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hant.json @@ -0,0 +1,8 @@ +{ + "culture": "zh-Hant", + "texts": { + "Volo.IdentityServer:DuplicateIdentityResourceName": "Identity資源名稱已存在: {Name}", + "Volo.IdentityServer:DuplicateApiResourceName": "Api資源名稱已存在: {Name}", + "Volo.IdentityServer:DuplicateClientId": "ClientId已經存在: {ClientId}" + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/FodyWeavers.xml b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/FodyWeavers.xsd b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj index e7f4a6bc43..3ad4d2bb05 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpCorsPolicyService.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpCorsPolicyService.cs index c445b7e90e..9113051a4a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpCorsPolicyService.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpCorsPolicyService.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer public async Task IsOriginAllowedAsync(string origin) { - var cacheItem = await Cache.GetOrAddAsync(AllowedCorsOriginsCacheItem.AllOrigins, CreateCacheItemAsync).ConfigureAwait(false); + var cacheItem = await Cache.GetOrAddAsync(AllowedCorsOriginsCacheItem.AllOrigins, CreateCacheItemAsync); var isAllowed = cacheItem.AllowedOrigins.Contains(origin, StringComparer.OrdinalIgnoreCase); @@ -49,7 +49,7 @@ namespace Volo.Abp.IdentityServer return new AllowedCorsOriginsCacheItem { - AllowedOrigins = (await clientRepository.GetAllDistinctAllowedCorsOriginsAsync().ConfigureAwait(false)).ToArray() + AllowedOrigins = (await clientRepository.GetAllDistinctAllowedCorsOriginsAsync()).ToArray() }; } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedCorsOriginsCacheItemInvalidator.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedCorsOriginsCacheItemInvalidator.cs index 0a05e1781e..80bc425d5c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedCorsOriginsCacheItemInvalidator.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedCorsOriginsCacheItemInvalidator.cs @@ -21,12 +21,12 @@ namespace Volo.Abp.IdentityServer public async Task HandleEventAsync(EntityChangedEventData eventData) { - await Cache.RemoveAsync(AllowedCorsOriginsCacheItem.AllOrigins).ConfigureAwait(false); + await Cache.RemoveAsync(AllowedCorsOriginsCacheItem.AllOrigins); } public async Task HandleEventAsync(EntityChangedEventData eventData) { - await Cache.RemoveAsync(AllowedCorsOriginsCacheItem.AllOrigins).ConfigureAwait(false); + await Cache.RemoveAsync(AllowedCorsOriginsCacheItem.AllOrigins); } } } \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs index 93a1fb5bbe..f3bca6dba9 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity { using (_currentTenant.Change(context.Subject.FindTenantId())) { - await base.GetProfileDataAsync(context).ConfigureAwait(false); + await base.GetProfileDataAsync(context); } } @@ -37,7 +37,7 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity { using (_currentTenant.Change(context.Subject.FindTenantId())) { - await base.IsActiveAsync(context).ConfigureAwait(false); + await base.IsActiveAsync(context); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs index 86f704c27a..68489a1bdb 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs @@ -43,22 +43,22 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity [UnitOfWork] public virtual async Task ValidateAsync(ResourceOwnerPasswordValidationContext context) { - await ReplaceEmailToUsernameOfInputIfNeeds(context).ConfigureAwait(false); + await ReplaceEmailToUsernameOfInputIfNeeds(context); - var user = await _userManager.FindByNameAsync(context.UserName).ConfigureAwait(false); + var user = await _userManager.FindByNameAsync(context.UserName); if (user != null) { - var result = await _signInManager.CheckPasswordSignInAsync(user, context.Password, true).ConfigureAwait(false); + var result = await _signInManager.CheckPasswordSignInAsync(user, context.Password, true); if (result.Succeeded) { - var sub = await _userManager.GetUserIdAsync(user).ConfigureAwait(false); + var sub = await _userManager.GetUserIdAsync(user); _logger.LogInformation("Credentials validated for username: {username}", context.UserName); - await _events.RaiseAsync(new UserLoginSuccessEvent(context.UserName, sub, context.UserName, interactive: false)).ConfigureAwait(false); + await _events.RaiseAsync(new UserLoginSuccessEvent(context.UserName, sub, context.UserName, interactive: false)); var additionalClaims = new List(); - await AddCustomClaimsAsync(additionalClaims, user, context).ConfigureAwait(false); + await AddCustomClaimsAsync(additionalClaims, user, context); context.Result = new GrantValidationResult( sub, @@ -71,23 +71,23 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity else if (result.IsLockedOut) { _logger.LogInformation("Authentication failed for username: {username}, reason: locked out", context.UserName); - await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "locked out", interactive: false)).ConfigureAwait(false); + await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "locked out", interactive: false)); } else if (result.IsNotAllowed) { _logger.LogInformation("Authentication failed for username: {username}, reason: not allowed", context.UserName); - await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "not allowed", interactive: false)).ConfigureAwait(false); + await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "not allowed", interactive: false)); } else { _logger.LogInformation("Authentication failed for username: {username}, reason: invalid credentials", context.UserName); - await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "invalid credentials", interactive: false)).ConfigureAwait(false); + await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "invalid credentials", interactive: false)); } } else { _logger.LogInformation("No user found matching username: {username}", context.UserName); - await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "invalid username", interactive: false)).ConfigureAwait(false); + await _events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "invalid username", interactive: false)); } context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant); @@ -100,13 +100,13 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity return; } - var userByUsername = await _userManager.FindByNameAsync(context.UserName).ConfigureAwait(false); + var userByUsername = await _userManager.FindByNameAsync(context.UserName); if (userByUsername != null) { return; } - var userByEmail = await _userManager.FindByEmailAsync(context.UserName).ConfigureAwait(false); + var userByEmail = await _userManager.FindByEmailAsync(context.UserName); if (userByEmail == null) { return; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs index 8ba8aea7e3..0e88b658cd 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.IdentityServer.Clients public virtual async Task FindClientByIdAsync(string clientId) { - var client = await _clientRepository.FindByCliendIdAsync(clientId).ConfigureAwait(false); + var client = await _clientRepository.FindByCliendIdAsync(clientId); return _objectMapper.Map(client); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs index 4bd55ab2c6..0f0021f9a4 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs @@ -44,7 +44,7 @@ namespace Volo.Abp.IdentityServer.Devices Expiration = data.CreationTime.AddSeconds(data.Lifetime), Data = Serialize(data) } - ).ConfigureAwait(false); + ); } public async Task FindByUserCodeAsync(string userCode) @@ -53,7 +53,7 @@ namespace Volo.Abp.IdentityServer.Devices var deviceCodes = await DeviceFlowCodesRepository .FindByUserCodeAsync(userCode) - .ConfigureAwait(false); + ; if (deviceCodes == null) { @@ -69,7 +69,7 @@ namespace Volo.Abp.IdentityServer.Devices var deviceCodes = await DeviceFlowCodesRepository .FindByDeviceCodeAsync(deviceCode) - .ConfigureAwait(false); + ; if (deviceCodes == null) { @@ -87,7 +87,7 @@ namespace Volo.Abp.IdentityServer.Devices var deviceCodes = await DeviceFlowCodesRepository .FindByUserCodeAsync(userCode) - .ConfigureAwait(false); + ; if (deviceCodes == null) { @@ -99,7 +99,7 @@ namespace Volo.Abp.IdentityServer.Devices await DeviceFlowCodesRepository .UpdateAsync(deviceCodes, autoSave: true) - .ConfigureAwait(false); + ; } public async Task RemoveByDeviceCodeAsync(string deviceCode) @@ -108,7 +108,7 @@ namespace Volo.Abp.IdentityServer.Devices var deviceCodes = await DeviceFlowCodesRepository .FindByDeviceCodeAsync(deviceCode) - .ConfigureAwait(false); + ; if (deviceCodes == null) { @@ -117,7 +117,7 @@ namespace Volo.Abp.IdentityServer.Devices await DeviceFlowCodesRepository .DeleteAsync(deviceCodes, autoSave: true) - .ConfigureAwait(false); + ; } private string Serialize([CanBeNull] DeviceCode deviceCode) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs index 9cf855e105..e58dae6daf 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs @@ -24,51 +24,51 @@ namespace Volo.Abp.IdentityServer.Grants public virtual async Task StoreAsync(IdentityServer4.Models.PersistedGrant grant) { - var entity = await _persistentGrantRepository.FindByKeyAsync(grant.Key).ConfigureAwait(false); + var entity = await _persistentGrantRepository.FindByKeyAsync(grant.Key); if (entity == null) { entity = _objectMapper.Map(grant); EntityHelper.TrySetId(entity, () => _guidGenerator.Create()); - await _persistentGrantRepository.InsertAsync(entity).ConfigureAwait(false); + await _persistentGrantRepository.InsertAsync(entity); } else { _objectMapper.Map(grant, entity); - await _persistentGrantRepository.UpdateAsync(entity).ConfigureAwait(false); + await _persistentGrantRepository.UpdateAsync(entity); } } public virtual async Task GetAsync(string key) { - var persistedGrant = await _persistentGrantRepository.FindByKeyAsync(key).ConfigureAwait(false); + var persistedGrant = await _persistentGrantRepository.FindByKeyAsync(key); return _objectMapper.Map(persistedGrant); } public virtual async Task> GetAllAsync(string subjectId) { - var persistedGrants = await _persistentGrantRepository.GetListBySubjectIdAsync(subjectId).ConfigureAwait(false); + var persistedGrants = await _persistentGrantRepository.GetListBySubjectIdAsync(subjectId); return persistedGrants.Select(x => _objectMapper.Map(x)); } public virtual async Task RemoveAsync(string key) { - var persistedGrant = await _persistentGrantRepository.FindByKeyAsync(key).ConfigureAwait(false); + var persistedGrant = await _persistentGrantRepository.FindByKeyAsync(key); if (persistedGrant == null) { return; } - await _persistentGrantRepository.DeleteAsync(persistedGrant).ConfigureAwait(false); + await _persistentGrantRepository.DeleteAsync(persistedGrant); } public virtual async Task RemoveAllAsync(string subjectId, string clientId) { - await _persistentGrantRepository.DeleteAsync(subjectId, clientId).ConfigureAwait(false); + await _persistentGrantRepository.DeleteAsync(subjectId, clientId); } public virtual async Task RemoveAllAsync(string subjectId, string clientId, string type) { - await _persistentGrantRepository.DeleteAsync(subjectId, clientId, type).ConfigureAwait(false); + await _persistentGrantRepository.DeleteAsync(subjectId, clientId, type); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceDataSeeder.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceDataSeeder.cs index 8c828b970c..024f8bea13 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceDataSeeder.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceDataSeeder.cs @@ -37,16 +37,16 @@ namespace Volo.Abp.IdentityServer.IdentityResources { foreach (var claimType in resource.UserClaims) { - await AddClaimTypeIfNotExistsAsync(claimType).ConfigureAwait(false); + await AddClaimTypeIfNotExistsAsync(claimType); } - await AddIdentityResourceIfNotExistsAsync(resource).ConfigureAwait(false); + await AddIdentityResourceIfNotExistsAsync(resource); } } protected virtual async Task AddIdentityResourceIfNotExistsAsync(IdentityServer4.Models.IdentityResource resource) { - if (await IdentityResourceRepository.CheckNameExistAsync(resource.Name).ConfigureAwait(false)) + if (await IdentityResourceRepository.CheckNameExistAsync(resource.Name)) { return; } @@ -56,12 +56,12 @@ namespace Volo.Abp.IdentityServer.IdentityResources GuidGenerator.Create(), resource ) - ).ConfigureAwait(false); + ); } protected virtual async Task AddClaimTypeIfNotExistsAsync(string claimType) { - if (await ClaimTypeRepository.AnyAsync(claimType).ConfigureAwait(false)) + if (await ClaimTypeRepository.AnyAsync(claimType)) { return; } @@ -72,7 +72,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources claimType, isStatic: true ) - ).ConfigureAwait(false); + ); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Jwt/JwtTokenMiddleware.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Jwt/JwtTokenMiddleware.cs index 58d3205dc2..57ca9cc4c2 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Jwt/JwtTokenMiddleware.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Jwt/JwtTokenMiddleware.cs @@ -13,14 +13,14 @@ namespace Volo.Abp.IdentityServer.Jwt { if (ctx.User.Identity?.IsAuthenticated != true) { - var result = await ctx.AuthenticateAsync(schema).ConfigureAwait(false); + var result = await ctx.AuthenticateAsync(schema); if (result.Succeeded && result.Principal != null) { ctx.User = result.Principal; } } - await next().ConfigureAwait(false); + await next(); }); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index 0b8b5016a7..56275bb386 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -29,26 +29,26 @@ namespace Volo.Abp.IdentityServer public virtual async Task> FindIdentityResourcesByScopeAsync(IEnumerable scopeNames) { - var resource = await _identityResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true).ConfigureAwait(false); + var resource = await _identityResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true); return _objectMapper.Map, List>(resource); } public virtual async Task> FindApiResourcesByScopeAsync(IEnumerable scopeNames) { - var resources = await _apiResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true).ConfigureAwait(false); + var resources = await _apiResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true); return resources.Select(x => _objectMapper.Map(x)); } public virtual async Task FindApiResourceAsync(string name) { - var resource = await _apiResourceRepository.FindByNameAsync(name).ConfigureAwait(false); + var resource = await _apiResourceRepository.FindByNameAsync(name); return _objectMapper.Map(resource); } public virtual async Task GetAllResourcesAsync() { - var identityResources = await _identityResourceRepository.GetListAsync(includeDetails: true).ConfigureAwait(false); - var apiResources = await _apiResourceRepository.GetListAsync(includeDetails: true).ConfigureAwait(false); + var identityResources = await _identityResourceRepository.GetListAsync(includeDetails: true); + var apiResources = await _apiResourceRepository.GetListAsync(includeDetails: true); return new Resources( _objectMapper.Map, IdentityServer4.Models.IdentityResource[]>(identityResources), diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupBackgroundWorker.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupBackgroundWorker.cs index 4bec8318eb..e910a3b30f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupBackgroundWorker.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupBackgroundWorker.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer.Tokens .ServiceProvider .GetRequiredService() .CleanAsync() - .ConfigureAwait(false); + ; } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupService.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupService.cs index ac38f792c1..dfa66b9e88 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupService.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupService.cs @@ -30,10 +30,9 @@ namespace Volo.Abp.IdentityServer.Tokens public virtual async Task CleanAsync() { await RemoveGrantsAsync() - .ConfigureAwait(false); + ; - await RemoveDeviceCodesAsync() - .ConfigureAwait(false); + await RemoveDeviceCodesAsync(); } [UnitOfWork] @@ -42,15 +41,13 @@ namespace Volo.Abp.IdentityServer.Tokens for (int i = 0; i < Options.CleanupLoopCount; i++) { var persistentGrants = await PersistentGrantRepository - .GetListByExpirationAsync(Clock.Now, Options.CleanupBatchSize) - .ConfigureAwait(false); + .GetListByExpirationAsync(Clock.Now, Options.CleanupBatchSize); //TODO: Can be optimized if the repository implements the batch deletion foreach (var persistentGrant in persistentGrants) { await PersistentGrantRepository - .DeleteAsync(persistentGrant) - .ConfigureAwait(false); + .DeleteAsync(persistentGrant); } //No need to continue to query if it gets more than max items. @@ -66,15 +63,13 @@ namespace Volo.Abp.IdentityServer.Tokens for (int i = 0; i < Options.CleanupLoopCount; i++) { var deviceFlowCodeses = await DeviceFlowCodesRepository - .GetListByExpirationAsync(Clock.Now, Options.CleanupBatchSize) - .ConfigureAwait(false); + .GetListByExpirationAsync(Clock.Now, Options.CleanupBatchSize); //TODO: Can be optimized if the repository implements the batch deletion foreach (var deviceFlowCodes in deviceFlowCodeses) { await DeviceFlowCodesRepository - .DeleteAsync(deviceFlowCodes) - .ConfigureAwait(false); + .DeleteAsync(deviceFlowCodes); } //No need to continue to query if it gets more than max items. diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/FodyWeavers.xml b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj index 72681fbf9d..5396e34103 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index ec038afac6..5f7d6369af 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer.ApiResources select apiResource; return await query - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByScopesAsync( @@ -40,7 +40,7 @@ namespace Volo.Abp.IdentityServer.ApiResources where api.Scopes.Any(x => scopeNames.Contains(x.Name)) select api; - return await query.ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, bool includeDetails = false, @@ -49,7 +49,7 @@ namespace Volo.Abp.IdentityServer.ApiResources return await DbSet .IncludeDetails(includeDetails).OrderBy(sorting ?? "name desc") .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -58,12 +58,12 @@ namespace Volo.Abp.IdentityServer.ApiResources { return await DbSet .IncludeDetails(includeDetails) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken).ConfigureAwait(false); + return await DbSet.AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken); } public override async Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) @@ -82,7 +82,7 @@ namespace Volo.Abp.IdentityServer.ApiResources DbContext.Set().Remove(scope); } - await base.DeleteAsync(id, autoSave, cancellationToken).ConfigureAwait(false); + await base.DeleteAsync(id, autoSave, cancellationToken); } public override IQueryable WithDetails() diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs index 4dc5134ff6..44218470fd 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.IdentityServer.Clients { return await DbSet .IncludeDetails(includeDetails) - .FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, bool includeDetails = false, @@ -34,7 +34,7 @@ namespace Volo.Abp.IdentityServer.Clients return await DbSet .IncludeDetails(includeDetails).OrderBy(sorting ?? nameof(Client.ClientName) + " desc") .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetAllDistinctAllowedCorsOriginsAsync(CancellationToken cancellationToken = default) @@ -42,12 +42,12 @@ namespace Volo.Abp.IdentityServer.Clients return await DbContext.ClientCorsOrigins .Select(x => x.Origin) .Distinct() - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken).ConfigureAwait(false); + return await DbSet.AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); } public override IQueryable WithDetails() diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs index a8d2bce3ce..3a10d21046 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.IdentityServer.Devices { return await DbSet .FirstOrDefaultAsync(d => d.UserCode == userCode, GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + ; } public async Task FindByDeviceCodeAsync( @@ -33,8 +33,7 @@ namespace Volo.Abp.IdentityServer.Devices CancellationToken cancellationToken = default) { return await DbSet - .FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken)); } public async Task> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, @@ -44,8 +43,7 @@ namespace Volo.Abp.IdentityServer.Devices .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs index cf208c7875..76c02d1122 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.IdentityServer.Grants { return await DbSet .FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + ; } public async Task> GetListBySubjectIdAsync( @@ -33,8 +33,7 @@ namespace Volo.Abp.IdentityServer.Grants { return await DbSet .Where(x => x.SubjectId == subjectId) - .ToListAsync(GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetListByExpirationAsync( @@ -46,8 +45,7 @@ namespace Volo.Abp.IdentityServer.Grants .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task DeleteAsync( @@ -58,7 +56,7 @@ namespace Volo.Abp.IdentityServer.Grants await DeleteAsync( x => x.SubjectId == subjectId && x.ClientId == clientId, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } public async Task DeleteAsync( @@ -70,7 +68,7 @@ namespace Volo.Abp.IdentityServer.Grants await DeleteAsync( x => x.SubjectId == subjectId && x.ClientId == clientId && x.Type == type, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs index d5d05c5e9a..20789ecca8 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources where scopeNames.Contains(identityResource.Name) select identityResource; - return await query.ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } public override IQueryable WithDetails() @@ -43,7 +43,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources .IncludeDetails(includeDetails) .OrderBy(sorting ?? "name desc") .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task FindByNameAsync( @@ -54,12 +54,12 @@ namespace Volo.Abp.IdentityServer.IdentityResources return await DbSet .IncludeDetails(includeDetails) .Where(x => x.Name == name) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken).ConfigureAwait(false); + return await DbSet.AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/FodyWeavers.xml b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/FodyWeavers.xsd b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj index 64ee9f6eee..0fd4cc51cf 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index 008d34f322..45b69c82f7 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() .Where(ar => ar.Name == name) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByScopesAsync(string[] scopeNames, bool includeDetails = false, @@ -30,7 +30,7 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() .Where(ar => ar.Scopes.Any(x => scopeNames.Contains(x.Name))) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, bool includeDetails = false, @@ -40,17 +40,17 @@ namespace Volo.Abp.IdentityServer.MongoDB .OrderBy(sorting ?? nameof(ApiResource.Name)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task GetTotalCount() { - return await GetCountAsync().ConfigureAwait(false); + return await GetCountAsync(); } public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken).ConfigureAwait(false); + return await GetMongoQueryable().AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs index 6e371717ba..61488edc3d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.IdentityServer.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -40,7 +40,7 @@ namespace Volo.Abp.IdentityServer.MongoDB .OrderBy(sorting ?? nameof(Client.ClientName)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetAllDistinctAllowedCorsOriginsAsync( @@ -50,17 +50,17 @@ namespace Volo.Abp.IdentityServer.MongoDB .SelectMany(x => x.AllowedCorsOrigins) .Select(y => y.Origin) .Distinct() - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken).ConfigureAwait(false); + return await GetMongoQueryable().AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); } public virtual async Task GetTotalCount() { - return await GetCountAsync().ConfigureAwait(false); + return await GetCountAsync(); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs index 86daac80a9..44cb86a744 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs @@ -25,14 +25,13 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() .FirstOrDefaultAsync(d => d.UserCode == userCode, GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + ; } public async Task FindByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default) { return await GetMongoQueryable() - .FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken)); } public async Task> GetListByExpirationAsync( @@ -44,8 +43,7 @@ namespace Volo.Abp.IdentityServer.MongoDB .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs index eefd4d325c..d25faa9622 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.IdentityServer.MongoDB .OrderBy(sorting ?? nameof(IdentityResource.Name)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task FindByNameAsync( @@ -34,7 +34,7 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() .Where(x => x.Name == name) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } public async Task> GetListByScopesAsync(string[] scopeNames, bool includeDetails = false, @@ -42,17 +42,17 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() .Where(ar => scopeNames.Contains(ar.Name)) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task GetTotalCountAsync() { - return await GetCountAsync().ConfigureAwait(false); + return await GetCountAsync(); } public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken).ConfigureAwait(false); + return await GetMongoQueryable().AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs index 4b414482db..e63bc27805 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() - .FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken)); } public async Task> GetListBySubjectIdAsync(string subjectId, CancellationToken cancellationToken = default) @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer.MongoDB return await GetMongoQueryable() .Where(x => x.SubjectId == subjectId) .ToListAsync(GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + ; } public async Task> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, @@ -38,8 +38,7 @@ namespace Volo.Abp.IdentityServer.MongoDB .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)) - .ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task DeleteAsync(string subjectId, string clientId, CancellationToken cancellationToken = default) @@ -47,7 +46,7 @@ namespace Volo.Abp.IdentityServer.MongoDB await DeleteAsync( x => x.SubjectId == subjectId && x.ClientId == clientId, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } public async Task DeleteAsync(string subjectId, string clientId, string type, CancellationToken cancellationToken = default) @@ -55,7 +54,7 @@ namespace Volo.Abp.IdentityServer.MongoDB await DeleteAsync( x => x.SubjectId == subjectId && x.ClientId == clientId && x.Type == type, cancellationToken: GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } } } diff --git a/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/FodyWeavers.xml b/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/FodyWeavers.xsd b/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj b/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj index a1579f3f31..e1c009e432 100644 --- a/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj +++ b/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj index ce12bb92eb..e90296c8ac 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs index a5b1540a1b..e89f385b57 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.IdentityServer.Clients [Fact] public async Task FindClientByIdAsync_Should_Return_Null_If_Not_Found() { - var client = await _clientStore.FindClientByIdAsync("non-existing-id").ConfigureAwait(false); + var client = await _clientStore.FindClientByIdAsync("non-existing-id"); client.ShouldBeNull(); } @@ -26,7 +26,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindClientByIdAsync_Should_Return_The_Client_If_Found() { //Act - var client = await _clientStore.FindClientByIdAsync("42").ConfigureAwait(false); + var client = await _clientStore.FindClientByIdAsync("42"); //Assert client.ShouldNotBeNull(); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs index 9e7bdfc99a..a313c2717f 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindApiResourceAsync_Should_Return_Null_If_Not_Found() { //Act - var resource = await _resourceStore.FindApiResourceAsync("non-existing-name").ConfigureAwait(false); + var resource = await _resourceStore.FindApiResourceAsync("non-existing-name"); //Assert resource.ShouldBeNull(); @@ -32,7 +32,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindApiResourceAsync_Should_Return_If_Found() { //Act - var apiResource = await _resourceStore.FindApiResourceAsync("Test-ApiResource-Name-1").ConfigureAwait(false); + var apiResource = await _resourceStore.FindApiResourceAsync("Test-ApiResource-Name-1"); //Assert apiResource.ShouldNotBe(null); @@ -48,7 +48,7 @@ namespace Volo.Abp.IdentityServer.Clients var apiResources = (await _resourceStore.FindApiResourcesByScopeAsync(new List { "Test-ApiResource-ApiScope-Name-1" - }).ConfigureAwait(false)).ToList(); + })).ToList(); //Assert apiResources.ShouldNotBe(null); @@ -63,7 +63,7 @@ namespace Volo.Abp.IdentityServer.Clients var identityResourcesByScope = await _resourceStore.FindIdentityResourcesByScopeAsync(new List { "Test-Identity-Resource-Name-1" - }).ConfigureAwait(false); + }); //Assert var resourcesByScope = identityResourcesByScope as IdentityResource[] ?? identityResourcesByScope.ToArray(); @@ -77,7 +77,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task GetAllResourcesAsync_Should_Return() { //Act - var resources = await _resourceStore.GetAllResourcesAsync().ConfigureAwait(false); + var resources = await _resourceStore.GetAllResourcesAsync(); //Assert resources.ShouldNotBe(null); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs index 7df9936183..8e83f57c51 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.IdentityServer.Clients [Fact] public async Task FindClientByIdAsync_Should_Return_Null_If_Not_Found() { - var persistentGrant = await _persistedGrantStore.GetAsync("not-existing-id").ConfigureAwait(false); + var persistentGrant = await _persistedGrantStore.GetAsync("not-existing-id"); persistentGrant.ShouldBeNull(); } @@ -29,7 +29,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindPersistentGrantByIdAsync_Should_Return_The_PersistentGrant_If_Found() { //Act - var client = await _persistedGrantStore.GetAsync("38").ConfigureAwait(false); + var client = await _persistedGrantStore.GetAsync("38"); //Assert client.ShouldNotBeNull(); @@ -52,10 +52,10 @@ namespace Volo.Abp.IdentityServer.Clients Data = "TestData-39", Expiration = new DateTime(2018, 1, 6, 21, 22, 23), CreationTime = new DateTime(2018, 1, 5, 19, 20, 21) - }).ConfigureAwait(false); + }); //Assert - var persistedGrant = await _persistedGrantStore.GetAsync("39").ConfigureAwait(false); + var persistedGrant = await _persistedGrantStore.GetAsync("39"); persistedGrant.Key.ShouldBe("39"); persistedGrant.ClientId.ShouldBe("TestClientId-39"); persistedGrant.Type.ShouldBe("TestType-39"); @@ -92,10 +92,10 @@ namespace Volo.Abp.IdentityServer.Clients Data = "TestData-PersistedGrantKey1", Expiration = new DateTime(2018, 1, 6, 21, 22, 23), CreationTime = new DateTime(2018, 1, 5, 19, 20, 21) - }).ConfigureAwait(false); + }); //Assert - var persistedGrant = await _persistedGrantStore.GetAsync("PersistedGrantKey1").ConfigureAwait(false); + var persistedGrant = await _persistedGrantStore.GetAsync("PersistedGrantKey1"); persistedGrant.Key.ShouldBe("PersistedGrantKey1"); persistedGrant.ClientId.ShouldBe("TestClientId-PersistedGrantKey1"); persistedGrant.Type.ShouldBe("TestType-PersistedGrantKey1"); @@ -122,7 +122,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task GetAllAsync_Should_Get_All_PersistedGrants_For_A_Given_SubjectId() { //Act - var persistentGrants = await _persistedGrantStore.GetAllAsync("TestSubject").ConfigureAwait(false); + var persistentGrants = await _persistedGrantStore.GetAllAsync("TestSubject"); //Assert var persistedGrants = persistentGrants as PersistedGrant[] ?? persistentGrants.ToArray(); @@ -142,13 +142,13 @@ namespace Volo.Abp.IdentityServer.Clients Type = "Type", ClientId = "ClientId", Data = "" - }).ConfigureAwait(false); + }); //Act - await _persistedGrantStore.RemoveAsync("#1P3R").ConfigureAwait(false); + await _persistedGrantStore.RemoveAsync("#1P3R"); //Assert - var persistedGrant = await _persistedGrantStore.GetAsync("#1P3R").ConfigureAwait(false); + var persistedGrant = await _persistedGrantStore.GetAsync("#1P3R"); persistedGrant.ShouldBe(null); } @@ -156,16 +156,16 @@ namespace Volo.Abp.IdentityServer.Clients public async Task RemoveAllAsync_Should_RemoveAll_PeristedGrants_For_A_Given_Subject_And_ClientId() { //Arrange - var persistedGrantsWithTestSubjectX = await _persistedGrantStore.GetAllAsync("TestSubject-X").ConfigureAwait(false); + var persistedGrantsWithTestSubjectX = await _persistedGrantStore.GetAllAsync("TestSubject-X"); var persistedGrantsWithTestSubjectXBeforeLength = persistedGrantsWithTestSubjectX.ToArray().Length; //Act - await _persistedGrantStore.RemoveAllAsync("TestSubject-X", "TestClientId-X").ConfigureAwait(false); + await _persistedGrantStore.RemoveAllAsync("TestSubject-X", "TestClientId-X"); //Assert persistedGrantsWithTestSubjectXBeforeLength.ShouldBe(2); - var persistedGrants = (await _persistedGrantStore.GetAllAsync("TestClientId-37").ConfigureAwait(false)).ToArray(); + var persistedGrants = (await _persistedGrantStore.GetAllAsync("TestClientId-37")).ToArray(); persistedGrants.ShouldNotBe(null); persistedGrants.Length.ShouldBe(0); } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs index cdbea763c6..af701cfc69 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs @@ -23,27 +23,27 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task IsOriginAllowedAsync() { - (await _corsPolicyService.IsOriginAllowedAsync("https://client1-origin.com").ConfigureAwait(false)).ShouldBeTrue(); - (await _corsPolicyService.IsOriginAllowedAsync("https://unknown-origin.com").ConfigureAwait(false)).ShouldBeFalse(); + (await _corsPolicyService.IsOriginAllowedAsync("https://client1-origin.com")).ShouldBeTrue(); + (await _corsPolicyService.IsOriginAllowedAsync("https://unknown-origin.com")).ShouldBeFalse(); } [Fact] public async Task IsOriginAllowedAsync_Should_Invalidate_Cache_On_Update() { //It does not exists before - (await _corsPolicyService.IsOriginAllowedAsync("https://new-origin.com").ConfigureAwait(false)).ShouldBeFalse(); + (await _corsPolicyService.IsOriginAllowedAsync("https://new-origin.com")).ShouldBeFalse(); using (var uow = _unitOfWorkManager.Begin()) { - var client1 = await _clientRepository.FindByCliendIdAsync("ClientId1").ConfigureAwait(false); + var client1 = await _clientRepository.FindByCliendIdAsync("ClientId1"); client1.AddCorsOrigin("https://new-origin.com"); - await _clientRepository.UpdateAsync(client1).ConfigureAwait(false); + await _clientRepository.UpdateAsync(client1); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } //It does exists now - (await _corsPolicyService.IsOriginAllowedAsync("https://new-origin.com").ConfigureAwait(false)).ShouldBeTrue(); + (await _corsPolicyService.IsOriginAllowedAsync("https://new-origin.com")).ShouldBeTrue(); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj index 4876a42c56..f9cdb67d4c 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index d7e0716151..0d87a2fd19 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -39,10 +39,10 @@ namespace Volo.Abp.IdentityServer public async Task BuildAsync() { - await AddClients().ConfigureAwait(false); - await AddPersistentGrants().ConfigureAwait(false); - await AddApiResources().ConfigureAwait(false); - await AddIdentityResources().ConfigureAwait(false); + await AddClients(); + await AddPersistentGrants(); + await AddApiResources(); + await AddIdentityResources(); } private async Task AddClients() @@ -56,7 +56,7 @@ namespace Volo.Abp.IdentityServer client42.AddScope("api1"); - await _clientRepository.InsertAsync(client42).ConfigureAwait(false); + await _clientRepository.InsertAsync(client42); } private async Task AddPersistentGrants() @@ -68,7 +68,7 @@ namespace Volo.Abp.IdentityServer Type = "TestType-38", SubjectId = "TestSubject", Data = "TestData-38" - }).ConfigureAwait(false); + }); await _persistentGrantRepository.InsertAsync(new PersistedGrant(_guidGenerator.Create()) { @@ -77,7 +77,7 @@ namespace Volo.Abp.IdentityServer Type = "TestType-37", SubjectId = "TestSubject", Data = "TestData-37" - }).ConfigureAwait(false); + }); await _persistentGrantRepository.InsertAsync(new PersistedGrant(_guidGenerator.Create()) { @@ -86,7 +86,7 @@ namespace Volo.Abp.IdentityServer Type = "TestType-36", SubjectId = "TestSubject-X", Data = "TestData-36" - }).ConfigureAwait(false); + }); await _persistentGrantRepository.InsertAsync(new PersistedGrant(_guidGenerator.Create()) { @@ -95,7 +95,7 @@ namespace Volo.Abp.IdentityServer Type = "TestType-35", SubjectId = "TestSubject-X", Data = "TestData-35" - }).ConfigureAwait(false); + }); } private async Task AddApiResources() @@ -111,7 +111,7 @@ namespace Volo.Abp.IdentityServer apiResource.AddScope("Test-ApiResource-ApiScope-Name-1", "Test-ApiResource-ApiScope-DisplayName-1"); apiResource.AddUserClaim("Test-ApiResource-Claim-Type-1"); - await _apiResourceRepository.InsertAsync(apiResource).ConfigureAwait(false); + await _apiResourceRepository.InsertAsync(apiResource); } private async Task AddIdentityResources() @@ -126,7 +126,7 @@ namespace Volo.Abp.IdentityServer identityResource.AddUserClaim("Test-Identity-Resource-1-IdentityClaim-Type-1"); - await _identityResourceRepository.InsertAsync(identityResource).ConfigureAwait(false); + await _identityResourceRepository.InsertAsync(identityResource); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj index 6459a4c307..65e2a1f5c9 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj index c02b7d5c13..d6a6ee9a0c 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index ee6c8c59b6..c36fef2d58 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -49,12 +49,12 @@ namespace Volo.Abp.IdentityServer public async Task BuildAsync() { - await AddDeviceFlowCodes().ConfigureAwait(false); - await AddPersistedGrants().ConfigureAwait(false); - await AddIdentityResources().ConfigureAwait(false); - await AddApiResources().ConfigureAwait(false); - await AddClients().ConfigureAwait(false); - await AddClaimTypes().ConfigureAwait(false); + await AddDeviceFlowCodes(); + await AddPersistedGrants(); + await AddIdentityResources(); + await AddApiResources(); + await AddClients(); + await AddClaimTypes(); } private async Task AddDeviceFlowCodes() @@ -94,7 +94,7 @@ namespace Volo.Abp.IdentityServer ClientId = "PersistedGrantClientId1", Type = "PersistedGrantType1", Data = "" - }).ConfigureAwait(false); + }); await _persistentGrantRepository.InsertAsync(new PersistedGrant(_guidGenerator.Create()) { @@ -103,7 +103,7 @@ namespace Volo.Abp.IdentityServer ClientId = "c1", Type = "c1type", Data = "" - }).ConfigureAwait(false); + }); await _persistentGrantRepository.InsertAsync(new PersistedGrant(_guidGenerator.Create()) { @@ -113,7 +113,7 @@ namespace Volo.Abp.IdentityServer Type = "c1type", Data = "", Expiration = _clock.Now.AddDays(1), - }).ConfigureAwait(false); + }); await _persistentGrantRepository.InsertAsync(new PersistedGrant(_guidGenerator.Create()) { @@ -123,7 +123,7 @@ namespace Volo.Abp.IdentityServer Type = "c1type", Data = "", Expiration = _clock.Now.AddDays(-1) - }).ConfigureAwait(false); + }); } private async Task AddIdentityResources() @@ -136,9 +136,9 @@ namespace Volo.Abp.IdentityServer identityResource.AddUserClaim(nameof(ApiResourceClaim.Type)); - await _identityResourceRepository.InsertAsync(identityResource).ConfigureAwait(false); - await _identityResourceRepository.InsertAsync(new IdentityResource(_guidGenerator.Create(), "NewIdentityResource2")).ConfigureAwait(false); - await _identityResourceRepository.InsertAsync(new IdentityResource(_guidGenerator.Create(), "NewIdentityResource3")).ConfigureAwait(false); + await _identityResourceRepository.InsertAsync(identityResource); + await _identityResourceRepository.InsertAsync(new IdentityResource(_guidGenerator.Create(), "NewIdentityResource2")); + await _identityResourceRepository.InsertAsync(new IdentityResource(_guidGenerator.Create(), "NewIdentityResource3")); } private async Task AddApiResources() @@ -151,9 +151,9 @@ namespace Volo.Abp.IdentityServer apiResource.AddUserClaim(nameof(ApiResourceClaim.Type)); apiResource.AddSecret(nameof(ApiSecret.Value)); - await _apiResourceRepository.InsertAsync(apiResource).ConfigureAwait(false); - await _apiResourceRepository.InsertAsync(new ApiResource(_guidGenerator.Create(), "NewApiResource2")).ConfigureAwait(false); - await _apiResourceRepository.InsertAsync(new ApiResource(_guidGenerator.Create(), "NewApiResource3")).ConfigureAwait(false); + await _apiResourceRepository.InsertAsync(apiResource); + await _apiResourceRepository.InsertAsync(new ApiResource(_guidGenerator.Create(), "NewApiResource2")); + await _apiResourceRepository.InsertAsync(new ApiResource(_guidGenerator.Create(), "NewApiResource3")); } private async Task AddClients() @@ -178,17 +178,17 @@ namespace Volo.Abp.IdentityServer client.AddScope(nameof(ClientScope.Scope)); client.AddSecret(nameof(ClientSecret.Value)); - await _clientRepository.InsertAsync(client).ConfigureAwait(false); + await _clientRepository.InsertAsync(client); - await _clientRepository.InsertAsync(new Client(_guidGenerator.Create(), "ClientId2")).ConfigureAwait(false); - await _clientRepository.InsertAsync(new Client(_guidGenerator.Create(), "ClientId3")).ConfigureAwait(false); + await _clientRepository.InsertAsync(new Client(_guidGenerator.Create(), "ClientId2")); + await _clientRepository.InsertAsync(new Client(_guidGenerator.Create(), "ClientId3")); } private async Task AddClaimTypes() { var ageClaim = new IdentityClaimType(Guid.NewGuid(), "Age", false, false, null, null, null, IdentityClaimValueType.Int); - await _identityClaimTypeRepository.InsertAsync(ageClaim).ConfigureAwait(false); + await _identityClaimTypeRepository.InsertAsync(ageClaim); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs index 43b4e9d8f2..b79114c59a 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs @@ -20,13 +20,13 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task FindByNormalizedNameAsync() { - (await apiResourceRepository.FindByNameAsync("NewApiResource2").ConfigureAwait(false)).ShouldNotBeNull(); + (await apiResourceRepository.FindByNameAsync("NewApiResource2")).ShouldNotBeNull(); } [Fact] public async Task GetListByScopesAsync() { - (await apiResourceRepository.GetListByScopesAsync(new[] { "NewApiResource2", "NewApiResource3" }).ConfigureAwait(false)).Count.ShouldBe(2); + (await apiResourceRepository.GetListByScopesAsync(new[] { "NewApiResource2", "NewApiResource3" })).Count.ShouldBe(2); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs index 300c1620ff..86f69610f5 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs @@ -21,13 +21,13 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task FindByCliendIdAsync() { - (await clientRepository.FindByCliendIdAsync("ClientId2").ConfigureAwait(false)).ShouldNotBeNull(); + (await clientRepository.FindByCliendIdAsync("ClientId2")).ShouldNotBeNull(); } [Fact] public async Task GetAllDistinctAllowedCorsOriginsAsync() { - var origins = await clientRepository.GetAllDistinctAllowedCorsOriginsAsync().ConfigureAwait(false); + var origins = await clientRepository.GetAllDistinctAllowedCorsOriginsAsync(); origins.Any().ShouldBeTrue(); } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs index 2d98fff2a3..3ab47dd7ce 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task GetListByScopesAsync() { - (await identityResourceRepository.GetListByScopesAsync(new[] { "", "NewIdentityResource2" }).ConfigureAwait(false)).Count.ShouldBe(1); + (await identityResourceRepository.GetListByScopesAsync(new[] { "", "NewIdentityResource2" })).Count.ShouldBe(1); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs index 0786af42bc..20f6674515 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs @@ -22,13 +22,13 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task FindByKeyAsync() { - (await _persistentGrantRepository.FindByKeyAsync("PersistedGrantKey1").ConfigureAwait(false)).ShouldNotBeNull(); + (await _persistentGrantRepository.FindByKeyAsync("PersistedGrantKey1")).ShouldNotBeNull(); } [Fact] public async Task GetListBySubjectIdAsync() { - var persistedGrants = await _persistentGrantRepository.GetListBySubjectIdAsync("PersistedGrantSubjectId1").ConfigureAwait(false); + var persistedGrants = await _persistentGrantRepository.GetListBySubjectIdAsync("PersistedGrantSubjectId1"); persistedGrants.ShouldNotBeEmpty(); persistedGrants.ShouldContain(x => x.Key == "PersistedGrantKey1"); } @@ -36,9 +36,9 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task DeleteBySubjectIdAndClientId() { - await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantClientId1").ConfigureAwait(false); + await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantClientId1"); - var persistedGrants = await _persistentGrantRepository.GetListAsync().ConfigureAwait(false); + var persistedGrants = await _persistentGrantRepository.GetListAsync(); persistedGrants.ShouldNotBeEmpty(); persistedGrants.ShouldNotContain(x => x.Key == "PersistedGrantKey1" && x.SubjectId == "PersistedGrantSubjectId1" && @@ -49,9 +49,9 @@ namespace Volo.Abp.IdentityServer public async Task DeleteBySubjectIdAndClientIdAndType() { await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantClientId1", - "PersistedGrantClientId1").ConfigureAwait(false); + "PersistedGrantClientId1"); - var persistedGrants = await _persistentGrantRepository.GetListAsync().ConfigureAwait(false); + var persistedGrants = await _persistentGrantRepository.GetListAsync(); persistedGrants.ShouldNotBeEmpty(); persistedGrants.ShouldNotContain(x => x.Key == "PersistedGrantKey1" && x.SubjectId == "PersistedGrantSubjectId1" && diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo.Abp.PermissionManagement.Application.Contracts.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo.Abp.PermissionManagement.Application.Contracts.csproj index 9e1d805b8a..8bb01c8fff 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo.Abp.PermissionManagement.Application.Contracts.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo.Abp.PermissionManagement.Application.Contracts.csproj @@ -1,5 +1,6 @@ + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo.Abp.PermissionManagement.Application.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo.Abp.PermissionManagement.Application.csproj index cd39199733..41a280d054 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo.Abp.PermissionManagement.Application.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo.Abp.PermissionManagement.Application.csproj @@ -1,5 +1,6 @@ + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs index b9f504b4f1..63065fd688 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.PermissionManagement public virtual async Task GetAsync(string providerName, string providerKey) { - await CheckProviderPolicy(providerName).ConfigureAwait(false); + await CheckProviderPolicy(providerName); var result = new GetPermissionListResultDto { @@ -74,7 +74,7 @@ namespace Volo.Abp.PermissionManagement GrantedProviders = new List() }; - var grantInfo = await _permissionManager.GetAsync(permission.Name, providerName, providerKey).ConfigureAwait(false); + var grantInfo = await _permissionManager.GetAsync(permission.Name, providerName, providerKey); grantInfoDto.IsGranted = grantInfo.IsGranted; @@ -101,11 +101,11 @@ namespace Volo.Abp.PermissionManagement public virtual async Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input) { - await CheckProviderPolicy(providerName).ConfigureAwait(false); + await CheckProviderPolicy(providerName); foreach (var permissionDto in input.Permissions) { - await _permissionManager.SetAsync(permissionDto.Name, providerName, providerKey, permissionDto.IsGranted).ConfigureAwait(false); + await _permissionManager.SetAsync(permissionDto.Name, providerName, providerKey, permissionDto.IsGranted); } } @@ -117,7 +117,7 @@ namespace Volo.Abp.PermissionManagement throw new AbpException($"No policy defined to get/set permissions for the provider '{policyName}'. Use {nameof(PermissionManagementOptions)} to map the policy."); } - await AuthorizationService.CheckAsync(policyName).ConfigureAwait(false); + await AuthorizationService.CheckAsync(policyName); } } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj index ff0ba6fbee..629d9f1742 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/zh-Hant.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/zh-Hant.json new file mode 100644 index 0000000000..ea109a2dd0 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/zh-Hant.json @@ -0,0 +1,10 @@ +{ + "culture": "zh-Hant", + "texts": { + "Permissions": "權限", + "OnlyProviderPermissons": "只有這個提供者", + "All": "全部", + "SelectAllInAllTabs": "授予所有權限", + "SelectAllInThisTab": "全選" + } +} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo.Abp.PermissionManagement.Domain.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo.Abp.PermissionManagement.Domain.csproj index 8bfc4e4683..1a44f1f6a1 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo.Abp.PermissionManagement.Domain.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo.Abp.PermissionManagement.Domain.csproj @@ -1,5 +1,6 @@ + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs index 451b9fadbf..80062f528d 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.PermissionManagement providerKey, tenantId ) - ).ConfigureAwait(false); + ); } } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator.cs index 46badf093a..9e73e59b79 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.PermissionManagement using (CurrentTenant.Change(eventData.Entity.TenantId)) { - await Cache.RemoveAsync(cacheKey).ConfigureAwait(false); + await Cache.RemoveAsync(cacheKey); } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs index 9cca1277d5..0b83f37fd1 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs @@ -46,7 +46,7 @@ namespace Volo.Abp.PermissionManagement protected virtual async Task GrantAsync(string name, string providerKey) { - var permissionGrant = await PermissionGrantRepository.FindAsync(name, Name, providerKey).ConfigureAwait(false); + var permissionGrant = await PermissionGrantRepository.FindAsync(name, Name, providerKey); if (permissionGrant != null) { return; @@ -60,18 +60,18 @@ namespace Volo.Abp.PermissionManagement providerKey, CurrentTenant.Id ) - ).ConfigureAwait(false); + ); } protected virtual async Task RevokeAsync(string name, string providerKey) { - var permissionGrant = await PermissionGrantRepository.FindAsync(name, Name, providerKey).ConfigureAwait(false); + var permissionGrant = await PermissionGrantRepository.FindAsync(name, Name, providerKey); if (permissionGrant == null) { return; } - await PermissionGrantRepository.DeleteAsync(permissionGrant).ConfigureAwait(false); + await PermissionGrantRepository.DeleteAsync(permissionGrant); } } } \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs index 4f7d177802..3607a57f4b 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs @@ -52,7 +52,7 @@ namespace Volo.Abp.PermissionManagement public async Task GetAsync(string permissionName, string providerName, string providerKey) { - return await GetInternalAsync(PermissionDefinitionManager.Get(permissionName), providerName, providerKey).ConfigureAwait(false); + return await GetInternalAsync(PermissionDefinitionManager.Get(permissionName), providerName, providerKey); } public async Task> GetAllAsync(string providerName, string providerKey) @@ -61,7 +61,7 @@ namespace Volo.Abp.PermissionManagement foreach (var permissionDefinition in PermissionDefinitionManager.GetPermissions()) { - results.Add(await GetInternalAsync(permissionDefinition, providerName, providerKey).ConfigureAwait(false)); + results.Add(await GetInternalAsync(permissionDefinition, providerName, providerKey)); } return results; @@ -83,7 +83,7 @@ namespace Volo.Abp.PermissionManagement throw new ApplicationException($"The permission named '{permission.Name}' has multitenancy side '{permission.MultiTenancySide}' which is not compatible with the current multitenancy side '{CurrentTenant.GetMultiTenancySide()}'"); } - var currentGrantInfo = await GetInternalAsync(permission, providerName, providerKey).ConfigureAwait(false); + var currentGrantInfo = await GetInternalAsync(permission, providerName, providerKey); if (currentGrantInfo.IsGranted == isGranted) { return; @@ -96,13 +96,13 @@ namespace Volo.Abp.PermissionManagement throw new AbpException("Unknown permission management provider: " + providerName); } - await provider.SetAsync(permissionName, providerKey, isGranted).ConfigureAwait(false); + await provider.SetAsync(permissionName, providerKey, isGranted); } public async Task UpdateProviderKeyAsync(PermissionGrant permissionGrant, string providerKey) { permissionGrant.ProviderKey = providerKey; - return await PermissionGrantRepository.UpdateAsync(permissionGrant).ConfigureAwait(false); + return await PermissionGrantRepository.UpdateAsync(permissionGrant); } protected virtual async Task GetInternalAsync(PermissionDefinition permission, string providerName, string providerKey) @@ -121,7 +121,7 @@ namespace Volo.Abp.PermissionManagement foreach (var provider in ManagementProviders) { - var providerResult = await provider.CheckAsync(permission.Name, providerName, providerKey).ConfigureAwait(false); + var providerResult = await provider.CheckAsync(permission.Name, providerName, providerKey); if (providerResult.IsGranted) { result.IsGranted = true; diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs index 0d594007e8..744dc19c8e 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.PermissionManagement public async Task IsGrantedAsync(string name, string providerName, string providerKey) { - return (await GetCacheItemAsync(name, providerName, providerKey).ConfigureAwait(false)).IsGranted; + return (await GetCacheItemAsync(name, providerName, providerKey)).IsGranted; } protected virtual async Task GetCacheItemAsync(string name, string providerName, string providerKey) @@ -35,7 +35,7 @@ namespace Volo.Abp.PermissionManagement Logger.LogDebug($"PermissionStore.GetCacheItemAsync: {cacheKey}"); - var cacheItem = await Cache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await Cache.GetAsync(cacheKey); if (cacheItem != null) { @@ -55,7 +55,7 @@ namespace Volo.Abp.PermissionManagement await Cache.SetAsync( cacheKey, cacheItem - ).ConfigureAwait(false); + ); Logger.LogDebug($"Finished setting the cache item: {cacheKey}"); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj index c13b3da80b..0b9ac8acd8 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.PermissionManagement.EntityFrameworkCore Volo.Abp.PermissionManagement.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs index 8663e8026a..d8241d6f8f 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore s.ProviderName == providerName && s.ProviderKey == providerKey, GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } public async Task> GetListAsync( @@ -42,7 +42,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey - ).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + ).ToListAsync(GetCancellationToken(cancellationToken)); } } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj index c634f59f65..8360442b75 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj index 2411e5cf47..a41a82b330 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj index 53ad2adde2..4dd5b952f4 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs index bc2f5ef5d9..67befaa717 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.PermissionManagement.MongoDB s.ProviderName == providerName && s.ProviderKey == providerKey, GetCancellationToken(cancellationToken) - ).ConfigureAwait(false); + ); } public async Task> GetListAsync( @@ -41,7 +41,7 @@ namespace Volo.Abp.PermissionManagement.MongoDB .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey - ).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + ).ToListAsync(GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/FodyWeavers.xml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/FodyWeavers.xsd b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs index fe01aa6618..70ec393455 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs @@ -42,7 +42,7 @@ namespace Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement { ValidateModel(); - var result = await _permissionAppService.GetAsync(ProviderName, ProviderKey).ConfigureAwait(false); + var result = await _permissionAppService.GetAsync(ProviderName, ProviderKey); EntityDisplayName = result.EntityDisplayName; @@ -84,7 +84,7 @@ namespace Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement { Permissions = updatePermissionDtos } - ).ConfigureAwait(false); + ); return NoContent(); } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj index 1bf27e1ddc..2c1e0b290d 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj index 81e3861ed9..e7fde2be87 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo/Abp/PermissionManagement/PermissionAppService_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo/Abp/PermissionManagement/PermissionAppService_Tests.cs index d610eede6e..e6240a34b2 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo/Abp/PermissionManagement/PermissionAppService_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo/Abp/PermissionManagement/PermissionAppService_Tests.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.PermissionManagement.Application.Tests.Volo.Abp.PermissionMan public async Task GetAsync() { var permissionListResultDto = await _permissionAppService.GetAsync(UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false); + PermissionTestDataBuilder.User1Id.ToString()); permissionListResultDto.ShouldNotBeNull(); permissionListResultDto.EntityDisplayName.ShouldBe(PermissionTestDataBuilder.User1Id.ToString()); @@ -43,7 +43,7 @@ namespace Volo.Abp.PermissionManagement.Application.Tests.Volo.Abp.PermissionMan public async Task UpdateAsync() { (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false)).ShouldBeNull(); + "Test")).ShouldBeNull(); await _permissionAppService.UpdateAsync("Test", "Test", new UpdatePermissionsDto() @@ -56,10 +56,10 @@ namespace Volo.Abp.PermissionManagement.Application.Tests.Volo.Abp.PermissionMan Name = "MyPermission1" } } - }).ConfigureAwait(false); + }); (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false)).ShouldNotBeNull(); + "Test")).ShouldNotBeNull(); } [Fact] @@ -67,14 +67,14 @@ namespace Volo.Abp.PermissionManagement.Application.Tests.Volo.Abp.PermissionMan { await _permissionGrantRepository.InsertAsync( new PermissionGrant( - Guid.NewGuid(), + Guid.NewGuid(), "MyPermission1", "Test", "Test" ) - ).ConfigureAwait(false); + ); (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false)).ShouldNotBeNull(); + "Test")).ShouldNotBeNull(); await _permissionAppService.UpdateAsync("Test", "Test", new UpdatePermissionsDto() @@ -87,10 +87,10 @@ namespace Volo.Abp.PermissionManagement.Application.Tests.Volo.Abp.PermissionMan Name = "MyPermission1" } } - }).ConfigureAwait(false); + }); (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false)).ShouldBeNull(); + "Test")).ShouldBeNull(); } } } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj index c3e5d1d750..3736c5651e 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj index 1f66b07cf5..2e688fd5e6 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj index ba8c20e337..bdaa26deea 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionGrantRepository_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionGrantRepository_Tests.cs index 217b81361b..e27be7e426 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionGrantRepository_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionGrantRepository_Tests.cs @@ -19,16 +19,16 @@ namespace Volo.Abp.PermissionManagement [Fact] public async Task FindAsync() { - (await PermissionGrantRepository.FindAsync("MyPermission1", UserPermissionValueProvider.ProviderName, PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false)).ShouldNotBeNull(); + (await PermissionGrantRepository.FindAsync("MyPermission1", UserPermissionValueProvider.ProviderName, PermissionTestDataBuilder.User1Id.ToString())).ShouldNotBeNull(); - (await PermissionGrantRepository.FindAsync("Undefined-Permission", UserPermissionValueProvider.ProviderName, PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false)).ShouldBeNull(); - (await PermissionGrantRepository.FindAsync("MyPermission1", "Undefined-Provider", "Unknown-Id").ConfigureAwait(false)).ShouldBeNull(); + (await PermissionGrantRepository.FindAsync("Undefined-Permission", UserPermissionValueProvider.ProviderName, PermissionTestDataBuilder.User1Id.ToString())).ShouldBeNull(); + (await PermissionGrantRepository.FindAsync("MyPermission1", "Undefined-Provider", "Unknown-Id")).ShouldBeNull(); } [Fact] public async Task GetListAsync() { - var permissionGrants = await PermissionGrantRepository.GetListAsync(UserPermissionValueProvider.ProviderName, PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false); + var permissionGrants = await PermissionGrantRepository.GetListAsync(UserPermissionValueProvider.ProviderName, PermissionTestDataBuilder.User1Id.ToString()); permissionGrants.ShouldContain(p => p.Name == "MyPermission1"); } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionTestDataBuilder.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionTestDataBuilder.cs index d6e89741c4..662d0b17c8 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionTestDataBuilder.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/PermissionTestDataBuilder.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.PermissionManagement UserPermissionValueProvider.ProviderName, User1Id.ToString() ) - ).ConfigureAwait(false); + ); await _permissionGrantRepository.InsertAsync( new PermissionGrant( @@ -38,7 +38,7 @@ namespace Volo.Abp.PermissionManagement UserPermissionValueProvider.ProviderName, User1Id.ToString() ) - ).ConfigureAwait(false); + ); } } } \ No newline at end of file diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Domain.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Domain.Tests.csproj index c9a10af869..4177b1b4dd 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Domain.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_Basic_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_Basic_Tests.cs index b2125dbf02..1fb52c13a1 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_Basic_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_Basic_Tests.cs @@ -19,13 +19,13 @@ namespace Volo.Abp.PermissionManagement { await Assert.ThrowsAsync(async () => await _permissionChecker.IsGrantedAsync("UndefinedPermissionName") -.ConfigureAwait(false)).ConfigureAwait(false); + ); } [Fact] public async Task Should_Return_False_As_Default_For_Any_Permission() { - (await _permissionChecker.IsGrantedAsync("MyPermission1").ConfigureAwait(false)).ShouldBeFalse(); + (await _permissionChecker.IsGrantedAsync("MyPermission1")).ShouldBeFalse(); } } } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_User_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_User_Tests.cs index 2a6f59af82..b49ff94f90 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_User_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionChecker_User_Tests.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.PermissionManagement (await _permissionChecker.IsGrantedAsync( CreatePrincipal(PermissionTestDataBuilder.User1Id), "MyPermission1" - ).ConfigureAwait(false)).ShouldBeTrue(); + )).ShouldBeTrue(); } [Fact] @@ -32,7 +32,7 @@ namespace Volo.Abp.PermissionManagement (await _permissionChecker.IsGrantedAsync( CreatePrincipal(PermissionTestDataBuilder.User2Id), "MyPermission1" - ).ConfigureAwait(false)).ShouldBeFalse(); + )).ShouldBeFalse(); } [Fact] @@ -41,7 +41,7 @@ namespace Volo.Abp.PermissionManagement (await _permissionChecker.IsGrantedAsync( CreatePrincipal(null), "MyPermission1" - ).ConfigureAwait(false)).ShouldBeFalse(); + )).ShouldBeFalse(); } [Fact] @@ -50,7 +50,7 @@ namespace Volo.Abp.PermissionManagement (await _permissionChecker.IsGrantedAsync( CreatePrincipal(PermissionTestDataBuilder.User1Id, Guid.NewGuid()), "MyPermission3" - ).ConfigureAwait(false)).ShouldBeFalse(); + )).ShouldBeFalse(); } private static ClaimsPrincipal CreatePrincipal(Guid? userId, Guid? tenantId = null) diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionDataSeeder_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionDataSeeder_Tests.cs index 32ee6ff1cf..6868421a8a 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionDataSeeder_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionDataSeeder_Tests.cs @@ -21,17 +21,17 @@ namespace Volo.Abp.PermissionManagement [Fact] public async Task SeedAsync() { - (await _grantpermissionGrantRepository.FindAsync("MyPermission1", "Test", "Test").ConfigureAwait(false)).ShouldBeNull(); - (await _grantpermissionGrantRepository.FindAsync("MyPermission2", "Test", "Test").ConfigureAwait(false)).ShouldBeNull(); + (await _grantpermissionGrantRepository.FindAsync("MyPermission1", "Test", "Test")).ShouldBeNull(); + (await _grantpermissionGrantRepository.FindAsync("MyPermission2", "Test", "Test")).ShouldBeNull(); await _permissionDataSeeder.SeedAsync("Test", "Test", new List() { "MyPermission1", "MyPermission2" - }).ConfigureAwait(false); + }); - (await _grantpermissionGrantRepository.FindAsync("MyPermission1", "Test", "Test").ConfigureAwait(false)).ShouldNotBeNull(); - (await _grantpermissionGrantRepository.FindAsync("MyPermission2", "Test", "Test").ConfigureAwait(false)).ShouldNotBeNull(); + (await _grantpermissionGrantRepository.FindAsync("MyPermission1", "Test", "Test")).ShouldNotBeNull(); + (await _grantpermissionGrantRepository.FindAsync("MyPermission2", "Test", "Test")).ShouldNotBeNull(); } } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator_Tests.cs index 7148fe9191..9d4248bb5a 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionGrantCacheItemInvalidator_Tests.cs @@ -28,17 +28,17 @@ namespace Volo.Abp.PermissionManagement { (await _cache.GetAsync(PermissionGrantCacheItem.CalculateCacheKey("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString())).ConfigureAwait(false)).ShouldBeNull(); + PermissionTestDataBuilder.User1Id.ToString()))).ShouldBeNull(); await _permissionStore.IsGrantedAsync("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false); + PermissionTestDataBuilder.User1Id.ToString()); (await _cache.GetAsync(PermissionGrantCacheItem.CalculateCacheKey("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString())).ConfigureAwait(false)).ShouldNotBeNull(); + PermissionTestDataBuilder.User1Id.ToString()))).ShouldNotBeNull(); } [Fact] @@ -47,17 +47,17 @@ namespace Volo.Abp.PermissionManagement // IsGrantedAsync will cache PermissionGrant await _permissionStore.IsGrantedAsync("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false); + PermissionTestDataBuilder.User1Id.ToString()); var permissionGrant = await _permissionGrantRepository.FindAsync("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false); + PermissionTestDataBuilder.User1Id.ToString()); permissionGrant.ShouldNotBeNull(); - await _permissionGrantRepository.DeleteAsync(permissionGrant).ConfigureAwait(false); + await _permissionGrantRepository.DeleteAsync(permissionGrant); (await _cache.GetAsync(PermissionGrantCacheItem.CalculateCacheKey("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString())).ConfigureAwait(false)).ShouldBeNull(); + PermissionTestDataBuilder.User1Id.ToString()))).ShouldBeNull(); } } } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManagementProvider_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManagementProvider_Tests.cs index 1cbab007e3..aac1272ccd 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManagementProvider_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManagementProvider_Tests.cs @@ -29,11 +29,11 @@ namespace Volo.Abp.PermissionManagement "Test", "Test" ) - ).ConfigureAwait(false); + ); var permissionValueProviderGrantInfo = await _permissionManagementProvider.CheckAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false); + "Test"); permissionValueProviderGrantInfo.IsGranted.ShouldBeTrue(); permissionValueProviderGrantInfo.ProviderKey.ShouldBe("Test"); @@ -44,7 +44,7 @@ namespace Volo.Abp.PermissionManagement { var permissionValueProviderGrantInfo = await _permissionManagementProvider.CheckAsync("MyPermission1", "TestNotExist", - "Test").ConfigureAwait(false); + "Test"); permissionValueProviderGrantInfo.IsGranted.ShouldBeFalse(); permissionValueProviderGrantInfo.ProviderKey.ShouldBeNull(); @@ -61,18 +61,18 @@ namespace Volo.Abp.PermissionManagement "Test", "Test" ) - ).ConfigureAwait(false); + ); (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false)).ShouldNotBeNull(); + "Test")).ShouldNotBeNull(); await _permissionManagementProvider.SetAsync("MyPermission1", "Test", - false).ConfigureAwait(false); + false); (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false)).ShouldBeNull(); + "Test")).ShouldBeNull(); } } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManager_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManager_Tests.cs index 66f0de1755..07d279ec9d 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManager_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionManager_Tests.cs @@ -28,11 +28,11 @@ namespace Volo.Abp.PermissionManagement "MyPermission1", "Test", "Test") - ).ConfigureAwait(false); + ); var grantedProviders = await _permissionManager.GetAsync("MyPermission1", "Test", - "Test").ConfigureAwait(false); + "Test"); grantedProviders.ShouldNotBeNull(); grantedProviders.IsGranted.ShouldBeTrue(); @@ -46,7 +46,7 @@ namespace Volo.Abp.PermissionManagement await Assert.ThrowsAsync(async () => await _permissionManager.GetAsync( "MyPermission1NotExist", "Test", - "Test").ConfigureAwait(false)).ConfigureAwait(false); + "Test")); } [Fact] @@ -57,18 +57,18 @@ namespace Volo.Abp.PermissionManagement "MyPermission1", "Test", "Test") - ).ConfigureAwait(false); + ); await _permissionGrantRepository.InsertAsync(new PermissionGrant( Guid.NewGuid(), "MyPermission2", "Test", "Test") - ).ConfigureAwait(false); + ); var permissionWithGrantedProviders = await _permissionManager.GetAllAsync( "Test", - "Test").ConfigureAwait(false); + "Test"); permissionWithGrantedProviders.ShouldNotBeNull(); permissionWithGrantedProviders.ShouldContain(x => @@ -82,16 +82,16 @@ namespace Volo.Abp.PermissionManagement { (await _permissionGrantRepository.FindAsync("MyPermission2", "Test", - "Test").ConfigureAwait(false)).ShouldBeNull(); + "Test")).ShouldBeNull(); await _permissionManager.SetAsync( "MyPermission2", "Test", - "Test", true).ConfigureAwait(false); + "Test", true); (await _permissionGrantRepository.FindAsync("MyPermission2", "Test", - "Test").ConfigureAwait(false)).ShouldNotBeNull(); + "Test")).ShouldNotBeNull(); } [Fact] @@ -101,7 +101,7 @@ namespace Volo.Abp.PermissionManagement "MyPermission1NotExist", "Test", "Test", - true).ConfigureAwait(false)).ConfigureAwait(false); + true)); } [Fact] @@ -112,12 +112,12 @@ namespace Volo.Abp.PermissionManagement "MyPermission1", "Test", "Test") - ).ConfigureAwait(false); - var permissionGrant = await _permissionGrantRepository.FindAsync("MyPermission1", "Test", "Test").ConfigureAwait(false); + ); + var permissionGrant = await _permissionGrantRepository.FindAsync("MyPermission1", "Test", "Test"); permissionGrant.ProviderKey.ShouldBe("Test"); - await _permissionManager.UpdateProviderKeyAsync(permissionGrant, "NewProviderKey").ConfigureAwait(false); - (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", "NewProviderKey").ConfigureAwait(false)).ShouldNotBeNull(); + await _permissionManager.UpdateProviderKeyAsync(permissionGrant, "NewProviderKey"); + (await _permissionGrantRepository.FindAsync("MyPermission1", "Test", "NewProviderKey")).ShouldNotBeNull(); } } } diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionStore_Tests.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionStore_Tests.cs index f82b541e27..965899ede9 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionStore_Tests.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/PermissionStore_Tests.cs @@ -22,12 +22,12 @@ namespace Volo.Abp.PermissionManagement { (await _permissionStore.IsGrantedAsync("MyPermission1", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false)).ShouldBeTrue(); + PermissionTestDataBuilder.User1Id.ToString())).ShouldBeTrue(); (await _permissionStore.IsGrantedAsync("MyPermission1NotExist", UserPermissionValueProvider.ProviderName, - PermissionTestDataBuilder.User1Id.ToString()).ConfigureAwait(false)).ShouldBeFalse(); + PermissionTestDataBuilder.User1Id.ToString())).ShouldBeFalse(); } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/FodyWeavers.xml b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/FodyWeavers.xsd b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj index 8de8ec1923..406ef82aba 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json new file mode 100644 index 0000000000..f8f55c38cb --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "Settings": "設置", + "SuccessfullySaved": "保存成功" + } +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/FodyWeavers.xml b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/FodyWeavers.xsd b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo.Abp.SettingManagement.Domain.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo.Abp.SettingManagement.Domain.csproj index 8345be068a..8b0ced6f97 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo.Abp.SettingManagement.Domain.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo.Abp.SettingManagement.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingCacheItemInvalidator.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingCacheItemInvalidator.cs index 419d0febcd..35d358a67d 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingCacheItemInvalidator.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingCacheItemInvalidator.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.SettingManagement eventData.Entity.ProviderKey ); - await Cache.RemoveAsync(cacheKey).ConfigureAwait(false); + await Cache.RemoveAsync(cacheKey); } protected virtual string CalculateCacheKey(string name, string providerName, string providerKey) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementProvider.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementProvider.cs index b7410490f5..2859b2e7f4 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementProvider.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementProvider.cs @@ -17,17 +17,17 @@ namespace Volo.Abp.SettingManagement public async Task GetOrNullAsync(SettingDefinition setting, string providerKey) { - return await SettingManagementStore.GetOrNullAsync(setting.Name, Name, NormalizeProviderKey(providerKey)).ConfigureAwait(false); + return await SettingManagementStore.GetOrNullAsync(setting.Name, Name, NormalizeProviderKey(providerKey)); } public virtual async Task SetAsync(SettingDefinition setting, string value, string providerKey) { - await SettingManagementStore.SetAsync(setting.Name, value, Name, NormalizeProviderKey(providerKey)).ConfigureAwait(false); + await SettingManagementStore.SetAsync(setting.Name, value, Name, NormalizeProviderKey(providerKey)); } public virtual async Task ClearAsync(SettingDefinition setting, string providerKey) { - await SettingManagementStore.DeleteAsync(setting.Name, Name, NormalizeProviderKey(providerKey)).ConfigureAwait(false); + await SettingManagementStore.DeleteAsync(setting.Name, Name, NormalizeProviderKey(providerKey)); } protected virtual string NormalizeProviderKey(string providerKey) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs index 622ea4a705..8c9cfc8684 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs @@ -26,58 +26,58 @@ namespace Volo.Abp.SettingManagement public async Task GetOrNullAsync(string name, string providerName, string providerKey) { - var cacheItem = await GetCacheItemAsync(name, providerName, providerKey).ConfigureAwait(false); + var cacheItem = await GetCacheItemAsync(name, providerName, providerKey); return cacheItem.Value; } public async Task SetAsync(string name, string value, string providerName, string providerKey) { - var setting = await SettingRepository.FindAsync(name, providerName, providerKey).ConfigureAwait(false); + var setting = await SettingRepository.FindAsync(name, providerName, providerKey); if (setting == null) { setting = new Setting(GuidGenerator.Create(), name, value, providerName, providerKey); - await SettingRepository.InsertAsync(setting).ConfigureAwait(false); + await SettingRepository.InsertAsync(setting); } else { setting.Value = value; - await SettingRepository.UpdateAsync(setting).ConfigureAwait(false); + await SettingRepository.UpdateAsync(setting); } } public async Task> GetListAsync(string providerName, string providerKey) { - var settings = await SettingRepository.GetListAsync(providerName, providerKey).ConfigureAwait(false); + var settings = await SettingRepository.GetListAsync(providerName, providerKey); return settings.Select(s => new SettingValue(s.Name, s.Value)).ToList(); } public async Task DeleteAsync(string name, string providerName, string providerKey) { - var setting = await SettingRepository.FindAsync(name, providerName, providerKey).ConfigureAwait(false); + var setting = await SettingRepository.FindAsync(name, providerName, providerKey); if (setting != null) { - await SettingRepository.DeleteAsync(setting).ConfigureAwait(false); + await SettingRepository.DeleteAsync(setting); } } protected virtual async Task GetCacheItemAsync(string name, string providerName, string providerKey) { var cacheKey = CalculateCacheKey(name, providerName, providerKey); - var cacheItem = await Cache.GetAsync(cacheKey).ConfigureAwait(false); + var cacheItem = await Cache.GetAsync(cacheKey); if (cacheItem != null) { return cacheItem; } - var setting = await SettingRepository.FindAsync(name, providerName, providerKey).ConfigureAwait(false); + var setting = await SettingRepository.FindAsync(name, providerName, providerKey); cacheItem = new SettingCacheItem(setting?.Value); await Cache.SetAsync( cacheKey, cacheItem - ).ConfigureAwait(false); + ); return cacheItem; } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManager.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManager.cs index e5cdcb4466..cfb4cccbe3 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManager.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManager.cs @@ -79,7 +79,7 @@ namespace Volo.Abp.SettingManagement var providerValue = await provider.GetOrNullAsync( setting, provider.Name == providerName ? providerKey : null - ).ConfigureAwait(false); + ); if (providerValue != null) { value = providerValue; @@ -91,7 +91,7 @@ namespace Volo.Abp.SettingManagement value = await providerList[0].GetOrNullAsync( setting, providerKey - ).ConfigureAwait(false); + ); } if (setting.IsEncrypted) @@ -132,7 +132,7 @@ namespace Volo.Abp.SettingManagement if (providers.Count > 1 && !forceToSet && setting.IsInherited && value != null) { - var fallbackValue = await GetOrNullInternalAsync(name, providers[1].Name, null).ConfigureAwait(false); + var fallbackValue = await GetOrNullInternalAsync(name, providers[1].Name, null); if (fallbackValue == value) { //Clear the value if it's same as it's fallback value @@ -148,14 +148,14 @@ namespace Volo.Abp.SettingManagement { foreach (var provider in providers) { - await provider.ClearAsync(setting, providerKey).ConfigureAwait(false); + await provider.ClearAsync(setting, providerKey); } } else { foreach (var provider in providers) { - await provider.SetAsync(setting, value, providerKey).ConfigureAwait(false); + await provider.SetAsync(setting, value, providerKey); } } } @@ -182,7 +182,7 @@ namespace Volo.Abp.SettingManagement value = await provider.GetOrNullAsync( setting, provider.Name == providerName ? providerKey : null - ).ConfigureAwait(false); + ); if (value != null) { diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/FodyWeavers.xml b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/FodyWeavers.xsd b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj index f5e1761cc5..8f389e8391 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.SettingManagement.EntityFrameworkCore Volo.Abp.SettingManagement.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs index bd848ce076..86b31036d1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore return await DbSet .FirstOrDefaultAsync( s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey - ).ConfigureAwait(false); + ); } public async Task> GetListAsync(string providerName, string providerKey) @@ -28,7 +28,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore return await DbSet .Where( s => s.ProviderName == providerName && s.ProviderKey == providerKey - ).ToListAsync().ConfigureAwait(false); + ).ToListAsync(); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/FodyWeavers.xml b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/FodyWeavers.xsd b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj index 8f068d1f12..84c98c6981 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs index e08c099eaa..56516dcbd0 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs @@ -18,12 +18,12 @@ namespace Volo.Abp.SettingManagement.MongoDB public async Task FindAsync(string name, string providerName, string providerKey) { - return await GetMongoQueryable().FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey).ConfigureAwait(false); + return await GetMongoQueryable().FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey); } public async Task> GetListAsync(string providerName, string providerKey) { - return await GetMongoQueryable().Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey).ToListAsync().ConfigureAwait(false); + return await GetMongoQueryable().Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey).ToListAsync(); } } } \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/FodyWeavers.xml b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/FodyWeavers.xsd b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs index 1dc8030bd8..8aee74c56c 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.SettingManagement.Web.Navigation var settingPageCreationContext = new SettingPageCreationContext(context.ServiceProvider); if ( !settingManagementPageOptions.Contributors.Any() || - !(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext).ConfigureAwait(false)) + !(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext)) ) { return; @@ -49,7 +49,7 @@ namespace Volo.Abp.SettingManagement.Web.Navigation { foreach (var contributor in settingManagementPageOptions.Contributors) { - if (await contributor.CheckPermissionsAsync(settingPageCreationContext).ConfigureAwait(false)) + if (await contributor.CheckPermissionsAsync(settingPageCreationContext)) { return true; } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml.cs index 401d845039..1fdba05707 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement foreach (var contributor in _options.Contributors) { - await contributor.ConfigureAsync(SettingPageCreationContext).ConfigureAwait(false); + await contributor.ConfigureAsync(SettingPageCreationContext); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj index 854fedf853..cbf526e751 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj index 1a04328983..5cfcd5f3ff 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj index 791758698d..2e2ab114e4 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj index 75f44e1ca3..d6511ec8cf 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs index 6d8be6fe8a..5dad99a0ca 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs @@ -26,25 +26,25 @@ namespace Volo.Abp.SettingManagement "MySetting1", GlobalSettingValueProvider.ProviderName, null - ).ConfigureAwait(false)).Value.ShouldBe("42"); + )).Value.ShouldBe("42"); (await SettingRepository.FindAsync( "MySetting2", UserSettingValueProvider.ProviderName, TestData.User1Id.ToString() - ).ConfigureAwait(false)).Value.ShouldBe("user1-store-value"); + )).Value.ShouldBe("user1-store-value"); (await SettingRepository.FindAsync( "Undefined-Setting", GlobalSettingValueProvider.ProviderName, null - ).ConfigureAwait(false)).ShouldBeNull(); + )).ShouldBeNull(); } [Fact] public async Task GetListAsync() { - var settings = await SettingRepository.GetListAsync(GlobalSettingValueProvider.ProviderName, null).ConfigureAwait(false); + var settings = await SettingRepository.GetListAsync(GlobalSettingValueProvider.ProviderName, null); settings.Any().ShouldBeTrue(); settings.ShouldContain(s => s.Name == "MySetting1" && s.Value == "42"); settings.ShouldContain(s => s.Name == "MySetting2" && s.Value == "default-store-value"); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs index d89111bd82..a4a0b32a03 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.SettingManagement "42", GlobalSettingValueProvider.ProviderName ) - ).ConfigureAwait(false); + ); await _settingRepository.InsertAsync( new Setting( @@ -39,7 +39,7 @@ namespace Volo.Abp.SettingManagement "default-store-value", GlobalSettingValueProvider.ProviderName ) - ).ConfigureAwait(false); + ); await _settingRepository.InsertAsync( new Setting( @@ -49,7 +49,7 @@ namespace Volo.Abp.SettingManagement UserSettingValueProvider.ProviderName, _testData.User1Id.ToString() ) - ).ConfigureAwait(false); + ); await _settingRepository.InsertAsync( new Setting( @@ -59,7 +59,7 @@ namespace Volo.Abp.SettingManagement UserSettingValueProvider.ProviderName, _testData.User2Id.ToString() ) - ).ConfigureAwait(false); + ); await _settingRepository.InsertAsync( new Setting( @@ -68,7 +68,7 @@ namespace Volo.Abp.SettingManagement "default-store-value", GlobalSettingValueProvider.ProviderName ) - ).ConfigureAwait(false); + ); await _settingRepository.InsertAsync( new Setting( @@ -78,7 +78,7 @@ namespace Volo.Abp.SettingManagement UserSettingValueProvider.ProviderName, _testData.User1Id.ToString() ) - ).ConfigureAwait(false); + ); } } } \ No newline at end of file diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj index 7f99e1ae2c..ea519cf662 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/DefaultValueSettingManagementProvider_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/DefaultValueSettingManagementProvider_Tests.cs index 216ebf6283..20263a73c9 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/DefaultValueSettingManagementProvider_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/DefaultValueSettingManagementProvider_Tests.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.SettingManagement var defaultValueSettingManagementProvider = new DefaultValueSettingManagementProvider(); (await defaultValueSettingManagementProvider - .GetOrNullAsync(mySetting3, DefaultValueSettingValueProvider.ProviderName).ConfigureAwait(false)).ShouldBe("123"); + .GetOrNullAsync(mySetting3, DefaultValueSettingValueProvider.ProviderName)).ShouldBe("123"); } [Fact] @@ -30,7 +30,7 @@ namespace Volo.Abp.SettingManagement var mySetting3 = _settingDefinitionManager.Get("MySetting3"); await Assert.ThrowsAsync(async () => await new DefaultValueSettingManagementProvider().SetAsync(mySetting3, "123", - DefaultValueSettingValueProvider.ProviderName).ConfigureAwait(false)).ConfigureAwait(false); + DefaultValueSettingValueProvider.ProviderName)); } [Fact] @@ -40,7 +40,7 @@ namespace Volo.Abp.SettingManagement await Assert.ThrowsAsync(async () => await new DefaultValueSettingManagementProvider().ClearAsync(mySetting3, - DefaultValueSettingValueProvider.ProviderName).ConfigureAwait(false)).ConfigureAwait(false); + DefaultValueSettingValueProvider.ProviderName)); } } } diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs index cf2c610b79..4a501f58e8 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs @@ -29,9 +29,9 @@ namespace Volo.Abp.SettingManagement public async Task GetOrNullAsync_Should_Cached() { // Act - (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString())).ConfigureAwait(false)).ShouldBeNull(); - await _settingManagementStore.GetOrNullAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()).ConfigureAwait(false); - (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString())).ConfigureAwait(false)).ShouldNotBeNull(); + (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()))).ShouldBeNull(); + await _settingManagementStore.GetOrNullAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()); + (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()))).ShouldNotBeNull(); } [Fact] @@ -39,15 +39,15 @@ namespace Volo.Abp.SettingManagement { // Arrange // GetOrNullAsync will cache language. - await _settingManagementStore.GetOrNullAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()).ConfigureAwait(false); + await _settingManagementStore.GetOrNullAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()); // Act - var lang = await _settingRepository.FindAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()).ConfigureAwait(false); - await _settingRepository.DeleteAsync(lang).ConfigureAwait(false); + var lang = await _settingRepository.FindAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()); + await _settingRepository.DeleteAsync(lang); // Assert (await _cache.GetAsync( - SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString())).ConfigureAwait(false)).ShouldBeNull(); + SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()))).ShouldBeNull(); } [Fact] @@ -60,15 +60,14 @@ namespace Volo.Abp.SettingManagement // GetOrNullAsync will cache language. await _settingManagementStore .GetOrNullAsync("MySetting2", GlobalSettingValueProvider.ProviderName, null) - .ConfigureAwait(false); + ; } using (_currentTenant.Change(null)) { // SetAsync will make cache invalid. await _settingManagementStore - .SetAsync("MySetting2", "MySetting2Value", GlobalSettingValueProvider.ProviderName, null) - .ConfigureAwait(false); + .SetAsync("MySetting2", "MySetting2Value", GlobalSettingValueProvider.ProviderName, null); } using (_currentTenant.Change(tenantId)) @@ -76,7 +75,7 @@ namespace Volo.Abp.SettingManagement // Assert (await _cache.GetAsync( SettingCacheItem.CalculateCacheKey("MySetting2", GlobalSettingValueProvider.ProviderName, null)) - .ConfigureAwait(false)).ShouldBeNull(); + ).ShouldBeNull(); } } } diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManagementStore_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManagementStore_Tests.cs index 99ca9e70da..753ba15054 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManagementStore_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManagementStore_Tests.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.SettingManagement public async Task GetOrNull_NotExist_Should_Be_Null() { var value = await _settingManagementStore.GetOrNullAsync("notExistName", "notExistProviderName", - "notExistProviderKey").ConfigureAwait(false); + "notExistProviderKey"); value.ShouldBeNull(); } @@ -33,7 +33,7 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task GetOrNullAsync() { - var value = await _settingManagementStore.GetOrNullAsync("MySetting1", GlobalSettingValueProvider.ProviderName, null).ConfigureAwait(false); + var value = await _settingManagementStore.GetOrNullAsync("MySetting1", GlobalSettingValueProvider.ProviderName, null); value.ShouldNotBeNull(); value.ShouldBe("42"); @@ -42,22 +42,22 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task SetAsync() { - var setting = await _settingRepository.FindAsync(_testData.SettingId).ConfigureAwait(false); + var setting = await _settingRepository.FindAsync(_testData.SettingId); setting.Value.ShouldBe("42"); - await _settingManagementStore.SetAsync("MySetting1", "43", GlobalSettingValueProvider.ProviderName, null).ConfigureAwait(false); + await _settingManagementStore.SetAsync("MySetting1", "43", GlobalSettingValueProvider.ProviderName, null); - (await _settingRepository.FindAsync(_testData.SettingId).ConfigureAwait(false)).Value.ShouldBe("43"); + (await _settingRepository.FindAsync(_testData.SettingId)).Value.ShouldBe("43"); } [Fact] public async Task DeleteAsync() { - (await _settingRepository.FindAsync(_testData.SettingId).ConfigureAwait(false)).ShouldNotBeNull(); + (await _settingRepository.FindAsync(_testData.SettingId)).ShouldNotBeNull(); - await _settingManagementStore.DeleteAsync("MySetting1", GlobalSettingValueProvider.ProviderName, null).ConfigureAwait(false); + await _settingManagementStore.DeleteAsync("MySetting1", GlobalSettingValueProvider.ProviderName, null); - (await _settingRepository.FindAsync(_testData.SettingId).ConfigureAwait(false)).ShouldBeNull(); + (await _settingRepository.FindAsync(_testData.SettingId)).ShouldBeNull(); } } diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_Basic_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_Basic_Tests.cs index b9efa5640f..1dafc31570 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_Basic_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_Basic_Tests.cs @@ -21,26 +21,26 @@ namespace Volo.Abp.SettingManagement { await Assert.ThrowsAsync( async () => await _settingProvider.GetOrNullAsync("UndefinedSetting") -.ConfigureAwait(false)).ConfigureAwait(false); + ); } [Fact] public async Task Should_Get_Default_Value_If_Not_Set_In_Store() { - var value = await _settingProvider.GetOrNullAsync("SettingNotSetInStore").ConfigureAwait(false); + var value = await _settingProvider.GetOrNullAsync("SettingNotSetInStore"); value.ShouldBe("default-value"); } [Fact] public async Task Should_Get_Base_Store_Value() { - (await _settingProvider.GetOrNullAsync("MySetting1").ConfigureAwait(false)).ShouldBe("42"); + (await _settingProvider.GetOrNullAsync("MySetting1")).ShouldBe("42"); } [Fact] public async Task Should_Get_All_Base_Store_Values() { - var settingValues = await _settingProvider.GetAllAsync().ConfigureAwait(false); + var settingValues = await _settingProvider.GetAllAsync(); settingValues.ShouldContain(sv => sv.Name == "MySetting1" && sv.Value == "42"); settingValues.ShouldContain(sv => sv.Name == "MySetting2" && sv.Value == "default-store-value"); settingValues.ShouldContain(sv => sv.Name == "SettingNotSetInStore" && sv.Value == "default-value"); @@ -49,10 +49,10 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task Should_Set_Global_Value() { - await _settingManager.SetGlobalAsync("MySetting1", "43").ConfigureAwait(false); + await _settingManager.SetGlobalAsync("MySetting1", "43"); - (await _settingManager.GetOrNullGlobalAsync("MySetting1").ConfigureAwait(false)).ShouldBe("43"); - (await _settingProvider.GetOrNullAsync("MySetting1").ConfigureAwait(false)).ShouldBe("43"); + (await _settingManager.GetOrNullGlobalAsync("MySetting1")).ShouldBe("43"); + (await _settingProvider.GetOrNullAsync("MySetting1")).ShouldBe("43"); } } } diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_User_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_User_Tests.cs index d49ca823f1..4b42572f0a 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_User_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingManager_User_Tests.cs @@ -35,67 +35,67 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task Should_Get_From_Store_For_Given_User() { - (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id).ConfigureAwait(false)).ShouldBe("user1-store-value"); - (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User2Id).ConfigureAwait(false)).ShouldBe("user2-store-value"); + (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id)).ShouldBe("user1-store-value"); + (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User2Id)).ShouldBe("user2-store-value"); } [Fact] public async Task Should_Fallback_To_Default_Store_Value_When_No_Value_For_Given_User() { - (await _settingManager.GetOrNullForUserAsync("MySetting2", Guid.NewGuid()).ConfigureAwait(false)).ShouldBe("default-store-value"); + (await _settingManager.GetOrNullForUserAsync("MySetting2", Guid.NewGuid())).ShouldBe("default-store-value"); } [Fact] public async Task Should_Not_Fallback_To_Default_Store_Value_When_No_Value_For_Given_User_But_Specified_Fallback_As_False() { - (await _settingManager.GetOrNullForUserAsync("MySetting2", Guid.NewGuid(), fallback: false).ConfigureAwait(false)).ShouldBeNull(); + (await _settingManager.GetOrNullForUserAsync("MySetting2", Guid.NewGuid(), fallback: false)).ShouldBeNull(); } [Fact] public async Task Should_Get_From_Store_For_Current_User() { _currentUserId = _testData.User1Id; - (await _settingProvider.GetOrNullAsync("MySetting2").ConfigureAwait(false)).ShouldBe("user1-store-value"); + (await _settingProvider.GetOrNullAsync("MySetting2")).ShouldBe("user1-store-value"); _currentUserId = _testData.User2Id; - (await _settingProvider.GetOrNullAsync("MySetting2").ConfigureAwait(false)).ShouldBe("user2-store-value"); + (await _settingProvider.GetOrNullAsync("MySetting2")).ShouldBe("user2-store-value"); } [Fact] public async Task Should_Fallback_To_Default_Store_Value_When_No_Value_For_Current_User() { _currentUserId = Guid.NewGuid(); - (await _settingProvider.GetOrNullAsync("MySetting2").ConfigureAwait(false)).ShouldBe("default-store-value"); + (await _settingProvider.GetOrNullAsync("MySetting2")).ShouldBe("default-store-value"); } [Fact] public async Task Should_Get_From_Store_For_Current_User_With_GetOrNullForCurrentUserAsync() { _currentUserId = _testData.User1Id; - (await _settingManager.GetOrNullForCurrentUserAsync("MySetting2").ConfigureAwait(false)).ShouldBe("user1-store-value"); + (await _settingManager.GetOrNullForCurrentUserAsync("MySetting2")).ShouldBe("user1-store-value"); _currentUserId = _testData.User2Id; - (await _settingManager.GetOrNullForCurrentUserAsync("MySetting2").ConfigureAwait(false)).ShouldBe("user2-store-value"); + (await _settingManager.GetOrNullForCurrentUserAsync("MySetting2")).ShouldBe("user2-store-value"); } [Fact] public async Task Should_Fallback_To_Default_Store_Value_When_No_Value_For_Current_User_With_GetOrNullForCurrentUserAsync() { _currentUserId = Guid.NewGuid(); - (await _settingProvider.GetOrNullAsync("MySetting2").ConfigureAwait(false)).ShouldBe("default-store-value"); + (await _settingProvider.GetOrNullAsync("MySetting2")).ShouldBe("default-store-value"); } [Fact] public async Task Should_Not_Fallback_To_Default_Store_Value_When_No_Value_For_Current_User_But_Specified_Fallback_As_False() { _currentUserId = Guid.NewGuid(); - (await _settingManager.GetOrNullForCurrentUserAsync("MySetting2", fallback: false).ConfigureAwait(false)).ShouldBeNull(); + (await _settingManager.GetOrNullForCurrentUserAsync("MySetting2", fallback: false)).ShouldBeNull(); } [Fact] public async Task Should_Get_All_From_Store_For_Given_User() { - var settingValues = await _settingManager.GetAllForUserAsync(_testData.User1Id).ConfigureAwait(false); + var settingValues = await _settingManager.GetAllForUserAsync(_testData.User1Id); settingValues.ShouldContain(sv => sv.Name == "MySetting1" && sv.Value == "42"); settingValues.ShouldContain(sv => sv.Name == "MySetting2" && sv.Value == "user1-store-value"); settingValues.ShouldContain(sv => sv.Name == "SettingNotSetInStore" && sv.Value == "default-value"); @@ -104,7 +104,7 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task Should_Get_All_From_Store_For_Given_User_Without_Fallback() { - var settingValues = await _settingManager.GetAllForUserAsync(_testData.User1Id, fallback: false).ConfigureAwait(false); + var settingValues = await _settingManager.GetAllForUserAsync(_testData.User1Id, fallback: false); settingValues.ShouldContain(sv => sv.Name == "MySetting2" && sv.Value == "user1-store-value"); settingValues.ShouldContain(sv => sv.Name == "MySettingWithoutInherit" && sv.Value == "user1-store-value"); settingValues.ShouldNotContain(sv => sv.Name == "MySetting1"); @@ -113,7 +113,7 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task Should_Delete_Setting_Record_When_Set_To_Null() { - await _settingManager.SetForUserAsync(_testData.User1Id, "MySetting2", null).ConfigureAwait(false); + await _settingManager.SetForUserAsync(_testData.User1Id, "MySetting2", null); GetSettingsFromDbContext( UserSettingValueProvider.ProviderName, @@ -125,12 +125,12 @@ namespace Volo.Abp.SettingManagement [Fact] public async Task Should_Change_User_Setting() { - (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id).ConfigureAwait(false)) + (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id)) .ShouldBe("user1-store-value"); - await _settingManager.SetForUserAsync(_testData.User1Id, "MySetting2", "user1-new-store-value").ConfigureAwait(false); + await _settingManager.SetForUserAsync(_testData.User1Id, "MySetting2", "user1-new-store-value"); - (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id).ConfigureAwait(false)) + (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id)) .ShouldBe("user1-new-store-value"); GetSettingsFromDbContext( @@ -147,7 +147,7 @@ namespace Volo.Abp.SettingManagement _testData.User1Id, "MySetting2", "default-store-value" - ).ConfigureAwait(false); + ); GetSettingsFromDbContext( UserSettingValueProvider.ProviderName, @@ -155,7 +155,7 @@ namespace Volo.Abp.SettingManagement "MySetting2" ).Count.ShouldBe(0); - (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id).ConfigureAwait(false)) + (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id)) .ShouldBe("default-store-value"); } @@ -167,7 +167,7 @@ namespace Volo.Abp.SettingManagement "MySetting2", "default-store-value", forceToSet: true - ).ConfigureAwait(false); + ); GetSettingsFromDbContext( UserSettingValueProvider.ProviderName, @@ -175,16 +175,16 @@ namespace Volo.Abp.SettingManagement "MySetting2" ).Single().Value.ShouldBe("default-store-value"); - (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id).ConfigureAwait(false)) + (await _settingManager.GetOrNullForUserAsync("MySetting2", _testData.User1Id)) .ShouldBe("default-store-value"); } [Fact] public async Task Should_Get_For_Given_User_For_Non_Inherited_Setting() { - (await _settingManager.GetOrNullForUserAsync("MySettingWithoutInherit", _testData.User1Id).ConfigureAwait(false)).ShouldBe("user1-store-value"); - (await _settingManager.GetOrNullForUserAsync("MySettingWithoutInherit", _testData.User2Id).ConfigureAwait(false)).ShouldBeNull(); //Does not inherit! - (await _settingManager.GetOrNullGlobalAsync("MySettingWithoutInherit").ConfigureAwait(false)).ShouldBe("default-store-value"); + (await _settingManager.GetOrNullForUserAsync("MySettingWithoutInherit", _testData.User1Id)).ShouldBe("user1-store-value"); + (await _settingManager.GetOrNullForUserAsync("MySettingWithoutInherit", _testData.User2Id)).ShouldBeNull(); //Does not inherit! + (await _settingManager.GetOrNullGlobalAsync("MySettingWithoutInherit")).ShouldBe("default-store-value"); } } } \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj index 57f177df96..41620fcc1d 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo.Abp.TenantManagement.Application.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo.Abp.TenantManagement.Application.csproj index bd5926a785..2e8bff8d48 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo.Abp.TenantManagement.Application.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo.Abp.TenantManagement.Application.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/TenantAppService.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/TenantAppService.cs index 084c6c1920..3dabc569bd 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/TenantAppService.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/TenantAppService.cs @@ -27,13 +27,13 @@ namespace Volo.Abp.TenantManagement public virtual async Task GetAsync(Guid id) { return ObjectMapper.Map( - await TenantRepository.GetAsync(id).ConfigureAwait(false)); + await TenantRepository.GetAsync(id)); } public virtual async Task> GetListAsync(GetTenantsInput input) { - var count = await TenantRepository.GetCountAsync(input.Filter).ConfigureAwait(false); - var list = await TenantRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter).ConfigureAwait(false); + var count = await TenantRepository.GetCountAsync(input.Filter); + var list = await TenantRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter); return new PagedResultDto( count, @@ -44,15 +44,15 @@ namespace Volo.Abp.TenantManagement [Authorize(TenantManagementPermissions.Tenants.Create)] public virtual async Task CreateAsync(TenantCreateDto input) { - var tenant = await TenantManager.CreateAsync(input.Name).ConfigureAwait(false); - await TenantRepository.InsertAsync(tenant).ConfigureAwait(false); + var tenant = await TenantManager.CreateAsync(input.Name); + await TenantRepository.InsertAsync(tenant); using (CurrentTenant.Change(tenant.Id, tenant.Name)) { //TODO: Handle database creation? //TODO: Set admin email & password..? - await DataSeeder.SeedAsync(tenant.Id).ConfigureAwait(false); + await DataSeeder.SeedAsync(tenant.Id); } return ObjectMapper.Map(tenant); @@ -61,45 +61,45 @@ namespace Volo.Abp.TenantManagement [Authorize(TenantManagementPermissions.Tenants.Update)] public virtual async Task UpdateAsync(Guid id, TenantUpdateDto input) { - var tenant = await TenantRepository.GetAsync(id).ConfigureAwait(false); - await TenantManager.ChangeNameAsync(tenant, input.Name).ConfigureAwait(false); - await TenantRepository.UpdateAsync(tenant).ConfigureAwait(false); + var tenant = await TenantRepository.GetAsync(id); + await TenantManager.ChangeNameAsync(tenant, input.Name); + await TenantRepository.UpdateAsync(tenant); return ObjectMapper.Map(tenant); } [Authorize(TenantManagementPermissions.Tenants.Delete)] public virtual async Task DeleteAsync(Guid id) { - var tenant = await TenantRepository.FindAsync(id).ConfigureAwait(false); + var tenant = await TenantRepository.FindAsync(id); if (tenant == null) { return; } - await TenantRepository.DeleteAsync(tenant).ConfigureAwait(false); + await TenantRepository.DeleteAsync(tenant); } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] public virtual async Task GetDefaultConnectionStringAsync(Guid id) { - var tenant = await TenantRepository.GetAsync(id).ConfigureAwait(false); + var tenant = await TenantRepository.GetAsync(id); return tenant?.FindDefaultConnectionString(); } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] public virtual async Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString) { - var tenant = await TenantRepository.GetAsync(id).ConfigureAwait(false); + var tenant = await TenantRepository.GetAsync(id); tenant.SetDefaultConnectionString(defaultConnectionString); - await TenantRepository.UpdateAsync(tenant).ConfigureAwait(false); + await TenantRepository.UpdateAsync(tenant); } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] public virtual async Task DeleteDefaultConnectionStringAsync(Guid id) { - var tenant = await TenantRepository.GetAsync(id).ConfigureAwait(false); + var tenant = await TenantRepository.GetAsync(id); tenant.RemoveDefaultConnectionString(); - await TenantRepository.UpdateAsync(tenant).ConfigureAwait(false); + await TenantRepository.UpdateAsync(tenant); } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj index 5cdaa28369..925834d1f6 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hant.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hant.json new file mode 100644 index 0000000000..858d7d6f9b --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hant.json @@ -0,0 +1,20 @@ +{ + "culture": "zh-Hant", + "texts": { + "Menu:TenantManagement": "租戶管理", + "Tenants": "租戶", + "NewTenant": "新租戶", + "TenantName": "租戶名稱", + "DisplayName:TenantName": "租戶名稱", + "TenantDeletionConfirmationMessage": "租戶 '{0}' 將被刪除. 您確定嗎?", + "ConnectionStrings": "資料庫連線字串", + "DisplayName:DefaultConnectionString": "預設資料庫連線字串", + "DisplayName:UseSharedDatabase": "使用共用資料庫", + "Permission:TenantManagement": "租戶管理", + "Permission:Create": "新增", + "Permission:Edit": "編輯", + "Permission:Delete": "刪除", + "Permission:ManageConnectionStrings": "管理資料庫連線字串", + "Permission:ManageFeatures": "管理功能" + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj index 9f516e45fd..28541197c4 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantManager.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantManager.cs index fbc422c31a..79d7cf891e 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantManager.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantManager.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.TenantManagement { Check.NotNull(name, nameof(name)); - await ValidateNameAsync(name).ConfigureAwait(false); + await ValidateNameAsync(name); return new Tenant(GuidGenerator.Create(), name); } @@ -28,13 +28,13 @@ namespace Volo.Abp.TenantManagement Check.NotNull(tenant, nameof(tenant)); Check.NotNull(name, nameof(name)); - await ValidateNameAsync(name, tenant.Id).ConfigureAwait(false); + await ValidateNameAsync(name, tenant.Id); tenant.SetName(name); } protected virtual async Task ValidateNameAsync(string name, Guid? expectedId = null) { - var tenant = await _tenantRepository.FindByNameAsync(name).ConfigureAwait(false); + var tenant = await _tenantRepository.FindByNameAsync(name); if (tenant != null && tenant.Id != expectedId) { throw new UserFriendlyException("Duplicate tenancy name: " + name); //TODO: A domain exception would be better..? diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs index 234f23959a..afa9af0cf2 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.TenantManagement { using (_currentTenant.Change(null)) //TODO: No need this if we can implement to define host side (or tenant-independent) entities! { - var tenant = await _tenantRepository.FindByNameAsync(name).ConfigureAwait(false); + var tenant = await _tenantRepository.FindByNameAsync(name); if (tenant == null) { return null; @@ -42,7 +42,7 @@ namespace Volo.Abp.TenantManagement { using (_currentTenant.Change(null)) //TODO: No need this if we can implement to define host side (or tenant-independent) entities! { - var tenant = await _tenantRepository.FindAsync(id).ConfigureAwait(false); + var tenant = await _tenantRepository.FindAsync(id); if (tenant == null) { return null; diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj index 259f5e7a73..26ecad10b5 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.TenantManagement.EntityFrameworkCore Volo.Abp.TenantManagement.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs index a6deb69f4c..e211f81abf 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore { return await DbSet .IncludeDetails(includeDetails) - .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken)); } public Tenant FindByName(string name, bool includeDetails = true) @@ -59,7 +59,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore ) .OrderBy(sorting ?? nameof(Tenant.Name)) .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj index cb8c188e9b..9c36b1b29e 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj index a26db3823b..082be51571 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj index aa7c7f9340..870d87b6c4 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs index 21e5ab9b1d..1d57652833 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.TenantManagement.MongoDB CancellationToken cancellationToken = default) { return await GetMongoQueryable() - .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken)); } public Tenant FindByName(string name, bool includeDetails = true) @@ -57,7 +57,7 @@ namespace Volo.Abp.TenantManagement.MongoDB .OrderBy(sorting ?? nameof(Tenant.Name)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/AbpTenantManagementWebMainMenuContributor.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/AbpTenantManagementWebMainMenuContributor.cs index 2ca66c1485..b7ef9f277e 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/AbpTenantManagementWebMainMenuContributor.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/AbpTenantManagementWebMainMenuContributor.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.TenantManagement.Web.Navigation var tenantManagementMenuItem = new ApplicationMenuItem(TenantManagementMenuNames.GroupName, l["Menu:TenantManagement"], icon: "fa fa-users"); administrationMenu.AddItem(tenantManagementMenuItem); - if (await authorizationService.IsGrantedAsync(TenantManagementPermissions.Tenants.Default).ConfigureAwait(false)) + if (await authorizationService.IsGrantedAsync(TenantManagementPermissions.Tenants.Default)) { tenantManagementMenuItem.AddItem(new ApplicationMenuItem(TenantManagementMenuNames.Tenants, l["Tenants"], url: "/TenantManagement/Tenants")); } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs index 7814d7c018..481cc6b7ca 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants public async Task OnGetAsync(Guid id) { - var defaultConnectionString = await _tenantAppService.GetDefaultConnectionStringAsync(id).ConfigureAwait(false); + var defaultConnectionString = await _tenantAppService.GetDefaultConnectionStringAsync(id); Tenant = new TenantInfoModel { Id = id, @@ -35,11 +35,11 @@ namespace Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants if (Tenant.UseSharedDatabase || Tenant.DefaultConnectionString.IsNullOrWhiteSpace()) { - await _tenantAppService.DeleteDefaultConnectionStringAsync(Tenant.Id).ConfigureAwait(false); + await _tenantAppService.DeleteDefaultConnectionStringAsync(Tenant.Id); } else { - await _tenantAppService.UpdateDefaultConnectionStringAsync(Tenant.Id, Tenant.DefaultConnectionString).ConfigureAwait(false); + await _tenantAppService.UpdateDefaultConnectionStringAsync(Tenant.Id, Tenant.DefaultConnectionString); } return NoContent(); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml.cs index 1ac1e7b97d..a602b12a65 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants ValidateModel(); var input = ObjectMapper.Map(Tenant); - await _tenantAppService.CreateAsync(input).ConfigureAwait(false); + await _tenantAppService.CreateAsync(input); return NoContent(); } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml.cs index f3bdb8f95f..58516e8ff7 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants { Tenant = ObjectMapper.Map( await _tenantAppService.GetAsync(id) -.ConfigureAwait(false)); + ); } public async Task OnPostAsync() @@ -30,7 +30,7 @@ namespace Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants ValidateModel(); var input = ObjectMapper.Map(Tenant); - await _tenantAppService.UpdateAsync(Tenant.Id, input).ConfigureAwait(false); + await _tenantAppService.UpdateAsync(Tenant.Id, input); return NoContent(); } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js index 3ae75e6ad6..0dc1861790 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js @@ -19,6 +19,7 @@ order: [[1, "asc"]], processing: true, paging: true, + scrollX: true, serverSide: true, ajax: abp.libs.datatables.createAjax(_tenantAppService.getList), columnDefs: [ diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj index 93fa5b3817..56e6d3cae7 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj index 65498d6f38..77b220f937 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs index 99318e52e4..3e44e7c8ea 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs @@ -20,14 +20,14 @@ namespace Volo.Abp.TenantManagement public async Task GetAsync() { var tenantInDb = UsingDbContext(dbContext => dbContext.Tenants.First()); - var tenant = await _tenantAppService.GetAsync(tenantInDb.Id).ConfigureAwait(false); + var tenant = await _tenantAppService.GetAsync(tenantInDb.Id); tenant.Name.ShouldBe(tenantInDb.Name); } [Fact] public async Task GetListAsync() { - var result = await _tenantAppService.GetListAsync(new GetTenantsInput()).ConfigureAwait(false); + var result = await _tenantAppService.GetListAsync(new GetTenantsInput()); result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldContain(t => t.Name == "acme"); result.Items.ShouldContain(t => t.Name == "volosoft"); @@ -36,7 +36,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task GetListAsync_Filtered() { - var result = await _tenantAppService.GetListAsync(new GetTenantsInput { Filter = "volo" }).ConfigureAwait(false); + var result = await _tenantAppService.GetListAsync(new GetTenantsInput { Filter = "volo" }); result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldNotContain(t => t.Name == "acme"); result.Items.ShouldContain(t => t.Name == "volosoft"); @@ -45,7 +45,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task GetListAsync_Sorted_Descending_By_Name() { - var result = await _tenantAppService.GetListAsync(new GetTenantsInput { Sorting = "Name DESC" }).ConfigureAwait(false); + var result = await _tenantAppService.GetListAsync(new GetTenantsInput { Sorting = "Name DESC" }); result.TotalCount.ShouldBeGreaterThan(0); var tenants = result.Items.ToList(); @@ -59,7 +59,7 @@ namespace Volo.Abp.TenantManagement public async Task CreateAsync() { var tenancyName = Guid.NewGuid().ToString("N").ToLowerInvariant(); - var tenant = await _tenantAppService.CreateAsync(new TenantCreateDto { Name = tenancyName }).ConfigureAwait(false); + var tenant = await _tenantAppService.CreateAsync(new TenantCreateDto { Name = tenancyName }); tenant.Name.ShouldBe(tenancyName); tenant.Id.ShouldNotBe(default(Guid)); } @@ -69,8 +69,8 @@ namespace Volo.Abp.TenantManagement { await Assert.ThrowsAsync(async () => { - await _tenantAppService.CreateAsync(new TenantCreateDto { Name = "acme" }).ConfigureAwait(false); - }).ConfigureAwait(false); + await _tenantAppService.CreateAsync(new TenantCreateDto { Name = "acme" }); + }); } [Fact] @@ -78,7 +78,7 @@ namespace Volo.Abp.TenantManagement { var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme")); - var result = await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "acme-renamed" }).ConfigureAwait(false); + var result = await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "acme-renamed" }); result.Id.ShouldBe(acme.Id); result.Name.ShouldBe("acme-renamed"); @@ -93,8 +93,8 @@ namespace Volo.Abp.TenantManagement await Assert.ThrowsAsync(async () => { - await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "volosoft" }).ConfigureAwait(false); - }).ConfigureAwait(false); + await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "volosoft" }); + }); } [Fact] @@ -102,7 +102,7 @@ namespace Volo.Abp.TenantManagement { var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme")); - await _tenantAppService.DeleteAsync(acme.Id).ConfigureAwait(false); + await _tenantAppService.DeleteAsync(acme.Id); UsingDbContext(dbContext => { diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj index 8dd16201cb..3d8b2073f6 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs index 0e5eba4136..8605047bbb 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs @@ -19,23 +19,23 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task CreateAsync() { - var tenant = await _tenantManager.CreateAsync("Test").ConfigureAwait(false); + var tenant = await _tenantManager.CreateAsync("Test"); tenant.Name.ShouldBe("Test"); } [Fact] public async Task Create_Tenant_Name_Can_Not_Duplicate() { - await Assert.ThrowsAsync(async () => await _tenantManager.CreateAsync("volosoft").ConfigureAwait(false)).ConfigureAwait(false); + await Assert.ThrowsAsync(async () => await _tenantManager.CreateAsync("volosoft")); } [Fact] public async Task ChangeNameAsync() { - var tenant = await _tenantRepository.FindByNameAsync("volosoft").ConfigureAwait(false); + var tenant = await _tenantRepository.FindByNameAsync("volosoft"); tenant.ShouldNotBeNull(); - await _tenantManager.ChangeNameAsync(tenant, "newVolosoft").ConfigureAwait(false); + await _tenantManager.ChangeNameAsync(tenant, "newVolosoft"); tenant.Name.ShouldBe("newVolosoft"); } @@ -43,10 +43,10 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task ChangeName_Tenant_Name_Can_Not_Duplicate() { - var tenant = await _tenantRepository.FindByNameAsync("acme").ConfigureAwait(false); + var tenant = await _tenantRepository.FindByNameAsync("acme"); tenant.ShouldNotBeNull(); - await Assert.ThrowsAsync(async () => await _tenantManager.ChangeNameAsync(tenant, "volosoft").ConfigureAwait(false)).ConfigureAwait(false); + await Assert.ThrowsAsync(async () => await _tenantManager.ChangeNameAsync(tenant, "volosoft")); } } } diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantStore_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantStore_Tests.cs index eb6f44068f..f199124bca 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantStore_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantStore_Tests.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task FindAsyncByName() { - var acme = await _tenantStore.FindAsync("acme").ConfigureAwait(false); + var acme = await _tenantStore.FindAsync("acme"); acme.ShouldNotBeNull(); acme.Name.ShouldBe("acme"); } @@ -27,10 +27,10 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task FindAsyncById() { - var acme = await _tenantRepository.FindByNameAsync("acme").ConfigureAwait(false); + var acme = await _tenantRepository.FindByNameAsync("acme"); acme.ShouldNotBeNull(); - (await _tenantStore.FindAsync(acme.Id).ConfigureAwait(false)).ShouldNotBeNull(); + (await _tenantStore.FindAsync(acme.Id)).ShouldNotBeNull(); } } } diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Tenant_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Tenant_Tests.cs index 6256007e57..5107d1a06d 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Tenant_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Tenant_Tests.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task FindDefaultConnectionString() { - var acme = await _tenantRepository.FindByNameAsync("acme").ConfigureAwait(false); + var acme = await _tenantRepository.FindByNameAsync("acme"); acme.ShouldNotBeNull(); acme.FindDefaultConnectionString().ShouldBe("DefaultConnString-Value"); @@ -25,7 +25,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task FindConnectionString() { - var acme = await _tenantRepository.FindByNameAsync("acme").ConfigureAwait(false); + var acme = await _tenantRepository.FindByNameAsync("acme"); acme.ShouldNotBeNull(); acme.FindConnectionString(Data.ConnectionStrings.DefaultConnectionStringName).ShouldBe("DefaultConnString-Value"); diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj index 528fd9e4e9..7786d493df 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj index 8cd0fbdae2..e7a10843ba 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj index 89b9c1aae2..765d7ef219 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/AbpTenantManagementTestDataBuilder.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/AbpTenantManagementTestDataBuilder.cs index 7127d902f5..45acc070d8 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/AbpTenantManagementTestDataBuilder.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/AbpTenantManagementTestDataBuilder.cs @@ -25,13 +25,13 @@ namespace Volo.Abp.TenantManagement private async Task AddTenantsAsync() { - var acme = await _tenantManager.CreateAsync("acme").ConfigureAwait(false); + var acme = await _tenantManager.CreateAsync("acme"); acme.ConnectionStrings.Add(new TenantConnectionString(acme.Id, ConnectionStrings.DefaultConnectionStringName, "DefaultConnString-Value")); acme.ConnectionStrings.Add(new TenantConnectionString(acme.Id, "MyConnString", "MyConnString-Value")); - await _tenantRepository.InsertAsync(acme).ConfigureAwait(false); + await _tenantRepository.InsertAsync(acme); - var volosoft = await _tenantManager.CreateAsync("volosoft").ConfigureAwait(false); - await _tenantRepository.InsertAsync(volosoft).ConfigureAwait(false); + var volosoft = await _tenantManager.CreateAsync("volosoft"); + await _tenantRepository.InsertAsync(volosoft); } } } \ No newline at end of file diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/LazyLoad_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/LazyLoad_Tests.cs index f055e8e9b5..4ece524e0f 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/LazyLoad_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/LazyLoad_Tests.cs @@ -22,11 +22,11 @@ namespace Volo.Abp.TenantManagement { using (var uow = GetRequiredService().Begin()) { - var role = await TenantRepository.FindByNameAsync("acme", includeDetails: false).ConfigureAwait(false); + var role = await TenantRepository.FindByNameAsync("acme", includeDetails: false); role.ConnectionStrings.ShouldNotBeNull(); role.ConnectionStrings.Any().ShouldBeTrue(); - await uow.CompleteAsync().ConfigureAwait(false); + await uow.CompleteAsync(); } } } diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/TenantRepository_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/TenantRepository_Tests.cs index 92ebf57353..06c75317fa 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/TenantRepository_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo/Abp/TenantManagement/TenantRepository_Tests.cs @@ -20,13 +20,13 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task FindByNameAsync() { - var tenant = await TenantRepository.FindByNameAsync("acme").ConfigureAwait(false); + var tenant = await TenantRepository.FindByNameAsync("acme"); tenant.ShouldNotBeNull(); - tenant = await TenantRepository.FindByNameAsync("undefined-tenant").ConfigureAwait(false); + tenant = await TenantRepository.FindByNameAsync("undefined-tenant"); tenant.ShouldBeNull(); - tenant = await TenantRepository.FindByNameAsync("acme", includeDetails: true).ConfigureAwait(false); + tenant = await TenantRepository.FindByNameAsync("acme", includeDetails: true); tenant.ShouldNotBeNull(); tenant.ConnectionStrings.Count.ShouldBeGreaterThanOrEqualTo(2); } @@ -34,15 +34,15 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task FindAsync() { - var tenantId = (await TenantRepository.FindByNameAsync("acme").ConfigureAwait(false)).Id; + var tenantId = (await TenantRepository.FindByNameAsync("acme")).Id; - var tenant = await TenantRepository.FindAsync(tenantId).ConfigureAwait(false); + var tenant = await TenantRepository.FindAsync(tenantId); tenant.ShouldNotBeNull(); - tenant = await TenantRepository.FindAsync(Guid.NewGuid()).ConfigureAwait(false); + tenant = await TenantRepository.FindAsync(Guid.NewGuid()); tenant.ShouldBeNull(); - tenant = await TenantRepository.FindAsync(tenantId, includeDetails: true).ConfigureAwait(false); + tenant = await TenantRepository.FindAsync(tenantId, includeDetails: true); tenant.ShouldNotBeNull(); tenant.ConnectionStrings.Count.ShouldBeGreaterThanOrEqualTo(2); } @@ -50,7 +50,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task GetListAsync() { - var tenants = await TenantRepository.GetListAsync().ConfigureAwait(false); + var tenants = await TenantRepository.GetListAsync(); tenants.ShouldContain(t => t.Name == "acme"); tenants.ShouldContain(t => t.Name == "volosoft"); } @@ -58,7 +58,7 @@ namespace Volo.Abp.TenantManagement [Fact] public async Task Should_Eager_Load_Tenant_Collections() { - var role = await TenantRepository.FindByNameAsync("acme").ConfigureAwait(false); + var role = await TenantRepository.FindByNameAsync("acme"); role.ConnectionStrings.ShouldNotBeNull(); role.ConnectionStrings.Any().ShouldBeTrue(); } diff --git a/modules/users/src/Volo.Abp.Users.Abstractions/FodyWeavers.xml b/modules/users/src/Volo.Abp.Users.Abstractions/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.Abstractions/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.Abstractions/FodyWeavers.xsd b/modules/users/src/Volo.Abp.Users.Abstractions/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.Abstractions/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.Abstractions/Volo.Abp.Users.Abstractions.csproj b/modules/users/src/Volo.Abp.Users.Abstractions/Volo.Abp.Users.Abstractions.csproj index 92d5a13bfc..43907cd41d 100644 --- a/modules/users/src/Volo.Abp.Users.Abstractions/Volo.Abp.Users.Abstractions.csproj +++ b/modules/users/src/Volo.Abp.Users.Abstractions/Volo.Abp.Users.Abstractions.csproj @@ -1,5 +1,6 @@ - + + diff --git a/modules/users/src/Volo.Abp.Users.Domain.Shared/FodyWeavers.xml b/modules/users/src/Volo.Abp.Users.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.Domain.Shared/FodyWeavers.xsd b/modules/users/src/Volo.Abp.Users.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.Domain.Shared/Volo.Abp.Users.Domain.Shared.csproj b/modules/users/src/Volo.Abp.Users.Domain.Shared/Volo.Abp.Users.Domain.Shared.csproj index 00423f67ae..30a5701451 100644 --- a/modules/users/src/Volo.Abp.Users.Domain.Shared/Volo.Abp.Users.Domain.Shared.csproj +++ b/modules/users/src/Volo.Abp.Users.Domain.Shared/Volo.Abp.Users.Domain.Shared.csproj @@ -1,5 +1,6 @@ + diff --git a/modules/users/src/Volo.Abp.Users.Domain/FodyWeavers.xml b/modules/users/src/Volo.Abp.Users.Domain/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.Domain/FodyWeavers.xsd b/modules/users/src/Volo.Abp.Users.Domain/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.Domain/Volo.Abp.Users.Domain.csproj b/modules/users/src/Volo.Abp.Users.Domain/Volo.Abp.Users.Domain.csproj index 8d39887121..fadbff5be4 100644 --- a/modules/users/src/Volo.Abp.Users.Domain/Volo.Abp.Users.Domain.csproj +++ b/modules/users/src/Volo.Abp.Users.Domain/Volo.Abp.Users.Domain.csproj @@ -1,5 +1,6 @@ + diff --git a/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupService.cs b/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupService.cs index a45bcec7ce..09979f00e1 100644 --- a/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupService.cs +++ b/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupService.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.Users public async Task FindByIdAsync(Guid id, CancellationToken cancellationToken = default) { - var localUser = await _userRepository.FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + var localUser = await _userRepository.FindAsync(id, cancellationToken: cancellationToken); if (ExternalUserLookupServiceProvider == null) { @@ -48,13 +48,13 @@ namespace Volo.Abp.Users try { - externalUser = await ExternalUserLookupServiceProvider.FindByIdAsync(id, cancellationToken).ConfigureAwait(false); + externalUser = await ExternalUserLookupServiceProvider.FindByIdAsync(id, cancellationToken); if (externalUser == null) { if (localUser != null) { //TODO: Instead of deleting, should be make it inactive or something like that? - await WithNewUowAsync(() => _userRepository.DeleteAsync(localUser, cancellationToken: cancellationToken)).ConfigureAwait(false); + await WithNewUowAsync(() => _userRepository.DeleteAsync(localUser, cancellationToken: cancellationToken)); } return null; @@ -68,25 +68,25 @@ namespace Volo.Abp.Users if (localUser == null) { - await WithNewUowAsync(() => _userRepository.InsertAsync(CreateUser(externalUser), cancellationToken: cancellationToken)).ConfigureAwait(false); - return await _userRepository.FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + await WithNewUowAsync(() => _userRepository.InsertAsync(CreateUser(externalUser), cancellationToken: cancellationToken)); + return await _userRepository.FindAsync(id, cancellationToken: cancellationToken); } if (localUser is IUpdateUserData && ((IUpdateUserData)localUser).Update(externalUser)) { - await WithNewUowAsync(() => _userRepository.UpdateAsync(localUser, cancellationToken: cancellationToken)).ConfigureAwait(false); + await WithNewUowAsync(() => _userRepository.UpdateAsync(localUser, cancellationToken: cancellationToken)); } else { return localUser; } - return await _userRepository.FindAsync(id, cancellationToken: cancellationToken).ConfigureAwait(false); + return await _userRepository.FindAsync(id, cancellationToken: cancellationToken); } public async Task FindByUserNameAsync(string userName, CancellationToken cancellationToken = default) { - var localUser = await _userRepository.FindByUserNameAsync(userName, cancellationToken).ConfigureAwait(false); + var localUser = await _userRepository.FindByUserNameAsync(userName, cancellationToken); if (ExternalUserLookupServiceProvider == null) { @@ -102,13 +102,13 @@ namespace Volo.Abp.Users try { - externalUser = await ExternalUserLookupServiceProvider.FindByUserNameAsync(userName, cancellationToken).ConfigureAwait(false); + externalUser = await ExternalUserLookupServiceProvider.FindByUserNameAsync(userName, cancellationToken); if (externalUser == null) { if (localUser != null) { //TODO: Instead of deleting, should be make it passive or something like that? - await WithNewUowAsync(() => _userRepository.DeleteAsync(localUser, cancellationToken: cancellationToken)).ConfigureAwait(false); + await WithNewUowAsync(() => _userRepository.DeleteAsync(localUser, cancellationToken: cancellationToken)); } return null; @@ -122,20 +122,20 @@ namespace Volo.Abp.Users if (localUser == null) { - await WithNewUowAsync(() => _userRepository.InsertAsync(CreateUser(externalUser), cancellationToken: cancellationToken)).ConfigureAwait(false); - return await _userRepository.FindAsync(externalUser.Id, cancellationToken: cancellationToken).ConfigureAwait(false); + await WithNewUowAsync(() => _userRepository.InsertAsync(CreateUser(externalUser), cancellationToken: cancellationToken)); + return await _userRepository.FindAsync(externalUser.Id, cancellationToken: cancellationToken); } if (localUser is IUpdateUserData && ((IUpdateUserData)localUser).Update(externalUser)) { - await WithNewUowAsync(() => _userRepository.UpdateAsync(localUser, cancellationToken: cancellationToken)).ConfigureAwait(false); + await WithNewUowAsync(() => _userRepository.UpdateAsync(localUser, cancellationToken: cancellationToken)); } else { return localUser; } - return await _userRepository.FindAsync(externalUser.Id, cancellationToken: cancellationToken).ConfigureAwait(false); + return await _userRepository.FindAsync(externalUser.Id, cancellationToken: cancellationToken); } protected abstract TUser CreateUser(IUserData externalUser); @@ -144,8 +144,8 @@ namespace Volo.Abp.Users { using (var uow = _unitOfWorkManager.Begin(requiresNew: true)) { - await func().ConfigureAwait(false); - await uow.SaveChangesAsync().ConfigureAwait(false); + await func(); + await uow.SaveChangesAsync(); } } } diff --git a/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupServiceExtensions.cs b/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupServiceExtensions.cs index a605db88bc..88781ea026 100644 --- a/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupServiceExtensions.cs +++ b/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupServiceExtensions.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.Users public static async Task GetByIdAsync(this IUserLookupService userLookupService, Guid id, CancellationToken cancellationToken = default) where TUser : class, IUser { - var user = await userLookupService.FindByIdAsync(id, cancellationToken).ConfigureAwait(false); + var user = await userLookupService.FindByIdAsync(id, cancellationToken); if (user == null) { throw new EntityNotFoundException(typeof(TUser), id); @@ -22,7 +22,7 @@ namespace Volo.Abp.Users public static async Task GetByUserNameAsync(this IUserLookupService userLookupService, string userName, CancellationToken cancellationToken = default) where TUser : class, IUser { - var user = await userLookupService.FindByUserNameAsync(userName, cancellationToken).ConfigureAwait(false); + var user = await userLookupService.FindByUserNameAsync(userName, cancellationToken); if (user == null) { throw new EntityNotFoundException(typeof(TUser), userName); diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/FodyWeavers.xml b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/FodyWeavers.xsd b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj index d70b92e1a4..666cc83f09 100644 --- a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj +++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj @@ -1,9 +1,10 @@ - + + - netstandard2.1 + netstandard2.0 Volo.Abp.Users.EntityFrameworkCore Volo.Abp.Users.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs index 6dbc5b7d0c..5d0958101c 100644 --- a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs +++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs @@ -21,12 +21,12 @@ namespace Volo.Abp.Users.EntityFrameworkCore public async Task FindByUserNameAsync(string userName, CancellationToken cancellationToken = default) { - return await this.FirstOrDefaultAsync(u => u.UserName == userName, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await this.FirstOrDefaultAsync(u => u.UserName == userName, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync(IEnumerable ids, CancellationToken cancellationToken = default) { - return await DbSet.Where(u => ids.Contains(u.Id)).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await DbSet.Where(u => ids.Contains(u.Id)).ToListAsync(GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.MongoDB/FodyWeavers.xml b/modules/users/src/Volo.Abp.Users.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.MongoDB/FodyWeavers.xsd b/modules/users/src/Volo.Abp.Users.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/users/src/Volo.Abp.Users.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/users/src/Volo.Abp.Users.MongoDB/Volo.Abp.Users.MongoDB.csproj b/modules/users/src/Volo.Abp.Users.MongoDB/Volo.Abp.Users.MongoDB.csproj index 205d39d7ae..4efc907924 100644 --- a/modules/users/src/Volo.Abp.Users.MongoDB/Volo.Abp.Users.MongoDB.csproj +++ b/modules/users/src/Volo.Abp.Users.MongoDB/Volo.Abp.Users.MongoDB.csproj @@ -1,5 +1,6 @@ + diff --git a/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs b/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs index a176db97b4..50d892d8dd 100644 --- a/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs +++ b/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs @@ -22,12 +22,12 @@ namespace Volo.Abp.Users.MongoDB public virtual async Task FindByUserNameAsync(string userName, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().FirstOrDefaultAsync(u => u.UserName == userName, GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().FirstOrDefaultAsync(u => u.UserName == userName, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync(IEnumerable ids, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(u => ids.Contains(u.Id)).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); + return await GetMongoQueryable().Where(u => ids.Contains(u.Id)).ToListAsync(GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj b/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj index 286cfbf85d..a63193fbff 100644 --- a/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj +++ b/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp2.2 diff --git a/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj b/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj index 5a5fdebd93..06b92ffd34 100644 --- a/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj +++ b/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp2.2 diff --git a/npm/get-version.js b/npm/get-version.js new file mode 100644 index 0000000000..7f3dd79e3b --- /dev/null +++ b/npm/get-version.js @@ -0,0 +1,3 @@ +const fse = require("fs-extra"); + +console.log(fse.readJSONSync("package.json").version); diff --git a/npm/lerna.json b/npm/lerna.json index 34b6ab898a..c482601db0 100644 --- a/npm/lerna.json +++ b/npm/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "packages": [ "packs/*" ], diff --git a/npm/ng-packs/apps/dev-app/src/app/shared/shared.module.ts b/npm/ng-packs/apps/dev-app/src/app/shared/shared.module.ts index 6bae4ea332..6c4c9b016c 100644 --- a/npm/ng-packs/apps/dev-app/src/app/shared/shared.module.ts +++ b/npm/ng-packs/apps/dev-app/src/app/shared/shared.module.ts @@ -4,11 +4,26 @@ import { NgModule } from '@angular/core'; import { ThemeBasicModule } from '@abp/ng.theme.basic'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { TableModule } from 'primeng/table'; +import { NgxValidateCoreModule } from '@ngx-validate/core'; @NgModule({ declarations: [], - imports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], - exports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], + imports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], + exports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], providers: [], }) export class SharedModule {} diff --git a/npm/ng-packs/lerna.version.json b/npm/ng-packs/lerna.version.json index a006bfaac7..db0d8368b9 100644 --- a/npm/ng-packs/lerna.version.json +++ b/npm/ng-packs/lerna.version.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "packages": [ "packages/*" ], diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 085cbc9d4f..c440aed399 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -21,19 +21,19 @@ "generate:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" }, "devDependencies": { - "@abp/ng.account": "^2.0.0", - "@abp/ng.account.config": "^2.0.0", - "@abp/ng.core": "^2.0.0", - "@abp/ng.feature-management": "^2.0.0", - "@abp/ng.identity": "^2.0.0", - "@abp/ng.identity.config": "^2.0.0", - "@abp/ng.permission-management": "^2.0.0", - "@abp/ng.setting-management": "^2.0.0", - "@abp/ng.setting-management.config": "^2.0.0", - "@abp/ng.tenant-management": "^2.0.0", - "@abp/ng.tenant-management.config": "^2.0.0", - "@abp/ng.theme.basic": "^2.0.0", - "@abp/ng.theme.shared": "^2.0.0", + "@abp/ng.account": "^2.0.1", + "@abp/ng.account.config": "^2.0.1", + "@abp/ng.core": "^2.0.1", + "@abp/ng.feature-management": "^2.0.1", + "@abp/ng.identity": "^2.0.1", + "@abp/ng.identity.config": "^2.0.1", + "@abp/ng.permission-management": "^2.0.1", + "@abp/ng.setting-management": "^2.0.1", + "@abp/ng.setting-management.config": "^2.0.1", + "@abp/ng.tenant-management": "^2.0.1", + "@abp/ng.tenant-management.config": "^2.0.1", + "@abp/ng.theme.basic": "^2.0.1", + "@abp/ng.theme.shared": "^2.0.1", "@angular-builders/jest": "^8.2.0", "@angular-devkit/build-angular": "~0.803.21", "@angular-devkit/build-ng-packagr": "~0.803.21", @@ -82,7 +82,7 @@ "protractor": "~5.4.0", "rxjs": "~6.4.0", "snq": "^1.0.3", - "symlink-manager": "^1.4.1", + "symlink-manager": "^1.4.2", "ts-node": "~7.0.0", "tsickle": "^0.37.0", "tslint": "~5.20.0", diff --git a/npm/ng-packs/packages/account-config/package.json b/npm/ng-packs/packages/account-config/package.json index 931ce1bdfe..430263c48f 100644 --- a/npm/ng-packs/packages/account-config/package.json +++ b/npm/ng-packs/packages/account-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.account.config", - "version": "2.0.0", + "version": "2.0.1", "homepage": "https://abp.io", "repository": { "type": "git", diff --git a/npm/ng-packs/packages/account/package.json b/npm/ng-packs/packages/account/package.json index fc78d14d38..c6478dab6e 100644 --- a/npm/ng-packs/packages/account/package.json +++ b/npm/ng-packs/packages/account/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.account", - "version": "2.0.0", + "version": "2.0.1", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.account.config": "^2.0.0", - "@abp/ng.theme.shared": "^2.0.0" + "@abp/ng.account.config": "^2.0.1", + "@abp/ng.theme.shared": "^2.0.1" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/account/src/lib/account.module.ts b/npm/ng-packs/packages/account/src/lib/account.module.ts index 3923ff4e17..93a496f8b5 100644 --- a/npm/ng-packs/packages/account/src/lib/account.module.ts +++ b/npm/ng-packs/packages/account/src/lib/account.module.ts @@ -3,7 +3,6 @@ import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { NgModule, Provider } from '@angular/core'; import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; import { NgxValidateCoreModule } from '@ngx-validate/core'; -import { TableModule } from 'primeng/table'; import { AccountRoutingModule } from './account-routing.module'; import { ChangePasswordComponent } from './components/change-password/change-password.component'; import { LoginComponent } from './components/login/login.component'; @@ -29,7 +28,6 @@ import { AuthWrapperComponent } from './components/auth-wrapper/auth-wrapper.com CoreModule, AccountRoutingModule, ThemeSharedModule, - TableModule, NgbDropdownModule, NgxValidateCoreModule, ], diff --git a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts index e9125de3c3..87169a2c1f 100644 --- a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts @@ -54,7 +54,9 @@ export class ChangePasswordComponent passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html index 04dd582ac7..20ddf69a06 100644 --- a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html +++ b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html @@ -3,7 +3,7 @@
    -
    + -
    +

    diff --git a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html index 5e7b292703..291d3f1cbd 100644 --- a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html +++ b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html @@ -27,7 +27,8 @@

    * + > *
    {{ 'AbpIdentity::Save' | abpLocalization }} diff --git a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts index a76de66626..6785fc67fd 100644 --- a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts @@ -71,7 +71,9 @@ export class RegisterComponent implements OnInit { passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/core/package.json b/npm/ng-packs/packages/core/package.json index ecf9c3f2ba..51dfa528d5 100644 --- a/npm/ng-packs/packages/core/package.json +++ b/npm/ng-packs/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.core", - "version": "2.0.0", + "version": "2.0.1", "homepage": "https://abp.io", "repository": { "type": "git", diff --git a/npm/ng-packs/packages/core/src/lib/actions/config.actions.ts b/npm/ng-packs/packages/core/src/lib/actions/config.actions.ts index 7e7f932e24..56d0874ebd 100644 --- a/npm/ng-packs/packages/core/src/lib/actions/config.actions.ts +++ b/npm/ng-packs/packages/core/src/lib/actions/config.actions.ts @@ -1,4 +1,4 @@ -import { ABP } from '../models'; +import { ABP } from '../models/common'; export class PatchRouteByName { static readonly type = '[Config] Patch Route By Name'; diff --git a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts index 0fc69f62ff..5ae13a4012 100644 --- a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts @@ -48,4 +48,18 @@ export class AuthService { take(1), ); } + + logout(): Observable { + return this.rest + .request({ + method: 'GET', + url: '/api/account/logout', + }) + .pipe( + switchMap(() => { + this.oAuthService.logOut(); + return this.store.dispatch(new GetAppConfiguration()); + }), + ); + } } diff --git a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts index d87d28a938..b12b517156 100644 --- a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts @@ -10,6 +10,9 @@ type ShouldReuseRoute = (future: ActivatedRouteSnapshot, curr: ActivatedRouteSna @Injectable({ providedIn: 'root' }) export class LocalizationService { + /** + * Returns currently selected language + */ get currentLang(): string { return this.store.selectSnapshot(state => state.SessionState.language); } @@ -42,6 +45,11 @@ export class LocalizationService { }); } + /** + * Returns an observable localized text with the given interpolation parameters in current language. + * @param key Localizaton key to replace with localized text + * @param interpolateParams Values to interpolate + */ get( key: string | Config.LocalizationWithDefault, ...interpolateParams: string[] @@ -49,6 +57,11 @@ export class LocalizationService { return this.store.select(ConfigState.getLocalization(key, ...interpolateParams)); } + /** + * Returns localized text with the given interpolation parameters in current language. + * @param key Localization key to replace with localized text + * @param interpolateParams Values to intepolate. + */ instant(key: string | Config.LocalizationWithDefault, ...interpolateParams: string[]): string { return this.store.selectSnapshot(ConfigState.getLocalization(key, ...interpolateParams)); } diff --git a/npm/ng-packs/packages/core/src/lib/states/config.state.ts b/npm/ng-packs/packages/core/src/lib/states/config.state.ts index 2232fd0419..debbc9b8a0 100644 --- a/npm/ng-packs/packages/core/src/lib/states/config.state.ts +++ b/npm/ng-packs/packages/core/src/lib/states/config.state.ts @@ -249,7 +249,7 @@ export class ConfigState { if (index < 0) return; const parent = flattedRoutes[index]; - if (parent.url.replace('/', '')) { + if ((parent.url || '').replace('/', '')) { route.url = `${parent.url}/${route.path}`; } else { route.url = `/${route.path}`; diff --git a/npm/ng-packs/packages/core/src/lib/utils/date-extensions.ts b/npm/ng-packs/packages/core/src/lib/utils/date-extensions.ts index 3522b000c8..8f0d17504d 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/date-extensions.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/date-extensions.ts @@ -2,7 +2,7 @@ export {}; declare global { interface Date { - toLocalISOString(): string; + toLocalISOString?: () => string; } } diff --git a/npm/ng-packs/packages/core/src/lib/utils/route-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/route-utils.ts index 8bbbee60ec..51abe4218b 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/route-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/route-utils.ts @@ -1,4 +1,4 @@ -import { ABP } from '../models'; +import { ABP } from '../models/common'; export function organizeRoutes( routes: ABP.FullRoute[], @@ -33,7 +33,10 @@ export function organizeRoutes( return filteredRoutes; } -export function setChildRoute(routes: ABP.FullRoute[], parentNameArr: ABP.FullRoute[]): ABP.FullRoute[] { +export function setChildRoute( + routes: ABP.FullRoute[], + parentNameArr: ABP.FullRoute[], +): ABP.FullRoute[] { return routes.map(route => { if (route.children && route.children.length) { route.children = setChildRoute(route.children, parentNameArr); diff --git a/npm/ng-packs/packages/feature-management/package.json b/npm/ng-packs/packages/feature-management/package.json index 511973074a..ddf32d71af 100644 --- a/npm/ng-packs/packages/feature-management/package.json +++ b/npm/ng-packs/packages/feature-management/package.json @@ -1,13 +1,13 @@ { "name": "@abp/ng.feature-management", - "version": "2.0.0", + "version": "2.0.1", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.theme.shared": "^2.0.0" + "@abp/ng.theme.shared": "^2.0.1" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/identity-config/package.json b/npm/ng-packs/packages/identity-config/package.json index 42916e4b08..385388e007 100644 --- a/npm/ng-packs/packages/identity-config/package.json +++ b/npm/ng-packs/packages/identity-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.identity.config", - "version": "2.0.0", + "version": "2.0.1", "homepage": "https://abp.io", "repository": { "type": "git", diff --git a/npm/ng-packs/packages/identity/package.json b/npm/ng-packs/packages/identity/package.json index d2a3c7559c..78890ce7e5 100644 --- a/npm/ng-packs/packages/identity/package.json +++ b/npm/ng-packs/packages/identity/package.json @@ -1,15 +1,15 @@ { "name": "@abp/ng.identity", - "version": "2.0.0", + "version": "2.0.1", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.identity.config": "^2.0.0", - "@abp/ng.permission-management": "^2.0.0", - "@abp/ng.theme.shared": "^2.0.0" + "@abp/ng.identity.config": "^2.0.1", + "@abp/ng.permission-management": "^2.0.1", + "@abp/ng.theme.shared": "^2.0.1" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html index 57858686fa..89cbd99789 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html +++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html @@ -23,6 +23,7 @@
    `, + encapsulation: ViewEncapsulation.None, styles: [ ` .abp-loading { - background: rgba(0, 0, 0, 0.2); position: absolute; width: 100%; height: 100%; @@ -23,6 +23,7 @@ import { Component, OnInit } from '@angular/core'; position: absolute; top: 50%; left: 50%; + font-size: 14px; -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.scss b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.scss index 023830ceeb..321bf9342d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.scss +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.scss @@ -4,7 +4,7 @@ } &-backdrop { - background-color: rgba(0, 0, 0, 0.6); + opacity: 0.8; } &::-webkit-scrollbar { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/directives/loading.directive.ts b/npm/ng-packs/packages/theme-shared/src/lib/directives/loading.directive.ts index d38b3713b7..40b76cbfc8 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/directives/loading.directive.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/directives/loading.directive.ts @@ -1,22 +1,23 @@ import { - Directive, - ElementRef, - AfterViewInit, - ViewContainerRef, ComponentFactoryResolver, - Input, - Injector, ComponentRef, - ComponentFactory, - HostBinding, + Directive, + ElementRef, EmbeddedViewRef, - Renderer2, + HostBinding, + Injector, + Input, OnInit, + OnDestroy, + Renderer2, + ViewContainerRef, } from '@angular/core'; +import { Subscription, timer } from 'rxjs'; +import { take } from 'rxjs/operators'; import { LoadingComponent } from '../components/loading/loading.component'; @Directive({ selector: '[abpLoading]' }) -export class LoadingDirective implements OnInit { +export class LoadingDirective implements OnInit, OnDestroy { private _loading: boolean; @HostBinding('style.position') @@ -29,29 +30,50 @@ export class LoadingDirective implements OnInit { set loading(newValue: boolean) { setTimeout(() => { - if (!this.componentRef) { - this.componentRef = this.cdRes - .resolveComponentFactory(LoadingComponent) - .create(this.injector); - } + if (!newValue && this.timerSubscription) { + this.timerSubscription.unsubscribe(); + this.timerSubscription = null; + this._loading = newValue; - if (newValue && !this.rootNode) { - this.rootNode = (this.componentRef.hostView as EmbeddedViewRef).rootNodes[0]; - this.targetElement.appendChild(this.rootNode); - } else { - this.renderer.removeChild(this.rootNode.parentElement, this.rootNode); - this.rootNode = null; + if (this.rootNode) { + this.renderer.removeChild(this.rootNode.parentElement, this.rootNode); + this.rootNode = null; + } + return; } - this._loading = newValue; + this.timerSubscription = timer(this.delay) + .pipe(take(1)) + .subscribe(() => { + if (!this.componentRef) { + this.componentRef = this.cdRes + .resolveComponentFactory(LoadingComponent) + .create(this.injector); + } + + if (newValue && !this.rootNode) { + this.rootNode = (this.componentRef.hostView as EmbeddedViewRef).rootNodes[0]; + this.targetElement.appendChild(this.rootNode); + } else { + this.renderer.removeChild(this.rootNode.parentElement, this.rootNode); + this.rootNode = null; + } + + this._loading = newValue; + this.timerSubscription = null; + }); }, 0); } @Input('abpLoadingTargetElement') targetElement: HTMLElement; + @Input('abpLoadingDelay') + delay = 0; + componentRef: ComponentRef; rootNode: HTMLDivElement; + timerSubscription: Subscription; constructor( private elRef: ElementRef, @@ -71,4 +93,10 @@ export class LoadingDirective implements OnInit { } } } + + ngOnDestroy() { + if (this.timerSubscription) { + this.timerSubscription.unsubscribe(); + } + } } diff --git a/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts b/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts index e4663c38aa..fedf870c4a 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts @@ -57,97 +57,108 @@ export class ErrorHandler { private injector: Injector, @Inject('HTTP_ERROR_CONFIG') private httpErrorConfig: HttpErrorConfig, ) { - this.actions.pipe(ofActionSuccessful(RestOccurError, RouterError, RouterDataResolved)).subscribe(res => { - if (res instanceof RestOccurError) { - const { payload: err = {} as HttpErrorResponse | any } = res; - const body = snq(() => (err as HttpErrorResponse).error.error, DEFAULT_ERROR_MESSAGES.defaultError.title); - - if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) { - const confirmation$ = this.showError(null, null, body); - - if (err.status === 401) { - confirmation$.subscribe(() => { - this.navigateToLogin(); - }); - } - } else { - switch ((err as HttpErrorResponse).status) { - case 401: - this.canCreateCustomError(401) - ? this.show401Page() - : this.showError( - { - key: 'AbpAccount::DefaultErrorMessage401', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title, - }, - { - key: 'AbpAccount::DefaultErrorMessage401Detail', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.details, - }, - ).subscribe(() => this.navigateToLogin()); - break; - case 403: - this.createErrorComponent({ - title: { - key: 'AbpAccount::DefaultErrorMessage403', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.title, - }, - details: { - key: 'AbpAccount::DefaultErrorMessage403Detail', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.details, - }, - status: 403, - }); - break; - case 404: - this.canCreateCustomError(404) - ? this.show404Page() - : this.showError( - { - key: 'AbpAccount::DefaultErrorMessage404', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details, - }, - { - key: 'AbpAccount::DefaultErrorMessage404Detail', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title, - }, - ); - break; - case 500: - this.createErrorComponent({ - title: { - key: 'AbpAccount::500Message', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.title, - }, - details: { - key: 'AbpAccount::InternalServerErrorMessage', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.details, - }, - status: 500, + this.actions + .pipe(ofActionSuccessful(RestOccurError, RouterError, RouterDataResolved)) + .subscribe(res => { + if (res instanceof RestOccurError) { + const { payload: err = {} as HttpErrorResponse | any } = res; + const body = snq( + () => (err as HttpErrorResponse).error.error, + DEFAULT_ERROR_MESSAGES.defaultError.title, + ); + + if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) { + const confirmation$ = this.showError(null, null, body); + + if (err.status === 401) { + confirmation$.subscribe(() => { + this.navigateToLogin(); }); - break; - case 0: - if ((err as HttpErrorResponse).statusText === 'Unknown Error') { + } + } else { + switch ((err as HttpErrorResponse).status) { + case 401: + this.canCreateCustomError(401) + ? this.show401Page() + : this.showError( + { + key: 'AbpAccount::DefaultErrorMessage401', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title, + }, + { + key: 'AbpAccount::DefaultErrorMessage401Detail', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.details, + }, + ).subscribe(() => this.navigateToLogin()); + break; + case 403: this.createErrorComponent({ title: { - key: 'AbpAccount::DefaultErrorMessage', - defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title, + key: 'AbpAccount::DefaultErrorMessage403', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.title, }, + details: { + key: 'AbpAccount::DefaultErrorMessage403Detail', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.details, + }, + status: 403, }); - } - break; - default: - this.showError(DEFAULT_ERROR_MESSAGES.defaultError.details, DEFAULT_ERROR_MESSAGES.defaultError.title); - break; + break; + case 404: + this.canCreateCustomError(404) + ? this.show404Page() + : this.showError( + { + key: 'AbpAccount::DefaultErrorMessage404', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details, + }, + { + key: 'AbpAccount::DefaultErrorMessage404Detail', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title, + }, + ); + break; + case 500: + this.createErrorComponent({ + title: { + key: 'AbpAccount::500Message', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.title, + }, + details: { + key: 'AbpAccount::InternalServerErrorMessage', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.details, + }, + status: 500, + }); + break; + case 0: + if ((err as HttpErrorResponse).statusText === 'Unknown Error') { + this.createErrorComponent({ + title: { + key: 'AbpAccount::DefaultErrorMessage', + defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title, + }, + }); + } + break; + default: + this.showError( + DEFAULT_ERROR_MESSAGES.defaultError.details, + DEFAULT_ERROR_MESSAGES.defaultError.title, + ); + break; + } } + } else if ( + res instanceof RouterError && + snq(() => res.event.error.indexOf('Cannot match') > -1, false) + ) { + this.show404Page(); + } else if (res instanceof RouterDataResolved && this.componentRef) { + this.componentRef.destroy(); + this.componentRef = null; } - } else if (res instanceof RouterError && snq(() => res.event.error.indexOf('Cannot match') > -1, false)) { - this.show404Page(); - } else if (res instanceof RouterDataResolved && this.componentRef) { - this.componentRef.destroy(); - this.componentRef = null; - } - }); + }); } private show401Page() { @@ -179,6 +190,9 @@ export class ErrorHandler { if (body.details) { message = body.details; title = body.message; + } else if (body.message) { + title = DEFAULT_ERROR_MESSAGES.defaultError.title; + message = body.message; } else { message = body.message || DEFAULT_ERROR_MESSAGES.defaultError.title; } @@ -192,7 +206,9 @@ export class ErrorHandler { private navigateToLogin() { this.store.dispatch( - new Navigate(['/account/login'], null, { state: { redirectUrl: this.store.selectSnapshot(RouterState.url) } }), + new Navigate(['/account/login'], null, { + state: { redirectUrl: this.store.selectSnapshot(RouterState.url) }, + }), ); } @@ -200,7 +216,9 @@ export class ErrorHandler { const renderer = this.rendererFactory.createRenderer(null, null); const host = renderer.selectRootElement(document.body, true); - this.componentRef = this.cfRes.resolveComponentFactory(HttpErrorWrapperComponent).create(this.injector); + this.componentRef = this.cfRes + .resolveComponentFactory(HttpErrorWrapperComponent) + .create(this.injector); for (const key in this.componentRef.instance) { if (this.componentRef.instance.hasOwnProperty(key)) { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/confirmation.service.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/confirmation.service.spec.ts index aa2481419d..918ed4e314 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/confirmation.service.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/confirmation.service.spec.ts @@ -3,7 +3,6 @@ import { Component } from '@angular/core'; import { RouterTestingModule } from '@angular/router/testing'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { NgxsModule } from '@ngxs/store'; -import { MessageService } from 'primeng/components/common/messageservice'; import { ConfirmationService } from '../services/confirmation.service'; import { ThemeSharedModule } from '../theme-shared.module'; import { OAuthModule, OAuthService } from 'angular-oauth2-oidc'; @@ -24,7 +23,6 @@ describe('ConfirmationService', () => { const createComponent = createComponentFactory({ component: DummyComponent, imports: [CoreModule, ThemeSharedModule.forRoot(), NgxsModule.forRoot(), RouterTestingModule], - providers: [MessageService], mocks: [OAuthService], }); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/error.handler.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/error.handler.spec.ts index aa22e9c567..d2f2c11e3d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/error.handler.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/error.handler.spec.ts @@ -6,7 +6,6 @@ import { createRoutingFactory, SpectatorRouting } from '@ngneat/spectator/jest'; import { NgxsModule, Store } from '@ngxs/store'; import { DEFAULT_ERROR_MESSAGES, ErrorHandler } from '../handlers'; import { ThemeSharedModule } from '../theme-shared.module'; -import { MessageService } from 'primeng/components/common/messageservice'; import { RouterError, RouterDataResolved } from '@ngxs/router-plugin'; import { NavigationError, ResolveEnd } from '@angular/router'; import { OAuthModule, OAuthService } from 'angular-oauth2-oidc'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/loading.directive.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/loading.directive.spec.ts index 1b49b8581c..b359a2000c 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/loading.directive.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/loading.directive.spec.ts @@ -20,8 +20,8 @@ describe('LoadingDirective', () => { describe('default', () => { beforeEach(() => { - spectator = createDirective('
    Testing Loading Directive
    ', { - hostProps: { status: true }, + spectator = createDirective('
    Testing Loading Directive
    ', { + hostProps: { loading: true }, }); }); @@ -30,7 +30,7 @@ describe('LoadingDirective', () => { expect(spectator.directive.rootNode).toBeTruthy(); expect(spectator.directive.componentRef).toBeTruthy(); done(); - }, 0); + }, 20); }); }); @@ -40,9 +40,9 @@ describe('LoadingDirective', () => { beforeEach(() => { spectator = createDirective( - '
    Testing Loading Directive
    ', + '
    Testing Loading Directive
    ', { - hostProps: { status: true, target: mockTarget }, + hostProps: { loading: true, target: mockTarget, delay: 0 }, }, ); }); @@ -51,24 +51,35 @@ describe('LoadingDirective', () => { setTimeout(() => { expect(spy).toHaveBeenCalled(); done(); - }, 0); + }, 20); }); it('should remove the loading component to the DOM', done => { const rendererSpy = jest.spyOn(spectator.directive['renderer'], 'removeChild'); - spectator.setHostInput({ status: false }); + setTimeout(() => spectator.setHostInput({ loading: false }), 0); setTimeout(() => { expect(rendererSpy).toHaveBeenCalled(); expect(spectator.directive.rootNode).toBeFalsy(); done(); - }, 0); + }, 20); + }); + + it('should appear with delay', done => { + spectator.setHostInput({ loading: false, delay: 20 }); + spectator.detectChanges(); + setTimeout(() => spectator.setHostInput({ loading: true }), 0); + setTimeout(() => expect(spectator.directive.loading).toBe(false), 15); + setTimeout(() => { + expect(spectator.directive.loading).toBe(true); + done(); + }, 50); }); }); describe('with a component selector', () => { beforeEach(() => { - spectator = createDirective('', { - hostProps: { status: true }, + spectator = createDirective('', { + hostProps: { loading: true }, }); }); @@ -76,7 +87,7 @@ describe('LoadingDirective', () => { setTimeout(() => { expect(spectator.directive.targetElement.id).toBe('dummy'); done(); - }, 0); + }, 20); }); }); }); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts index ead6d29a23..3bdf2e9d07 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts @@ -1,8 +1,6 @@ import { LocalizationPipe } from '@abp/ng.core'; import { createHostFactory, SpectatorHost } from '@ngneat/spectator/jest'; import { Store } from '@ngxs/store'; -import { MessageService } from 'primeng/components/common/messageservice'; -import { ToastModule } from 'primeng/toast'; import { timer } from 'rxjs'; import { ButtonComponent, ConfirmationComponent, ModalComponent } from '../components'; import { RouterTestingModule } from '@angular/router/testing'; @@ -16,9 +14,8 @@ describe('ModalComponent', () => { let disappearFn; const createHost = createHostFactory({ component: ModalComponent, - imports: [ToastModule, RouterTestingModule], + imports: [RouterTestingModule], declarations: [ConfirmationComponent, LocalizationPipe, ButtonComponent], - providers: [MessageService], mocks: [Store], }); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/table-sort.directive.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/table-sort.directive.spec.ts index 7c342174e6..f359518099 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/table-sort.directive.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/table-sort.directive.spec.ts @@ -1,5 +1,4 @@ import { SpectatorDirective, createDirectiveFactory } from '@ngneat/spectator/jest'; -import { TableModule, Table } from 'primeng/table'; import { TableSortDirective } from '../directives/table-sort.directive'; describe('TableSortDirective', () => { @@ -7,11 +6,12 @@ describe('TableSortDirective', () => { let directive: TableSortDirective; const createDirective = createDirectiveFactory({ directive: TableSortDirective, - imports: [TableModule], }); beforeEach(() => { - spectator = createDirective(``); + spectator = createDirective( + ``, + ); directive = spectator.directive; }); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/toaster.service.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/toaster.service.spec.ts index d7fbd7219e..1ac1116c78 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/toaster.service.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/toaster.service.spec.ts @@ -3,7 +3,6 @@ import { Component } from '@angular/core'; import { RouterTestingModule } from '@angular/router/testing'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { NgxsModule } from '@ngxs/store'; -import { MessageService } from 'primeng/components/common/messageservice'; import { ToasterService } from '../services/toaster.service'; import { ThemeSharedModule } from '../theme-shared.module'; import { OAuthService } from 'angular-oauth2-oidc'; @@ -24,7 +23,6 @@ describe('ToasterService', () => { const createComponent = createComponentFactory({ component: DummyComponent, imports: [CoreModule, ThemeSharedModule.forRoot(), NgxsModule.forRoot(), RouterTestingModule], - providers: [MessageService], mocks: [OAuthService], }); @@ -41,7 +39,7 @@ describe('ToasterService', () => { expect(spectator.query('div.toast')).toBeTruthy(); expect(spectator.query('.toast-icon i')).toHaveClass('fa-times-circle'); expect(spectator.query('div.toast-title')).toHaveText('title'); - expect(spectator.query('div.toast-message')).toHaveText('test'); + expect(spectator.query('p.toast-message')).toHaveText('test'); }); test('should display a warning toast', () => { @@ -71,7 +69,7 @@ describe('ToasterService', () => { 'summary1', 'summary2', ]); - expect(spectator.queryAll('div.toast-message').map(node => node.textContent.trim())).toEqual([ + expect(spectator.queryAll('p.toast-message').map(node => node.textContent.trim())).toEqual([ 'detail1', 'detail2', ]); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 69d719fe08..33e6144446 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -3,8 +3,6 @@ import { DatePipe } from '@angular/common'; import { APP_INITIALIZER, Injector, ModuleWithProviders, NgModule } from '@angular/core'; import { NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap'; import { NgxValidateCoreModule } from '@ngx-validate/core'; -import { MessageService } from 'primeng/components/common/messageservice'; -import { ToastModule } from 'primeng/toast'; import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.component'; import { ButtonComponent } from './components/button/button.component'; import { ChartComponent } from './components/chart/chart.component'; @@ -40,7 +38,7 @@ export function appendScript(injector: Injector) { } @NgModule({ - imports: [CoreModule, ToastModule, NgxValidateCoreModule], + imports: [CoreModule, NgxValidateCoreModule], declarations: [ BreadcrumbComponent, ButtonComponent, @@ -92,7 +90,6 @@ export class ThemeSharedModule { deps: [Injector], useFactory: appendScript, }, - { provide: MessageService, useClass: MessageService }, { provide: HTTP_ERROR_CONFIG, useValue: options.httpErrorConfig }, { provide: 'HTTP_ERROR_CONFIG', diff --git a/npm/ng-packs/scripts/package-lock.json b/npm/ng-packs/scripts/package-lock.json index 4a5907ee29..3e8d873de9 100644 --- a/npm/ng-packs/scripts/package-lock.json +++ b/npm/ng-packs/scripts/package-lock.json @@ -4,6 +4,15 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/fs-extra": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.1.tgz", + "integrity": "sha512-J00cVDALmi/hJOYsunyT52Hva5TnJeKP5yd1r+mH/ZU0mbYZflR0Z5kw5kITtKTRYMhm1JMClOFYdHnQszEvqw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -463,9 +472,9 @@ } }, "commander": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.0.1.tgz", - "integrity": "sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" }, "component-emitter": { "version": "1.3.0", @@ -1437,7 +1446,8 @@ "typescript": { "version": "3.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz", - "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==" + "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==", + "dev": true }, "universalify": { "version": "0.1.2", diff --git a/npm/ng-packs/scripts/package.json b/npm/ng-packs/scripts/package.json index c5f1527943..144a275924 100644 --- a/npm/ng-packs/scripts/package.json +++ b/npm/ng-packs/scripts/package.json @@ -13,12 +13,13 @@ "author": "", "dependencies": { "babel-preset-node6": "^11.0.0", - "commander": "^4.0.1", + "commander": "^4.1.1", "execa": "^2.0.3", "fs-extra": "^8.1.0", "prompt-confirm": "^2.0.4" }, "devDependencies": { + "@types/fs-extra": "^8.0.1", "@types/node": "^13.1.2", "esm": "^3.2.25", "ts-node": "^8.5.4", diff --git a/npm/ng-packs/scripts/publish.ts b/npm/ng-packs/scripts/publish.ts index b7e5d4f219..3a8197522f 100644 --- a/npm/ng-packs/scripts/publish.ts +++ b/npm/ng-packs/scripts/publish.ts @@ -1,9 +1,23 @@ import execa from 'execa'; import fse from 'fs-extra'; +import program from 'commander'; + +program + .option( + '-v, --nextVersion ', + 'next semantic version. Available versions: ["major", "minor", "patch", "premajor", "preminor", "prepatch", "prerelease", "or type a custom version"]', + ) + .option('-p, --preview', 'publish with preview tag'); + +program.parse(process.argv); const publish = async () => { const versions = ['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease']; - let nextSemanticVersion = (process.argv[2] || '').toLowerCase(); + + if (!program.nextVersion) { + console.error('Please provide a version with --nextVersion attribute'); + process.exit(1); + } try { await execa('yarn', ['install-new-dependencies'], { stdout: 'inherit' }); @@ -12,7 +26,7 @@ const publish = async () => { await execa( 'yarn', - ['lerna', 'version', nextSemanticVersion, '--yes', '--no-commit-hooks', '--skip-git'], + ['lerna', 'version', program.nextVersion, '--yes', '--no-commit-hooks', '--skip-git'], { stdout: 'inherit', cwd: '../' }, ); @@ -26,7 +40,14 @@ const publish = async () => { await execa( 'yarn', - ['lerna', 'exec', '--', '"npm publish --registry https://registry.npmjs.org"'], + [ + 'lerna', + 'exec', + '--', + `"npm publish --registry https://registry.npmjs.org${ + program.preview ? ' --tag preview' : '' + }"`, + ], { stdout: 'inherit', cwd: '../', diff --git a/npm/ng-packs/scripts/yarn.lock b/npm/ng-packs/scripts/yarn.lock index 2e14671cb5..b58b42d20b 100644 --- a/npm/ng-packs/scripts/yarn.lock +++ b/npm/ng-packs/scripts/yarn.lock @@ -2,11 +2,23 @@ # yarn lockfile v1 +"@types/fs-extra@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.0.1.tgz#a2378d6e7e8afea1564e44aafa2e207dadf77686" + integrity sha512-J00cVDALmi/hJOYsunyT52Hva5TnJeKP5yd1r+mH/ZU0mbYZflR0Z5kw5kITtKTRYMhm1JMClOFYdHnQszEvqw== + dependencies: + "@types/node" "*" + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/node@*": + version "13.7.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.1.tgz#238eb34a66431b71d2aaddeaa7db166f25971a0d" + integrity sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA== + "@types/node@^13.1.2": version "13.1.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.2.tgz#fe94285bf5e0782e1a9e5a8c482b1c34465fa385" @@ -412,10 +424,10 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -commander@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.0.1.tgz#b67622721785993182e807f4883633e6401ba53c" - integrity sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA== +commander@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== component-emitter@^1.2.1: version "1.3.0" diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock index 01e1a62823..7662445e41 100644 --- a/npm/ng-packs/yarn.lock +++ b/npm/ng-packs/yarn.lock @@ -2,26 +2,26 @@ # yarn lockfile v1 -"@abp/ng.account.config@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.account.config/-/ng.account.config-2.0.0.tgz#ed49d728e6cb5cac5bf562b2db6e65276a2d550c" - integrity sha512-r7n5NLaAg6xtMQK6KCoCwJALsj3+cftqbPU1mTJqoEiZQCejOUFA9Gk85i3t//MRUeD3j/ghzUYUa6b2elQwXQ== +"@abp/ng.account.config@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.account.config/-/ng.account.config-2.0.1.tgz#7777a09e434d2d592790f8598fd5ec0fbed70161" + integrity sha512-qyunC9FzC5cYL7IgExyVNIzvhBjKQN1Lk35uzCPr2vJTddyEUW+4bdFfSxtwg23O1LWAuMeE4sTAg/pv0R7AUQ== dependencies: tslib "^1.9.0" -"@abp/ng.account@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.account/-/ng.account-2.0.0.tgz#ac1ea6b51190d68c647699fb9a6d185ad728ec3e" - integrity sha512-UC/mTFermfrnAmm2Y6ZrsbKi4EyPzoASeRzoZ5LL0usyEIKb4N9l7Z7kxr5ih2+OPVSW9TmDfgw/zwn3HlrrWw== +"@abp/ng.account@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.account/-/ng.account-2.0.1.tgz#e1e25224a27472a28ff85337000e301174775191" + integrity sha512-bR8xolzq/rtQ+HZnOUDKpR/FT6SSGEFq0r0HMttPG9hiTD1HNthHfx8JaQjPBCAw43WhGIIxLgcRkitu6aXAyA== dependencies: - "@abp/ng.account.config" "^2.0.0" - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.account.config" "^2.0.1" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-2.0.0.tgz#9da38d0d3a32a5f7239034a37c3f4f14be745f30" - integrity sha512-pp3u+3bYMSygx88+t4929tkp7a5ja8k8IPeoho2SiJgC2ni546ecX10Yt02X1C8DBEhBr7b6Fn7eQI0VTA4zYA== +"@abp/ng.core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-2.0.1.tgz#11471a2bc96f03c97c5bcea6d0c9fd81284a103a" + integrity sha512-fa2QK7x0VUovxX5JiXZMoBKuE23xjsW6Pp1+ZuFdKxRG8eP5yoAmkLuNKDEhzy9ancDac8wLUetvnUx/QZKCXQ== dependencies: "@ngxs/router-plugin" "^3.5.1" "@ngxs/storage-plugin" "^3.5.1" @@ -32,86 +32,86 @@ snq "^1.0.3" tslib "^1.9.0" -"@abp/ng.feature-management@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-2.0.0.tgz#a9192bb24ca66d9eb0cf653695da2502ebaa7710" - integrity sha512-7DQapIj28Bh7MtSGKJLLd98i2vWGJgA/4hx3jjQ0WT94NnuyZPKsYwSGcJbVgbTV3PyLWcDCdmhh2NloL2O0lw== +"@abp/ng.feature-management@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-2.0.1.tgz#884451d35f642f585eb9bdf7361c859e670f030d" + integrity sha512-11uoLEnTj2shFz3bFTOHsCKixWDQiuaJbsT66ui0Rs9bWUTwMQUu1s4yzAZPHi/ooAFJUTX+H52rWtUnHwpK2A== dependencies: - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.identity.config@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.identity.config/-/ng.identity.config-2.0.0.tgz#4912b513e919778356cec45ceda4bc032e0cc9b6" - integrity sha512-LfEwy57+Yx8nZXvzgFn8aYVnZSFrhBxFvD1twrTrddQRKltO+wSXV8p6boem8KRU2KWpbH0NYhnBNOxPYGHF6g== +"@abp/ng.identity.config@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.identity.config/-/ng.identity.config-2.0.1.tgz#3f3b2c4f70fecb2e02ac35bdb1546f51e54b87fd" + integrity sha512-lNtrKq6+QGYokN59QjteupbMN/LjtwAQlnZ5J75LHK8YoEMMzyVpK2GVKdgO3xrgcvfDSpz+OVjePNxyykbejA== dependencies: tslib "^1.9.0" -"@abp/ng.identity@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-2.0.0.tgz#33ba9c94042a48c7c004a4df499a669f75997a25" - integrity sha512-qjtiIJy+fpn9JDZjndqtNPnGWPNc1pMQP4cV+UVm8RUG5U3nMI8RfEYyuDKluSGPAF2Qncl3husjpmZjZaEO9w== +"@abp/ng.identity@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-2.0.1.tgz#1168ef8186614a229d6e5ada2afecd8885a074af" + integrity sha512-+B2I/xsl3qOb56BZn9gZL8icu9/YS8i9CEYJmBvjxmtUzvUV6GfNhDf83BfThJO7wZn9d+GEbHY544kjKl+kwg== dependencies: - "@abp/ng.identity.config" "^2.0.0" - "@abp/ng.permission-management" "^2.0.0" - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.identity.config" "^2.0.1" + "@abp/ng.permission-management" "^2.0.1" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.permission-management@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-2.0.0.tgz#b7956a274945bac9b3bfb16cfcacd70af531d82e" - integrity sha512-ZCuitlFgP1S/Y1Us5nIS9Fw9Jz9Jb7RRboTb6ysbMcLcOkgYJn2d806fnEQh/TkJHpTJDNZYIk27/DlaOQN2xg== +"@abp/ng.permission-management@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-2.0.1.tgz#9e0abcc014db8bae08b8eb1380fdfbf05e988971" + integrity sha512-eKKvFtix8qoA+Il7o+39o9lMfQcSlcLme+H/Ry5crr865PcxJQ9j0nwoRBfkNRpUb8XbjyDkS3Paink7mSBZVQ== dependencies: - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.setting-management.config@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.setting-management.config/-/ng.setting-management.config-2.0.0.tgz#4013b5d6bf7a34fc93ab1df3734c50bb60588b0e" - integrity sha512-eVIzsSQHMz1+Y4Pri8dec31NP3pGwqeX9oFN6YdiIlXL7i0Lqvf9o1ZvMvZ6iIX7GJsOilTgd9Rw7ccZnZTaEQ== +"@abp/ng.setting-management.config@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.setting-management.config/-/ng.setting-management.config-2.0.1.tgz#436e6d9ba20f93a7707548057a21cde30cfcd612" + integrity sha512-pizWCfGOCNp+zP3Pc7zPQ3NKHG9lZJTVeE+RxHXQ+TTlg9xKSlojvQnzIwTKfQPQv0lREalDimNA2PXWvzsTAQ== dependencies: tslib "^1.9.0" -"@abp/ng.setting-management@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-2.0.0.tgz#9babb94b66aba3d95b44457e9301bbf2d7ea10b5" - integrity sha512-tRYRW/SlS52o9kO3yojJarYf0IFYNigXJaJPBOla1RPWW9fM63irCUq+NAI5bRUkxPHDQPfpE8qJC32DPM6a1Q== +"@abp/ng.setting-management@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-2.0.1.tgz#7fc35fcae6db50ae6c9182feeb066dd91f26dd68" + integrity sha512-CiMzvhhimKn0B6jCcejUW5Io9rm7K2H6+gyIi6G3xrewMqVfyROB6bLebtX7KKy5291qzhqZH0MTQxZQnAMxUQ== dependencies: - "@abp/ng.setting-management.config" "^2.0.0" - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.setting-management.config" "^2.0.1" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.tenant-management.config@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management.config/-/ng.tenant-management.config-2.0.0.tgz#ee2357596263019eae9fcbefe8fd927242b81e87" - integrity sha512-HMZh7HBrFcMXLXGvEjwSOF0ncDcZUtUez1J4ll6oMBVbL4xgfJxIggODin9OMMdQOkLjzYY4BGS+Iwjzh5DR2g== +"@abp/ng.tenant-management.config@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management.config/-/ng.tenant-management.config-2.0.1.tgz#f65a0641dbe57f0128c220fa559c75ebee8e0531" + integrity sha512-EAk1+GEGFB0Uys9FFlrBo1frr8mFp32ogOviw4fCGl0rNZpI+uh7L7q5OQiP2EvK5CDu1OQd9wZm9IVbIWHpHw== dependencies: tslib "^1.9.0" -"@abp/ng.tenant-management@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-2.0.0.tgz#24dfbaf234e567244bdd4cc882ed6952d873e6b3" - integrity sha512-Qn/JLJcCMYYZ+5IuF5jSHzwB9dprnQqoVv8i8vuXS1dyooBoqIIKNMs0E/GOsNu5MPABYrd24YODGi2Nso/OxA== +"@abp/ng.tenant-management@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-2.0.1.tgz#182addc7bd800841681e75260173b90ccd88ba07" + integrity sha512-zosVzejfuUG/ZLralkZv860AHxVJ9ScED//ulst8IJG4QWg55pOTgMtHn27HkIb/z45QVWeVAbEENG2SS+ezkQ== dependencies: - "@abp/ng.feature-management" "^2.0.0" - "@abp/ng.tenant-management.config" "^2.0.0" - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.feature-management" "^2.0.1" + "@abp/ng.tenant-management.config" "^2.0.1" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-2.0.0.tgz#c492bd513bb8a14d4df7b1ed24316543b41cb710" - integrity sha512-WH7DKzF8MkK1fG8uCYGQWJmkJPliyKi2/UwimmFie5UxFsII05rvZZAa+/EILVfMyob+4AkDeU79gZ/EWUJeZg== +"@abp/ng.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-2.0.1.tgz#af7047dba43b2701ea1d4b9cec8c2bfd52227b1f" + integrity sha512-ExwgzHoyXgtWNhzcs/c2tmZJrJFZQgC0iDC5AWDmOQDf63U2aDujMHiTHRD4lmnB5O5odE9/aN631QnHXj987w== dependencies: - "@abp/ng.theme.shared" "^2.0.0" + "@abp/ng.theme.shared" "^2.0.1" tslib "^1.9.0" -"@abp/ng.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-2.0.0.tgz#d241d597d0bb58d50514522d133448f12672708f" - integrity sha512-akTvtNLKkpdWxLko6jMR261FSNEMNcRp1bvvOE2Auged9luXZYneNfaExnoLkBQhRuxmLKBYLPHyyueGRy2v2g== +"@abp/ng.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-2.0.1.tgz#16dd66f5b54d9b528a22bc48f209b413dc33f52d" + integrity sha512-Yle+dGpYNGMcTEc6/+P1tgKLSgnCkLvG9BfgNdOSFq3vBp5AHj2ip2w2+uX6Svo9Fll8Tth9P6BpRpwvQ3CqwQ== dependencies: - "@abp/ng.core" "^2.0.0" + "@abp/ng.core" "^2.0.1" "@angular/cdk" "^8.2.3" "@fortawesome/fontawesome-free" "^5.11.2" "@ng-bootstrap/ng-bootstrap" "^5.1.4" diff --git a/npm/package.json b/npm/package.json index f8bf5fe835..0dc358279b 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,4 +1,5 @@ { + "version": "2.1.0", "scripts": { "lerna": "lerna", "gulp:app": "node run-gulp-script.js ../templates/app/aspnet-core", @@ -7,11 +8,13 @@ "update:templates": "node abp-package-update-script.js ../templates" }, "devDependencies": { + "@types/fs-extra": "^8.0.1", "glob": "^7.1.5", "lerna": "^3.18.4", "npm-check-updates": "^3.1.25" }, "dependencies": { - "execa": "^3.4.0" + "execa": "^3.4.0", + "fs-extra": "^8.1.0" } } diff --git a/npm/packs/anchor-js/package.json b/npm/packs/anchor-js/package.json index 0b6ff26bae..98c4572723 100644 --- a/npm/packs/anchor-js/package.json +++ b/npm/packs/anchor-js/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/anchor-js", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "anchor-js": "^4.2.2" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json b/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json index 14d43e8a0f..95161b9b2b 100644 --- a/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json +++ b/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json @@ -1,11 +1,11 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/aspnetcore.mvc.ui.theme.basic", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared": "^2.0.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json b/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json index 714dd5c974..7e99b40a89 100644 --- a/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json +++ b/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json @@ -1,24 +1,24 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/aspnetcore.mvc.ui.theme.shared", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/aspnetcore.mvc.ui": "^2.0.0", - "@abp/bootstrap": "^2.0.0", - "@abp/bootstrap-datepicker": "^2.0.0", - "@abp/datatables.net-bs4": "^2.0.0", - "@abp/font-awesome": "^2.0.0", - "@abp/jquery-form": "^2.0.0", - "@abp/jquery-validation-unobtrusive": "^2.0.0", - "@abp/lodash": "^2.0.0", - "@abp/luxon": "^2.0.0", - "@abp/malihu-custom-scrollbar-plugin": "^2.0.0", - "@abp/select2": "^2.0.0", - "@abp/sweetalert": "^2.0.0", - "@abp/timeago": "^2.0.0", - "@abp/toastr": "^2.0.0" + "@abp/aspnetcore.mvc.ui": "^2.0.1", + "@abp/bootstrap": "^2.0.1", + "@abp/bootstrap-datepicker": "^2.0.1", + "@abp/datatables.net-bs4": "^2.0.1", + "@abp/font-awesome": "^2.0.1", + "@abp/jquery-form": "^2.0.1", + "@abp/jquery-validation-unobtrusive": "^2.0.1", + "@abp/lodash": "^2.0.1", + "@abp/luxon": "^2.0.1", + "@abp/malihu-custom-scrollbar-plugin": "^2.0.1", + "@abp/select2": "^2.0.1", + "@abp/sweetalert": "^2.0.1", + "@abp/timeago": "^2.0.1", + "@abp/toastr": "^2.0.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/aspnetcore.mvc.ui/package.json b/npm/packs/aspnetcore.mvc.ui/package.json index fcef935262..f2e702f385 100644 --- a/npm/packs/aspnetcore.mvc.ui/package.json +++ b/npm/packs/aspnetcore.mvc.ui/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/aspnetcore.mvc.ui", "publishConfig": { "access": "public" @@ -12,5 +12,5 @@ "path": "^0.12.7", "rimraf": "^3.0.0" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/blogging/package.json b/npm/packs/blogging/package.json index 2cff0e28fb..6bc333b0a3 100644 --- a/npm/packs/blogging/package.json +++ b/npm/packs/blogging/package.json @@ -1,13 +1,13 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/blogging", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "^2.0.0", - "@abp/owl.carousel": "^2.0.0", - "@abp/tui-editor": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared": "^2.0.1", + "@abp/owl.carousel": "^2.0.1", + "@abp/tui-editor": "^2.0.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/bootstrap-datepicker/package.json b/npm/packs/bootstrap-datepicker/package.json index 801d1ae32f..822d415d9c 100644 --- a/npm/packs/bootstrap-datepicker/package.json +++ b/npm/packs/bootstrap-datepicker/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/bootstrap-datepicker", "publishConfig": { "access": "public" @@ -7,5 +7,5 @@ "dependencies": { "bootstrap-datepicker": "^1.9.0" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/bootstrap/package.json b/npm/packs/bootstrap/package.json index 5c52d72378..78ed684187 100644 --- a/npm/packs/bootstrap/package.json +++ b/npm/packs/bootstrap/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/bootstrap", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "bootstrap": "^4.3.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/chart.js/package.json b/npm/packs/chart.js/package.json index 96f1518fd8..b1914adccc 100644 --- a/npm/packs/chart.js/package.json +++ b/npm/packs/chart.js/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/chart.js", "publishConfig": { "access": "public" @@ -7,5 +7,5 @@ "dependencies": { "chart.js": "^2.9.3" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/clipboard/package.json b/npm/packs/clipboard/package.json index e6b080a5bd..b8564d97de 100644 --- a/npm/packs/clipboard/package.json +++ b/npm/packs/clipboard/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/clipboard", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "clipboard": "^2.0.4" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/codemirror/package.json b/npm/packs/codemirror/package.json index 4a4d2fa320..cfee638031 100644 --- a/npm/packs/codemirror/package.json +++ b/npm/packs/codemirror/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/codemirror", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "codemirror": "^5.49.2" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/core/package.json b/npm/packs/core/package.json index abf41de036..6453324dd0 100644 --- a/npm/packs/core/package.json +++ b/npm/packs/core/package.json @@ -1,8 +1,8 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/core", "publishConfig": { "access": "public" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/datatables.net-bs4/package.json b/npm/packs/datatables.net-bs4/package.json index cc281baf39..9fbdebeda7 100644 --- a/npm/packs/datatables.net-bs4/package.json +++ b/npm/packs/datatables.net-bs4/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/datatables.net-bs4", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/datatables.net": "^2.0.0", + "@abp/datatables.net": "^2.0.1", "datatables.net-bs4": "^1.10.20" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/datatables.net/package.json b/npm/packs/datatables.net/package.json index ad5de1b32a..6ce6d67ea3 100644 --- a/npm/packs/datatables.net/package.json +++ b/npm/packs/datatables.net/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/datatables.net", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "datatables.net": "^1.10.20" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/docs/package.json b/npm/packs/docs/package.json index 68266e5d2d..7fd061fc94 100644 --- a/npm/packs/docs/package.json +++ b/npm/packs/docs/package.json @@ -1,15 +1,15 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/docs", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/anchor-js": "^2.0.0", - "@abp/clipboard": "^2.0.0", - "@abp/malihu-custom-scrollbar-plugin": "^2.0.0", - "@abp/popper.js": "^2.0.0", - "@abp/prismjs": "^2.0.0" + "@abp/anchor-js": "^2.0.1", + "@abp/clipboard": "^2.0.1", + "@abp/malihu-custom-scrollbar-plugin": "^2.0.1", + "@abp/popper.js": "^2.0.1", + "@abp/prismjs": "^2.0.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/flag-icon-css/package.json b/npm/packs/flag-icon-css/package.json index d771e8b1d6..08a68f703e 100644 --- a/npm/packs/flag-icon-css/package.json +++ b/npm/packs/flag-icon-css/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/flag-icon-css", "publishConfig": { "access": "public" @@ -7,5 +7,5 @@ "dependencies": { "flag-icon-css": "^3.4.5" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/font-awesome/package.json b/npm/packs/font-awesome/package.json index 890341e655..cda6483ff4 100644 --- a/npm/packs/font-awesome/package.json +++ b/npm/packs/font-awesome/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/font-awesome", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "@fortawesome/fontawesome-free": "^5.11.2" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/highlight.js/package.json b/npm/packs/highlight.js/package.json index 221e49a82f..d37137e0a6 100644 --- a/npm/packs/highlight.js/package.json +++ b/npm/packs/highlight.js/package.json @@ -1,11 +1,11 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/highlight.js", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0" + "@abp/core": "^2.0.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/jquery-form/package.json b/npm/packs/jquery-form/package.json index 1f9cdf546c..d7209c6b2a 100644 --- a/npm/packs/jquery-form/package.json +++ b/npm/packs/jquery-form/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/jquery-form", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "^2.0.0", + "@abp/jquery": "^2.0.1", "jquery-form": "^4.2.2" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/jquery-validation-unobtrusive/package.json b/npm/packs/jquery-validation-unobtrusive/package.json index 675f1a67bc..749e6e033e 100644 --- a/npm/packs/jquery-validation-unobtrusive/package.json +++ b/npm/packs/jquery-validation-unobtrusive/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/jquery-validation-unobtrusive", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery-validation": "^2.0.0", + "@abp/jquery-validation": "^2.0.1", "jquery-validation-unobtrusive": "^3.2.11" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/jquery-validation/package.json b/npm/packs/jquery-validation/package.json index 8041f6c962..9aa93df7ca 100644 --- a/npm/packs/jquery-validation/package.json +++ b/npm/packs/jquery-validation/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/jquery-validation", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "^2.0.0", + "@abp/jquery": "^2.0.1", "jquery-validation": "^1.19.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/jquery/package.json b/npm/packs/jquery/package.json index c864b313af..5239035cac 100644 --- a/npm/packs/jquery/package.json +++ b/npm/packs/jquery/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/jquery", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "jquery": "^3.4.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/lodash/package.json b/npm/packs/lodash/package.json index 4cc42183fb..e53311b8c0 100644 --- a/npm/packs/lodash/package.json +++ b/npm/packs/lodash/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/lodash", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "lodash": "^4.17.15" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/luxon/package.json b/npm/packs/luxon/package.json index 79f163388b..1d3754724a 100644 --- a/npm/packs/luxon/package.json +++ b/npm/packs/luxon/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/luxon", "publishConfig": { "access": "public" @@ -7,5 +7,5 @@ "dependencies": { "luxon": "^1.21.3" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/malihu-custom-scrollbar-plugin/package.json b/npm/packs/malihu-custom-scrollbar-plugin/package.json index d65585affc..4727381896 100644 --- a/npm/packs/malihu-custom-scrollbar-plugin/package.json +++ b/npm/packs/malihu-custom-scrollbar-plugin/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/malihu-custom-scrollbar-plugin", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "malihu-custom-scrollbar-plugin": "^3.1.5" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/markdown-it/package.json b/npm/packs/markdown-it/package.json index bbde823ac3..4ebeeb3519 100644 --- a/npm/packs/markdown-it/package.json +++ b/npm/packs/markdown-it/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/markdown-it", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "markdown-it": "^10.0.0" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/owl.carousel/package.json b/npm/packs/owl.carousel/package.json index bf6c7bbfbc..7e26cdd205 100644 --- a/npm/packs/owl.carousel/package.json +++ b/npm/packs/owl.carousel/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/owl.carousel", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "owl.carousel": "^2.3.4" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/popper.js/package.json b/npm/packs/popper.js/package.json index 66371985af..a7434fa3bd 100644 --- a/npm/packs/popper.js/package.json +++ b/npm/packs/popper.js/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/popper.js", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "popper.js": "^1.16.0" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/prismjs/package.json b/npm/packs/prismjs/package.json index 52f2920631..0ccb07b681 100644 --- a/npm/packs/prismjs/package.json +++ b/npm/packs/prismjs/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/prismjs", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "prismjs": "^1.17.1" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/select2/package.json b/npm/packs/select2/package.json index b41559f400..1917c0b14c 100644 --- a/npm/packs/select2/package.json +++ b/npm/packs/select2/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/select2", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "select2": "^4.0.12" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/sweetalert/package.json b/npm/packs/sweetalert/package.json index 3099b81ba1..c0886e9e2d 100644 --- a/npm/packs/sweetalert/package.json +++ b/npm/packs/sweetalert/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/sweetalert", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "^2.0.0", + "@abp/core": "^2.0.1", "sweetalert": "^2.1.2" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/timeago/package.json b/npm/packs/timeago/package.json index 788ac14058..df888fb187 100644 --- a/npm/packs/timeago/package.json +++ b/npm/packs/timeago/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/timeago", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "^2.0.0", + "@abp/jquery": "^2.0.1", "timeago": "^1.6.7" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/toastr/package.json b/npm/packs/toastr/package.json index 6b806cb9b3..1abd064435 100644 --- a/npm/packs/toastr/package.json +++ b/npm/packs/toastr/package.json @@ -1,12 +1,12 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/toastr", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "^2.0.0", + "@abp/jquery": "^2.0.1", "toastr": "^2.1.4" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/packs/tui-editor/package.json b/npm/packs/tui-editor/package.json index a745202334..e2956027a2 100644 --- a/npm/packs/tui-editor/package.json +++ b/npm/packs/tui-editor/package.json @@ -1,15 +1,15 @@ { - "version": "2.0.0", + "version": "2.0.1", "name": "@abp/tui-editor", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/codemirror": "^2.0.0", - "@abp/highlight.js": "^2.0.0", - "@abp/jquery": "^2.0.0", - "@abp/markdown-it": "^2.0.0", + "@abp/codemirror": "^2.0.1", + "@abp/highlight.js": "^2.0.1", + "@abp/jquery": "^2.0.1", + "@abp/markdown-it": "^2.0.1", "tui-editor": "^1.4.8" }, - "gitHead": "407ad749bb735eb9b6cc1ef6dd310253b9680883" + "gitHead": "b7064633947fe074ee60eab4f9bf3237acbc5246" } diff --git a/npm/preview-publish.ps1 b/npm/preview-publish.ps1 new file mode 100644 index 0000000000..d448378750 --- /dev/null +++ b/npm/preview-publish.ps1 @@ -0,0 +1,30 @@ +param( + [string]$Version +) + +npm install + +$NextVersion = $(node get-version.js) + '-preview' + (Get-Date).tostring(“yyyyMMdd”) + '-1' +$rootFolder = (Get-Item -Path "./" -Verbose).FullName + +if(-Not $Version) { +$Version = $NextVersion; +} + +$commands = ( + "cd ng-packs\scripts", + "npm install", + "npm run publish-packages -- --nextVersion $Version --preview", + "cd ../../", + "yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview" +) + +foreach ($command in $commands) { + Write-Host $command + Invoke-Expression $command + if($LASTEXITCODE -ne '0' -And $command -notlike '*cd *'){ + Write-Host ("Process failed! " + $command) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} \ No newline at end of file diff --git a/npm/publish.ps1 b/npm/publish.ps1 index 7552eb0505..a510527401 100644 --- a/npm/publish.ps1 +++ b/npm/publish.ps1 @@ -2,19 +2,20 @@ param( [string]$Version ) -if(-Not $Version) { -echo 'Please pass a semantic version like this: ./publish.ps1 -Version patch' -exit -} +npm install +$NextVersion = $(node get-version.js) $rootFolder = (Get-Item -Path "./" -Verbose).FullName +if(-Not $Version) { + $Version = $NextVersion; +} + $commands = ( "cd ng-packs\scripts", "npm install", - "npm run publish-packages -- $Version", + "npm run publish-packages -- --nextVersion $Version", "cd ../../", - "yarn", "yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish", "yarn update:templates", "yarn gulp:app", diff --git a/npm/yarn.lock b/npm/yarn.lock index 7775403939..b331d5ff22 100644 --- a/npm/yarn.lock +++ b/npm/yarn.lock @@ -832,6 +832,13 @@ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== +"@types/fs-extra@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.0.1.tgz#a2378d6e7e8afea1564e44aafa2e207dadf77686" + integrity sha512-J00cVDALmi/hJOYsunyT52Hva5TnJeKP5yd1r+mH/ZU0mbYZflR0Z5kw5kITtKTRYMhm1JMClOFYdHnQszEvqw== + dependencies: + "@types/node" "*" + "@types/glob@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" diff --git a/samples/BasicConsoleApplication/AbpConsoleDemo/AbpConsoleDemo.csproj b/samples/BasicConsoleApplication/AbpConsoleDemo/AbpConsoleDemo.csproj index c3c4e39fd8..9e20015c9f 100644 --- a/samples/BasicConsoleApplication/AbpConsoleDemo/AbpConsoleDemo.csproj +++ b/samples/BasicConsoleApplication/AbpConsoleDemo/AbpConsoleDemo.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,6 +7,7 @@ + diff --git a/samples/BasicConsoleApplication/AbpConsoleDemo/AppHostedService.cs b/samples/BasicConsoleApplication/AbpConsoleDemo/AppHostedService.cs new file mode 100644 index 0000000000..578c437177 --- /dev/null +++ b/samples/BasicConsoleApplication/AbpConsoleDemo/AppHostedService.cs @@ -0,0 +1,32 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Volo.Abp; + +namespace AbpConsoleDemo +{ + public class AppHostedService : IHostedService + { + public Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.UseAutofac(); //Autofac integration + })) + { + application.Initialize(); + + //Resolve a service and use it + var helloWorldService = application.ServiceProvider.GetService(); + helloWorldService.SayHello(); + + application.Shutdown(); + } + + return Task.CompletedTask; + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BasicConsoleApplication/AbpConsoleDemo/Program.cs b/samples/BasicConsoleApplication/AbpConsoleDemo/Program.cs index 651fda3c4f..2c8791f656 100644 --- a/samples/BasicConsoleApplication/AbpConsoleDemo/Program.cs +++ b/samples/BasicConsoleApplication/AbpConsoleDemo/Program.cs @@ -1,28 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; +using Microsoft.Extensions.Hosting; namespace AbpConsoleDemo { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); //Autofac integration - })) - { - application.Initialize(); - - //Resolve a service and use it - var helloWorldService = - application.ServiceProvider.GetService(); - helloWorldService.SayHello(); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore-Angular-MongoDb/angular/src/app/shared/shared.module.ts b/samples/BookStore-Angular-MongoDb/angular/src/app/shared/shared.module.ts index 6bae4ea332..6c4c9b016c 100644 --- a/samples/BookStore-Angular-MongoDb/angular/src/app/shared/shared.module.ts +++ b/samples/BookStore-Angular-MongoDb/angular/src/app/shared/shared.module.ts @@ -4,11 +4,26 @@ import { NgModule } from '@angular/core'; import { ThemeBasicModule } from '@abp/ng.theme.basic'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { TableModule } from 'primeng/table'; +import { NgxValidateCoreModule } from '@ngx-validate/core'; @NgModule({ declarations: [], - imports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], - exports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], + imports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], + exports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], providers: [], }) export class SharedModule {} diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs new file mode 100644 index 0000000000..aef3d88bb5 --- /dev/null +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs @@ -0,0 +1,34 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Acme.BookStore.Data; +using Serilog; +using Volo.Abp; + +namespace Acme.BookStore.DbMigrator +{ + public class DbMigratorHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) + { + application.Initialize(); + + await application + .ServiceProvider + .GetRequiredService() + .MigrateAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Program.cs b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Program.cs index d3c4034c8a..179c18f4ca 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Program.cs +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Program.cs @@ -1,39 +1,15 @@ -using System.IO; +using System.IO; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Acme.BookStore.Data; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -using Volo.Abp; -using Volo.Abp.Threading; namespace Acme.BookStore.DbMigrator { class Program { - static void Main(string[] args) - { - ConfigureLogging(); - - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - })) - { - application.Initialize(); - - AsyncHelper.RunSync( - () => application - .ServiceProvider - .GetRequiredService() - .MigrateAsync() - ); - - application.Shutdown(); - } - } - - private static void ConfigureLogging() + static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() @@ -48,6 +24,15 @@ namespace Acme.BookStore.DbMigrator .WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt")) .WriteTo.Console() .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj index acc9b5d652..432792f1b0 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj index ad0861edc7..0afb022b3e 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj @@ -1,4 +1,4 @@ - + @@ -13,7 +13,7 @@ - + diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..e41ee7ed31 --- /dev/null +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace Acme.BookStore.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs index ecef29d963..7d8265158b 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; namespace Acme.BookStore.HttpApi.Client.ConsoleTestApp { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs new file mode 100644 index 0000000000..aef3d88bb5 --- /dev/null +++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs @@ -0,0 +1,34 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Acme.BookStore.Data; +using Serilog; +using Volo.Abp; + +namespace Acme.BookStore.DbMigrator +{ + public class DbMigratorHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) + { + application.Initialize(); + + await application + .ServiceProvider + .GetRequiredService() + .MigrateAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs index d3c4034c8a..179c18f4ca 100644 --- a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs +++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs @@ -1,39 +1,15 @@ -using System.IO; +using System.IO; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Acme.BookStore.Data; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -using Volo.Abp; -using Volo.Abp.Threading; namespace Acme.BookStore.DbMigrator { class Program { - static void Main(string[] args) - { - ConfigureLogging(); - - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - })) - { - application.Initialize(); - - AsyncHelper.RunSync( - () => application - .ServiceProvider - .GetRequiredService() - .MigrateAsync() - ); - - application.Shutdown(); - } - } - - private static void ConfigureLogging() + static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() @@ -48,6 +24,15 @@ namespace Acme.BookStore.DbMigrator .WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt")) .WriteTo.Console() .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj index d0d0942a4a..cd65444d65 100644 --- a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj +++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj index 9d4115179c..d378f9ff00 100644 --- a/samples/BookStore-Modular/application/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj +++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj @@ -1,4 +1,4 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..e41ee7ed31 --- /dev/null +++ b/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace Acme.BookStore.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs b/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs index ecef29d963..7d8265158b 100644 --- a/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; namespace Acme.BookStore.HttpApi.Client.ConsoleTestApp { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Acme.BookStore.BookManagement.HttpApi.Host.csproj b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Acme.BookStore.BookManagement.HttpApi.Host.csproj index 60f118bc93..60c2276bb4 100644 --- a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Acme.BookStore.BookManagement.HttpApi.Host.csproj +++ b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Acme.BookStore.BookManagement.HttpApi.Host.csproj @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Acme.BookStore.BookManagement.IdentityServer.csproj b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Acme.BookStore.BookManagement.IdentityServer.csproj index d9b39f407e..c0b6996719 100644 --- a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Acme.BookStore.BookManagement.IdentityServer.csproj +++ b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Acme.BookStore.BookManagement.IdentityServer.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -10,7 +10,7 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj index 1df46016b4..34f8bcf4c1 100644 --- a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj +++ b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Acme.BookStore.BookManagement.Web.Unified.csproj b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Acme.BookStore.BookManagement.Web.Unified.csproj index 04993f9b69..d54a64710b 100644 --- a/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Acme.BookStore.BookManagement.Web.Unified.csproj +++ b/samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Acme.BookStore.BookManagement.Web.Unified.csproj @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application.Contracts/Acme.BookStore.BookManagement.Application.Contracts.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application.Contracts/Acme.BookStore.BookManagement.Application.Contracts.csproj index 4c1d84fa66..d653e6da26 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application.Contracts/Acme.BookStore.BookManagement.Application.Contracts.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application.Contracts/Acme.BookStore.BookManagement.Application.Contracts.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/Acme.BookStore.BookManagement.Application.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/Acme.BookStore.BookManagement.Application.csproj index 45097c877b..83ebec65c8 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/Acme.BookStore.BookManagement.Application.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/Acme.BookStore.BookManagement.Application.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain.Shared/Acme.BookStore.BookManagement.Domain.Shared.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain.Shared/Acme.BookStore.BookManagement.Domain.Shared.csproj index 5237b88c14..0c81261452 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain.Shared/Acme.BookStore.BookManagement.Domain.Shared.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain.Shared/Acme.BookStore.BookManagement.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain/Acme.BookStore.BookManagement.Domain.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain/Acme.BookStore.BookManagement.Domain.csproj index 05176a1c2a..eac420d7f3 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain/Acme.BookStore.BookManagement.Domain.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain/Acme.BookStore.BookManagement.Domain.csproj @@ -1,4 +1,4 @@ - + @@ -12,4 +12,4 @@ - \ No newline at end of file + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.EntityFrameworkCore/Acme.BookStore.BookManagement.EntityFrameworkCore.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.EntityFrameworkCore/Acme.BookStore.BookManagement.EntityFrameworkCore.csproj index 5d0a8647fe..978ac17da5 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.EntityFrameworkCore/Acme.BookStore.BookManagement.EntityFrameworkCore.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.EntityFrameworkCore/Acme.BookStore.BookManagement.EntityFrameworkCore.csproj @@ -1,9 +1,9 @@ - + - netstandard2.1 + netstandard2.0 Acme.BookStore.BookManagement diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi.Client/Acme.BookStore.BookManagement.HttpApi.Client.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi.Client/Acme.BookStore.BookManagement.HttpApi.Client.csproj index 5b821bf6c3..a2fdfdf62d 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi.Client/Acme.BookStore.BookManagement.HttpApi.Client.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi.Client/Acme.BookStore.BookManagement.HttpApi.Client.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/Acme.BookStore.BookManagement.HttpApi.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/Acme.BookStore.BookManagement.HttpApi.csproj index 191d172412..246074bbdf 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/Acme.BookStore.BookManagement.HttpApi.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/Acme.BookStore.BookManagement.HttpApi.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/Acme.BookStore.BookManagement.MongoDB.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/Acme.BookStore.BookManagement.MongoDB.csproj index dd5bf6c2f7..68f65a2c1a 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/Acme.BookStore.BookManagement.MongoDB.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/Acme.BookStore.BookManagement.MongoDB.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContext.cs b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContext.cs index 9ee4ae0379..46bd6e13b1 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContext.cs +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContext.cs @@ -1,4 +1,6 @@ -using Volo.Abp.Data; +using Acme.BookStore.BookManagement.Books; +using MongoDB.Driver; +using Volo.Abp.Data; using Volo.Abp.MongoDB; namespace Acme.BookStore.BookManagement.MongoDB @@ -8,6 +10,8 @@ namespace Acme.BookStore.BookManagement.MongoDB { public static string CollectionPrefix { get; set; } = BookManagementConsts.DefaultDbTablePrefix; + public IMongoCollection Books => Collection(); + /* Add mongo collections here. Example: * public IMongoCollection Questions => Collection(); */ @@ -21,5 +25,6 @@ namespace Acme.BookStore.BookManagement.MongoDB options.CollectionPrefix = CollectionPrefix; }); } + } } \ No newline at end of file diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContextExtensions.cs b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContextExtensions.cs index f32ad21f3a..76c4f16ff9 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContextExtensions.cs +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbContextExtensions.cs @@ -1,4 +1,5 @@ using System; +using Acme.BookStore.BookManagement.Books; using Volo.Abp; using Volo.Abp.MongoDB; @@ -15,6 +16,11 @@ namespace Acme.BookStore.BookManagement.MongoDB var options = new BookManagementMongoModelBuilderConfigurationOptions(); optionsAction?.Invoke(options); + + builder.Entity(b => + { + b.CollectionName = options.CollectionPrefix + "Books"; + }); } } } \ No newline at end of file diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbModule.cs b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbModule.cs index 3f01a07f55..dd1c852c01 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbModule.cs +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/BookManagementMongoDbModule.cs @@ -14,6 +14,7 @@ namespace Acme.BookStore.BookManagement.MongoDB { context.Services.AddMongoDbContext(options => { + options.AddDefaultRepositories(); /* Add custom repositories here. Example: * options.AddRepository(); */ diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/IBookManagementMongoDbContext.cs b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/IBookManagementMongoDbContext.cs index 5df9220350..5d1c9e6525 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/IBookManagementMongoDbContext.cs +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/MongoDB/IBookManagementMongoDbContext.cs @@ -1,4 +1,6 @@ -using Volo.Abp.Data; +using Acme.BookStore.BookManagement.Books; +using MongoDB.Driver; +using Volo.Abp.Data; using Volo.Abp.MongoDB; namespace Acme.BookStore.BookManagement.MongoDB @@ -6,6 +8,8 @@ namespace Acme.BookStore.BookManagement.MongoDB [ConnectionStringName("BookManagement")] public interface IBookManagementMongoDbContext : IAbpMongoDbContext { + IMongoCollection Books { get; } + /* Define mongo collections here. Example: * IMongoCollection Questions { get; } */ diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/Acme.BookStore.BookManagement.Web.csproj b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/Acme.BookStore.BookManagement.Web.csproj index fd2fb9a015..c598fd0932 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/Acme.BookStore.BookManagement.Web.csproj +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/Acme.BookStore.BookManagement.Web.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj index 92b2378eef..463c12d939 100644 --- a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..aec5d0252d --- /dev/null +++ b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace Acme.BookStore.BookManagement +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Program.cs b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Program.cs index 9b6e256930..f69d97f590 100644 --- a/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; namespace Acme.BookStore.BookManagement { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj b/samples/BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj index ba56e3b6b0..f84f643d0a 100644 --- a/samples/BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj +++ b/samples/BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj b/samples/BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj index be36aa7a2c..ba6fe2cf12 100644 --- a/samples/BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj +++ b/samples/BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj b/samples/BookStore/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj index 6003aa8be2..c77b3ae1eb 100644 --- a/samples/BookStore/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj +++ b/samples/BookStore/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs b/samples/BookStore/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs new file mode 100644 index 0000000000..aef3d88bb5 --- /dev/null +++ b/samples/BookStore/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs @@ -0,0 +1,34 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Acme.BookStore.Data; +using Serilog; +using Volo.Abp; + +namespace Acme.BookStore.DbMigrator +{ + public class DbMigratorHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) + { + application.Initialize(); + + await application + .ServiceProvider + .GetRequiredService() + .MigrateAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore/src/Acme.BookStore.DbMigrator/Program.cs b/samples/BookStore/src/Acme.BookStore.DbMigrator/Program.cs index d3c4034c8a..179c18f4ca 100644 --- a/samples/BookStore/src/Acme.BookStore.DbMigrator/Program.cs +++ b/samples/BookStore/src/Acme.BookStore.DbMigrator/Program.cs @@ -1,39 +1,15 @@ -using System.IO; +using System.IO; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Acme.BookStore.Data; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -using Volo.Abp; -using Volo.Abp.Threading; namespace Acme.BookStore.DbMigrator { class Program { - static void Main(string[] args) - { - ConfigureLogging(); - - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - })) - { - application.Initialize(); - - AsyncHelper.RunSync( - () => application - .ServiceProvider - .GetRequiredService() - .MigrateAsync() - ); - - application.Shutdown(); - } - } - - private static void ConfigureLogging() + static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() @@ -48,6 +24,15 @@ namespace Acme.BookStore.DbMigrator .WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt")) .WriteTo.Console() .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj b/samples/BookStore/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj index d9a183a46f..2d65790558 100644 --- a/samples/BookStore/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj +++ b/samples/BookStore/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/samples/BookStore/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj b/samples/BookStore/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj index dc2df7a7fe..583d62d90f 100644 --- a/samples/BookStore/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj +++ b/samples/BookStore/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj b/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj index fadc1c8e0c..f8594c4ef9 100644 --- a/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj +++ b/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj b/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj index 028b89d57a..f26ef0b75c 100644 --- a/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj +++ b/samples/BookStore/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj b/samples/BookStore/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj index 1aaceaa8aa..c7f51afe34 100644 --- a/samples/BookStore/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj +++ b/samples/BookStore/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj b/samples/BookStore/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj index 1b664dea92..c9b3502524 100644 --- a/samples/BookStore/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj +++ b/samples/BookStore/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj b/samples/BookStore/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj index 832114ce3b..61c73a3da8 100644 --- a/samples/BookStore/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj +++ b/samples/BookStore/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj @@ -1,4 +1,4 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj b/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj index 01f80db3bd..ae2a3df88f 100644 --- a/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj +++ b/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/test/Acme.BookStore.Domain.Tests/Acme.BookStore.Domain.Tests.csproj b/samples/BookStore/test/Acme.BookStore.Domain.Tests/Acme.BookStore.Domain.Tests.csproj index af4d93ed74..1f9b387058 100644 --- a/samples/BookStore/test/Acme.BookStore.Domain.Tests/Acme.BookStore.Domain.Tests.csproj +++ b/samples/BookStore/test/Acme.BookStore.Domain.Tests/Acme.BookStore.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/test/Acme.BookStore.EntityFrameworkCore.Tests/Acme.BookStore.EntityFrameworkCore.Tests.csproj b/samples/BookStore/test/Acme.BookStore.EntityFrameworkCore.Tests/Acme.BookStore.EntityFrameworkCore.Tests.csproj index b326d0ccf5..dd2137ad06 100644 --- a/samples/BookStore/test/Acme.BookStore.EntityFrameworkCore.Tests/Acme.BookStore.EntityFrameworkCore.Tests.csproj +++ b/samples/BookStore/test/Acme.BookStore.EntityFrameworkCore.Tests/Acme.BookStore.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj index 7620a76c90..c4387a063f 100644 --- a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..e41ee7ed31 --- /dev/null +++ b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace Acme.BookStore.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs index ecef29d963..7d8265158b 100644 --- a/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/samples/BookStore/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; namespace Acme.BookStore.HttpApi.Client.ConsoleTestApp { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/BookStore/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj b/samples/BookStore/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj index 516e550f01..48bcc4510d 100644 --- a/samples/BookStore/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj +++ b/samples/BookStore/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/BookStore/test/Acme.BookStore.Web.Tests/Acme.BookStore.Web.Tests.csproj b/samples/BookStore/test/Acme.BookStore.Web.Tests/Acme.BookStore.Web.Tests.csproj index 30f34edd0d..bcf4331704 100644 --- a/samples/BookStore/test/Acme.BookStore.Web.Tests/Acme.BookStore.Web.Tests.csproj +++ b/samples/BookStore/test/Acme.BookStore.Web.Tests/Acme.BookStore.Web.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.Application.Contracts/DashboardDemo.Application.Contracts.csproj b/samples/DashboardDemo/src/DashboardDemo.Application.Contracts/DashboardDemo.Application.Contracts.csproj index eac22963c5..bcbbde642b 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Application.Contracts/DashboardDemo.Application.Contracts.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.Application.Contracts/DashboardDemo.Application.Contracts.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.Application/DashboardDemo.Application.csproj b/samples/DashboardDemo/src/DashboardDemo.Application/DashboardDemo.Application.csproj index 4161f43bf5..f47f8bac12 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Application/DashboardDemo.Application.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.Application/DashboardDemo.Application.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DashboardDemo.DbMigrator.csproj b/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DashboardDemo.DbMigrator.csproj index cb4d1b1604..469d5a2773 100644 --- a/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DashboardDemo.DbMigrator.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DashboardDemo.DbMigrator.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DbMigratorHostedService.cs b/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DbMigratorHostedService.cs new file mode 100644 index 0000000000..dcfd612adc --- /dev/null +++ b/samples/DashboardDemo/src/DashboardDemo.DbMigrator/DbMigratorHostedService.cs @@ -0,0 +1,34 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using DashboardDemo.Data; +using Serilog; +using Volo.Abp; + +namespace DashboardDemo.DbMigrator +{ + public class DbMigratorHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) + { + application.Initialize(); + + await application + .ServiceProvider + .GetRequiredService() + .MigrateAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/DashboardDemo/src/DashboardDemo.DbMigrator/Program.cs b/samples/DashboardDemo/src/DashboardDemo.DbMigrator/Program.cs index 3cfe1b680a..ccfa70ea32 100644 --- a/samples/DashboardDemo/src/DashboardDemo.DbMigrator/Program.cs +++ b/samples/DashboardDemo/src/DashboardDemo.DbMigrator/Program.cs @@ -1,39 +1,15 @@ -using System.IO; +using System.IO; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using DashboardDemo.Data; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -using Volo.Abp; -using Volo.Abp.Threading; namespace DashboardDemo.DbMigrator { class Program { - static void Main(string[] args) - { - ConfigureLogging(); - - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - })) - { - application.Initialize(); - - AsyncHelper.RunSync( - () => application - .ServiceProvider - .GetRequiredService() - .MigrateAsync() - ); - - application.Shutdown(); - } - } - - private static void ConfigureLogging() + static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() @@ -48,6 +24,15 @@ namespace DashboardDemo.DbMigrator .WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt")) .WriteTo.Console() .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/DashboardDemo/src/DashboardDemo.Domain.Shared/DashboardDemo.Domain.Shared.csproj b/samples/DashboardDemo/src/DashboardDemo.Domain.Shared/DashboardDemo.Domain.Shared.csproj index 81bef40c1b..287fa93f57 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Domain.Shared/DashboardDemo.Domain.Shared.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.Domain.Shared/DashboardDemo.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/samples/DashboardDemo/src/DashboardDemo.Domain/DashboardDemo.Domain.csproj b/samples/DashboardDemo/src/DashboardDemo.Domain/DashboardDemo.Domain.csproj index 4d8065b1d4..efc5e29899 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Domain/DashboardDemo.Domain.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.Domain/DashboardDemo.Domain.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/DashboardDemo.EntityFrameworkCore.DbMigrations.csproj b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/DashboardDemo.EntityFrameworkCore.DbMigrations.csproj index e276e160a2..c43e011cba 100644 --- a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/DashboardDemo.EntityFrameworkCore.DbMigrations.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/DashboardDemo.EntityFrameworkCore.DbMigrations.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore/DashboardDemo.EntityFrameworkCore.csproj b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore/DashboardDemo.EntityFrameworkCore.csproj index 7095ccc19e..4bf2843c3c 100644 --- a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore/DashboardDemo.EntityFrameworkCore.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore/DashboardDemo.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.HttpApi.Client/DashboardDemo.HttpApi.Client.csproj b/samples/DashboardDemo/src/DashboardDemo.HttpApi.Client/DashboardDemo.HttpApi.Client.csproj index 658ec3f724..4e61bfd981 100644 --- a/samples/DashboardDemo/src/DashboardDemo.HttpApi.Client/DashboardDemo.HttpApi.Client.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.HttpApi.Client/DashboardDemo.HttpApi.Client.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.HttpApi/DashboardDemo.HttpApi.csproj b/samples/DashboardDemo/src/DashboardDemo.HttpApi/DashboardDemo.HttpApi.csproj index 2afac6c2b8..b4887240c1 100644 --- a/samples/DashboardDemo/src/DashboardDemo.HttpApi/DashboardDemo.HttpApi.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.HttpApi/DashboardDemo.HttpApi.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/DashboardDemo.Web.csproj b/samples/DashboardDemo/src/DashboardDemo.Web/DashboardDemo.Web.csproj index f00f144407..eb2ba910aa 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/DashboardDemo.Web.csproj +++ b/samples/DashboardDemo/src/DashboardDemo.Web/DashboardDemo.Web.csproj @@ -1,4 +1,4 @@ - + @@ -33,7 +33,7 @@ - + diff --git a/samples/DashboardDemo/test/DashboardDemo.Application.Tests/DashboardDemo.Application.Tests.csproj b/samples/DashboardDemo/test/DashboardDemo.Application.Tests/DashboardDemo.Application.Tests.csproj index 66ac6f7698..06eddb4a01 100644 --- a/samples/DashboardDemo/test/DashboardDemo.Application.Tests/DashboardDemo.Application.Tests.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.Application.Tests/DashboardDemo.Application.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/test/DashboardDemo.Domain.Tests/DashboardDemo.Domain.Tests.csproj b/samples/DashboardDemo/test/DashboardDemo.Domain.Tests/DashboardDemo.Domain.Tests.csproj index 28f2ae7aee..ad14581a96 100644 --- a/samples/DashboardDemo/test/DashboardDemo.Domain.Tests/DashboardDemo.Domain.Tests.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.Domain.Tests/DashboardDemo.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/test/DashboardDemo.EntityFrameworkCore.Tests/DashboardDemo.EntityFrameworkCore.Tests.csproj b/samples/DashboardDemo/test/DashboardDemo.EntityFrameworkCore.Tests/DashboardDemo.EntityFrameworkCore.Tests.csproj index 2d4e5d409e..3ee3d1e46f 100644 --- a/samples/DashboardDemo/test/DashboardDemo.EntityFrameworkCore.Tests/DashboardDemo.EntityFrameworkCore.Tests.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.EntityFrameworkCore.Tests/DashboardDemo.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..b10baf1daa --- /dev/null +++ b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace DashboardDemo.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj index ad5b3b7caa..ea3b5f2a53 100644 --- a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/Program.cs b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/Program.cs index c48298d7d4..7ba0e8151e 100644 --- a/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/samples/DashboardDemo/test/DashboardDemo.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; namespace DashboardDemo.HttpApi.Client.ConsoleTestApp { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemo.TestBase.csproj b/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemo.TestBase.csproj index fc0fe296f5..7f010a8d7b 100644 --- a/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemo.TestBase.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemo.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/DashboardDemo/test/DashboardDemo.Web.Tests/DashboardDemo.Web.Tests.csproj b/samples/DashboardDemo/test/DashboardDemo.Web.Tests/DashboardDemo.Web.Tests.csproj index 91bf825be1..0ef41fe9c9 100644 --- a/samples/DashboardDemo/test/DashboardDemo.Web.Tests/DashboardDemo.Web.Tests.csproj +++ b/samples/DashboardDemo/test/DashboardDemo.Web.Tests/DashboardDemo.Web.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj index 47bf7813f8..158c9360ed 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj index a22e073228..bc29c3d237 100644 --- a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj +++ b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + diff --git a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj index 0e9b3e5faa..7ee4c756aa 100644 --- a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj +++ b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemo.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemoHostedService.cs b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemoHostedService.cs new file mode 100644 index 0000000000..e07c8564eb --- /dev/null +++ b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ConsoleClientDemoHostedService.cs @@ -0,0 +1,33 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Serilog; + +namespace ConsoleClientDemo +{ + public class ConsoleClientDemoHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.Services.AddLogging(loggingBuilder => + { + loggingBuilder.AddSerilog(dispose: true); + }); + })) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/samples/MicroserviceDemo/applications/ConsoleClientDemo/Program.cs b/samples/MicroserviceDemo/applications/ConsoleClientDemo/Program.cs index 9626e874a1..40082b1d2a 100644 --- a/samples/MicroserviceDemo/applications/ConsoleClientDemo/Program.cs +++ b/samples/MicroserviceDemo/applications/ConsoleClientDemo/Program.cs @@ -1,48 +1,14 @@ -using Serilog; -using Serilog.Events; -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; +using Serilog; +using Serilog.Events; namespace ConsoleClientDemo { internal class Program { - private static void Main(string[] args) - { - InitializeSerilog(); - - Log.Information("Starting ConsoleClientDemo..."); - - try - { - using (var application = AbpApplicationFactory.Create(options => - { - options.Services.AddLogging(loggingBuilder => - { - loggingBuilder.AddSerilog(dispose: true); - }); - })) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } - } - catch (Exception ex) - { - Log.Error(ex.Message); - Log.Error(ex.StackTrace); - throw; - } - } - - private static void InitializeSerilog() + static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() @@ -50,6 +16,17 @@ namespace ConsoleClientDemo .Enrich.FromLogContext() .WriteTo.File("Logs/logs.txt") .CreateLogger(); + + Log.Information("Starting ConsoleClientDemo..."); + + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj index 3b4780b2cd..2370ae2a7a 100644 --- a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj +++ b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj index 554555940d..89c3bdb5be 100644 --- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj index 73479d93ad..c46183b709 100644 --- a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + @@ -45,5 +45,4 @@ - diff --git a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj index 8ece4fe5f4..82f3b5440b 100644 --- a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + @@ -44,4 +44,4 @@ - \ No newline at end of file + diff --git a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj index cd5bbc8b01..5bb58b92ec 100644 --- a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + diff --git a/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj b/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj index b9dd199a6c..11f7485be2 100644 --- a/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + diff --git a/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj b/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj index dc4f6aface..133a7f70b6 100644 --- a/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -15,7 +15,7 @@ - + diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement.Application.Contracts.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement.Application.Contracts.csproj index dd5556e22c..0274d88e7f 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement.Application.Contracts.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement.Application.Contracts.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement.Application.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement.Application.csproj index e8979089f2..3ff28200ce 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement.Application.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement.Application.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement.Domain.Shared.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement.Domain.Shared.csproj index 18c95e3826..d39dd59d83 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement.Domain.Shared.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement.Domain.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement.Domain.csproj index c542289d4c..f739951b4e 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement.Domain.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement.Domain.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/ProductManagement.EntityFrameworkCore.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/ProductManagement.EntityFrameworkCore.csproj index 6fa636813c..1e7d3e5cfe 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/ProductManagement.EntityFrameworkCore.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/ProductManagement.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/ProductManagement.HttpApi.Client.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/ProductManagement.HttpApi.Client.csproj index 3ac801cadc..ddc1e0a023 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/ProductManagement.HttpApi.Client.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/ProductManagement.HttpApi.Client.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement.HttpApi.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement.HttpApi.csproj index de724336b5..a24813ac32 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement.HttpApi.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement.HttpApi.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagement.Web.csproj b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagement.Web.csproj index a4690d2ceb..d6e31e865c 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagement.Web.csproj +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagement.Web.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/ProductManagement.Application.Tests.csproj b/samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/ProductManagement.Application.Tests.csproj index 6e2e2fcd0f..87a2c15d52 100644 --- a/samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/ProductManagement.Application.Tests.csproj +++ b/samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/ProductManagement.Application.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/ProductManagement.Domain.Tests.csproj b/samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/ProductManagement.Domain.Tests.csproj index 4ba80b1a97..c09b228d30 100644 --- a/samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/ProductManagement.Domain.Tests.csproj +++ b/samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/ProductManagement.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj b/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj index 6a10664e46..9efdef58cf 100644 --- a/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj +++ b/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/ProductManagement.TestBase.csproj b/samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/ProductManagement.TestBase.csproj index 7d0ffde718..a23148b147 100644 --- a/samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/ProductManagement.TestBase.csproj +++ b/samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/ProductManagement.TestBase.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/samples/RabbitMqEventBus/App1/App1.csproj b/samples/RabbitMqEventBus/App1/App1.csproj index bc811a5de1..c6fede0a2c 100644 --- a/samples/RabbitMqEventBus/App1/App1.csproj +++ b/samples/RabbitMqEventBus/App1/App1.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/samples/RabbitMqEventBus/App2/App2.csproj b/samples/RabbitMqEventBus/App2/App2.csproj index bc811a5de1..c6fede0a2c 100644 --- a/samples/RabbitMqEventBus/App2/App2.csproj +++ b/samples/RabbitMqEventBus/App2/App2.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/samples/RabbitMqEventBus/SharedModule/SharedModule.csproj b/samples/RabbitMqEventBus/SharedModule/SharedModule.csproj index c659ddff0b..df09f473f1 100644 --- a/samples/RabbitMqEventBus/SharedModule/SharedModule.csproj +++ b/samples/RabbitMqEventBus/SharedModule/SharedModule.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json index d2cd576b43..838cf86bb6 100644 --- a/templates/app/angular/package.json +++ b/templates/app/angular/package.json @@ -13,11 +13,11 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "^2.0.0", - "@abp/ng.identity": "^2.0.0", - "@abp/ng.setting-management": "^2.0.0", - "@abp/ng.tenant-management": "^2.0.0", - "@abp/ng.theme.basic": "^2.0.0", + "@abp/ng.account": "^2.0.1", + "@abp/ng.identity": "^2.0.1", + "@abp/ng.setting-management": "^2.0.1", + "@abp/ng.tenant-management": "^2.0.1", + "@abp/ng.theme.basic": "^2.0.1", "@angular/animations": "~8.2.14", "@angular/common": "~8.2.14", "@angular/compiler": "~8.2.14", diff --git a/templates/app/angular/src/app/shared/shared.module.ts b/templates/app/angular/src/app/shared/shared.module.ts index 6bae4ea332..6c4c9b016c 100644 --- a/templates/app/angular/src/app/shared/shared.module.ts +++ b/templates/app/angular/src/app/shared/shared.module.ts @@ -4,11 +4,26 @@ import { NgModule } from '@angular/core'; import { ThemeBasicModule } from '@abp/ng.theme.basic'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { TableModule } from 'primeng/table'; +import { NgxValidateCoreModule } from '@ngx-validate/core'; @NgModule({ declarations: [], - imports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], - exports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], + imports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], + exports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], providers: [], }) export class SharedModule {} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj index 90af8423a9..818b7059de 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj index 165267af77..583492c8b1 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs new file mode 100644 index 0000000000..730a7f7369 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs @@ -0,0 +1,34 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using MyCompanyName.MyProjectName.Data; +using Serilog; +using Volo.Abp; + +namespace MyCompanyName.MyProjectName.DbMigrator +{ + public class DbMigratorHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create(options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) + { + application.Initialize(); + + await application + .ServiceProvider + .GetRequiredService() + .MigrateAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj index 0f2e701d93..a4e6b5adb1 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/Program.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/Program.cs index 1a9175bbee..d1556ea371 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/Program.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/Program.cs @@ -1,39 +1,15 @@ -using System.IO; +using System.IO; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using MyCompanyName.MyProjectName.Data; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -using Volo.Abp; -using Volo.Abp.Threading; namespace MyCompanyName.MyProjectName.DbMigrator { class Program { - static void Main(string[] args) - { - ConfigureLogging(); - - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - })) - { - application.Initialize(); - - AsyncHelper.RunSync( - () => application - .ServiceProvider - .GetRequiredService() - .MigrateAsync() - ); - - application.Shutdown(); - } - } - - private static void ConfigureLogging() + static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() @@ -48,6 +24,15 @@ namespace MyCompanyName.MyProjectName.DbMigrator .WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt")) .WriteTo.Console() .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hant.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hant.json new file mode 100644 index 0000000000..31e0ab5a47 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hant.json @@ -0,0 +1,8 @@ +{ + "culture": "zh-Hant", + "texts": { + "Menu:Home": "首頁", + "Welcome": "歡迎", + "LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io." + } + } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj index 262569df97..f0b3cc8b33 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs index f6fd008e66..cde75d4ca7 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs @@ -1,8 +1,12 @@ -using System.Threading.Tasks; +using System; +using System.Linq; +using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; +using Volo.Abp.TenantManagement; namespace MyCompanyName.MyProjectName.Data { @@ -12,13 +16,19 @@ namespace MyCompanyName.MyProjectName.Data private readonly IDataSeeder _dataSeeder; private readonly IMyProjectNameDbSchemaMigrator _dbSchemaMigrator; + private readonly ITenantRepository _tenantRepository; + private readonly ICurrentTenant _currentTenant; public MyProjectNameDbMigrationService( IDataSeeder dataSeeder, - IMyProjectNameDbSchemaMigrator dbSchemaMigrator) + IMyProjectNameDbSchemaMigrator dbSchemaMigrator, + ITenantRepository tenantRepository, + ICurrentTenant currentTenant) { _dataSeeder = dataSeeder; _dbSchemaMigrator = dbSchemaMigrator; + _tenantRepository = tenantRepository; + _currentTenant = currentTenant; Logger = NullLogger.Instance; } @@ -27,13 +37,43 @@ namespace MyCompanyName.MyProjectName.Data { Logger.LogInformation("Started database migrations..."); - Logger.LogInformation("Migrating database schema..."); + await MigrateHostDatabaseAsync(); + + var i = 0; + var tenants = await _tenantRepository.GetListAsync(); + foreach (var tenant in tenants) + { + i++; + + using (_currentTenant.Change(tenant.Id)) + { + Logger.LogInformation($"Migrating {tenant.Name} database schema... ({i} of {tenants.Count})"); + await MigrateTenantDatabasesAsync(tenant); + Logger.LogInformation($"Successfully completed {tenant.Name} database migrations."); + } + } + + Logger.LogInformation("Successfully completed database migrations."); + } + + private async Task MigrateHostDatabaseAsync() + { + Logger.LogInformation("Migrating host database schema..."); await _dbSchemaMigrator.MigrateAsync(); - Logger.LogInformation("Executing database seed..."); + Logger.LogInformation("Executing host database seed..."); await _dataSeeder.SeedAsync(); - Logger.LogInformation("Successfully completed database migrations."); + Logger.LogInformation("Successfully completed host database migrations."); + } + + private async Task MigrateTenantDatabasesAsync(Tenant tenant) + { + Logger.LogInformation($"Migrating schema for {tenant.Name} database..."); + await _dbSchemaMigrator.MigrateAsync(); + + Logger.LogInformation($"Executing {tenant.Name} tenant database seed..."); + await _dataSeeder.SeedAsync(tenant.Id); } } } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj index 13a78ff079..2078a20b56 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreMyProjectNameDbSchemaMigrator.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreMyProjectNameDbSchemaMigrator.cs index 7064697d1a..71bd4e9059 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreMyProjectNameDbSchemaMigrator.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreMyProjectNameDbSchemaMigrator.cs @@ -1,24 +1,36 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; using MyCompanyName.MyProjectName.Data; using Volo.Abp.DependencyInjection; namespace MyCompanyName.MyProjectName.EntityFrameworkCore { [Dependency(ReplaceServices = true)] - public class EntityFrameworkCoreMyProjectNameDbSchemaMigrator + public class EntityFrameworkCoreMyProjectNameDbSchemaMigrator : IMyProjectNameDbSchemaMigrator, ITransientDependency { - private readonly MyProjectNameMigrationsDbContext _dbContext; + private readonly IServiceProvider _serviceProvider; - public EntityFrameworkCoreMyProjectNameDbSchemaMigrator(MyProjectNameMigrationsDbContext dbContext) + public EntityFrameworkCoreMyProjectNameDbSchemaMigrator( + IServiceProvider serviceProvider) { - _dbContext = dbContext; + _serviceProvider = serviceProvider; } public async Task MigrateAsync() { - await _dbContext.Database.MigrateAsync(); + /* We intentionally resolving the MyProjectNameMigrationsDbContext + * from IServiceProvider (instead of directly injecting it) + * to properly get the connection string of the current tenant in the + * current scope. + */ + + await _serviceProvider + .GetRequiredService() + .Database + .MigrateAsync(); } } } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations.csproj index a16e4c2ca5..cc8c7876ee 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj index b6a1de012d..f6bb500e62 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj index 42d25166ef..4c70886aaa 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj index d41d991542..20d35f5d01 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj @@ -1,4 +1,4 @@ - + @@ -6,14 +6,14 @@ netcoreapp3.1 MyCompanyName.MyProjectName true - MyCompanyName-MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c + MyCompanyName.MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index 401c3641fc..63b9689b18 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -113,6 +113,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj index 9c7f66798e..5b8db548fd 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj @@ -1,4 +1,4 @@ - + @@ -6,14 +6,14 @@ netcoreapp3.1 MyCompanyName.MyProjectName true - MyCompanyName-MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c + MyCompanyName.MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index beeca41292..80aa44c647 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -122,6 +122,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json index e045906f81..96b4f2fdbf 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock index 677a417b16..3ef9fe6a7f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj index 639a3115bd..00f7d4477f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj index 6ff7bde240..160fcffc46 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ true false true - MyCompanyName-MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c + MyCompanyName.MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index 1dfe7f56eb..c20e77adf1 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -61,6 +61,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); Configure(options => diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json index ee7a512dc8..5aa3341b9c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-identityserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock index cbe246e8e3..8d232d1d09 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj index 178ad5de8c..d17f40e727 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 0bff1f34fc..697cbe1b44 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -1,4 +1,4 @@ - + @@ -12,14 +12,14 @@ true false true - MyCompanyName-MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c + MyCompanyName.MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json index e045906f81..96b4f2fdbf 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock index cbe246e8e3..8d232d1d09 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index db3998cc62..ce1087911b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ true false true - MyCompanyName-MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c + MyCompanyName.MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c @@ -35,7 +35,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 697abb9ce2..89cf3c1358 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -154,6 +154,7 @@ namespace MyCompanyName.MyProjectName.Web options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json index e045906f81..96b4f2fdbf 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock index 677a417b16..3ef9fe6a7f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj index c23b6af8d5..05ccfc13de 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj index 12f900e989..72183bd433 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj index ad2d6683a1..96034c840f 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..ae929ced30 --- /dev/null +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj index b03bbcef1a..a70855393d 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs index ada0212483..1e24d8a349 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; namespace MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj index caab5d1c24..db0433cdae 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj index b1f6aa363f..15eebd7f35 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Web.Tests/MyCompanyName.MyProjectName.Web.Tests.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Web.Tests/MyCompanyName.MyProjectName.Web.Tests.csproj index 92649a5877..0805fabd29 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Web.Tests/MyCompanyName.MyProjectName.Web.Tests.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Web.Tests/MyCompanyName.MyProjectName.Web.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/angular/package.json b/templates/module/angular/package.json index 462f0e3766..f010e4687f 100644 --- a/templates/module/angular/package.json +++ b/templates/module/angular/package.json @@ -12,11 +12,11 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "^2.0.0", - "@abp/ng.theme.basic": "^2.0.0", - "@abp/ng.identity": "^2.0.0", - "@abp/ng.tenant-management": "^2.0.0", - "@abp/ng.setting-management": "^2.0.0", + "@abp/ng.account": "^2.0.1", + "@abp/ng.theme.basic": "^2.0.1", + "@abp/ng.identity": "^2.0.1", + "@abp/ng.tenant-management": "^2.0.1", + "@abp/ng.setting-management": "^2.0.1", "@angular/animations": "~8.2.14", "@angular/common": "~8.2.14", "@angular/compiler": "~8.2.14", diff --git a/templates/module/angular/projects/my-project-name-config/package.json b/templates/module/angular/projects/my-project-name-config/package.json index 4f2733020b..295cda7b47 100644 --- a/templates/module/angular/projects/my-project-name-config/package.json +++ b/templates/module/angular/projects/my-project-name-config/package.json @@ -2,6 +2,6 @@ "name": "my-project-name.config", "version": "0.0.1", "peerDependencies": { - "@abp/ng.core": ">=2.0.0" + "@abp/ng.core": ">=2.0.1" } } diff --git a/templates/module/angular/projects/my-project-name/package.json b/templates/module/angular/projects/my-project-name/package.json index 3a47047c11..1af22c7fee 100644 --- a/templates/module/angular/projects/my-project-name/package.json +++ b/templates/module/angular/projects/my-project-name/package.json @@ -2,7 +2,7 @@ "name": "my-project-name", "version": "0.0.1", "dependencies": { - "@abp/ng.theme.shared": "^2.0.0", + "@abp/ng.theme.shared": "^2.0.1", "my-project-name.config": "^0.0.1" } } diff --git a/templates/module/angular/src/app/shared/shared.module.ts b/templates/module/angular/src/app/shared/shared.module.ts index 6bae4ea332..6c4c9b016c 100644 --- a/templates/module/angular/src/app/shared/shared.module.ts +++ b/templates/module/angular/src/app/shared/shared.module.ts @@ -4,11 +4,26 @@ import { NgModule } from '@angular/core'; import { ThemeBasicModule } from '@abp/ng.theme.basic'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { TableModule } from 'primeng/table'; +import { NgxValidateCoreModule } from '@ngx-validate/core'; @NgModule({ declarations: [], - imports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], - exports: [CoreModule, ThemeSharedModule, ThemeBasicModule, TableModule, NgbDropdownModule], + imports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], + exports: [ + CoreModule, + ThemeSharedModule, + ThemeBasicModule, + TableModule, + NgbDropdownModule, + NgxValidateCoreModule, + ], providers: [], }) export class SharedModule {} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Host.Shared/MyCompanyName.MyProjectName.Host.Shared.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Host.Shared/MyCompanyName.MyProjectName.Host.Shared.csproj index 9b5949c5fe..8cb063a10b 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Host.Shared/MyCompanyName.MyProjectName.Host.Shared.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Host.Shared/MyCompanyName.MyProjectName.Host.Shared.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectHttpApiHostMigrationsDbContext.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectNameHttpApiHostMigrationsDbContext.cs similarity index 61% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectHttpApiHostMigrationsDbContext.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectNameHttpApiHostMigrationsDbContext.cs index 1e3386b031..64faa3f630 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectHttpApiHostMigrationsDbContext.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectNameHttpApiHostMigrationsDbContext.cs @@ -3,9 +3,9 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.EntityFrameworkCore { - public class MyProjectHttpApiHostMigrationsDbContext : AbpDbContext + public class MyProjectNameHttpApiHostMigrationsDbContext : AbpDbContext { - public MyProjectHttpApiHostMigrationsDbContext(DbContextOptions options) + public MyProjectNameHttpApiHostMigrationsDbContext(DbContextOptions options) : base(options) { diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectHttpApiHostMigrationsDbContextFactory.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectNameHttpApiHostMigrationsDbContextFactory.cs similarity index 60% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectHttpApiHostMigrationsDbContextFactory.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectNameHttpApiHostMigrationsDbContextFactory.cs index 8b83ae0091..f396202197 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectHttpApiHostMigrationsDbContextFactory.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/EntityFrameworkCore/MyProjectNameHttpApiHostMigrationsDbContextFactory.cs @@ -5,16 +5,16 @@ using Microsoft.Extensions.Configuration; namespace MyCompanyName.MyProjectName.EntityFrameworkCore { - public class MyProjectHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory + public class MyProjectNameHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory { - public MyProjectHttpApiHostMigrationsDbContext CreateDbContext(string[] args) + public MyProjectNameHttpApiHostMigrationsDbContext CreateDbContext(string[] args) { var configuration = BuildConfiguration(); - var builder = new DbContextOptionsBuilder() - .UseSqlServer(configuration.GetConnectionString("Default")); + var builder = new DbContextOptionsBuilder() + .UseSqlServer(configuration.GetConnectionString("MyProjectName")); - return new MyProjectHttpApiHostMigrationsDbContext(builder.Options); + return new MyProjectNameHttpApiHostMigrationsDbContext(builder.Options); } private static IConfigurationRoot BuildConfiguration() diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj index f041445109..897e84c66e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj @@ -1,4 +1,4 @@ - + @@ -6,13 +6,13 @@ netcoreapp3.1 MyCompanyName.MyProjectName true - MyCompanyName-MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 + MyCompanyName.MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 - + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index 8ebec4ad9b..b501ed5fe5 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -88,6 +88,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); //Updates AbpClaimTypes to be compatible with identity server claims. diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj index 2815d81262..946f3156f4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj @@ -1,16 +1,16 @@ - + netcoreapp3.1 MyCompanyName.MyProjectName true - MyCompanyName-MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 + MyCompanyName.MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 - + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index 4be099efaa..b92fe455b5 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -99,6 +99,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); Configure(options => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json index ee7a512dc8..5aa3341b9c 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-identityserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock index cbe246e8e3..8d232d1d09 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 6d6b11231a..338f55bc5f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -1,4 +1,4 @@ - + @@ -6,16 +6,17 @@ netcoreapp3.1 MyCompanyName.MyProjectName true - MyCompanyName-MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 + MyCompanyName.MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 - + + @@ -27,6 +28,7 @@ + @@ -50,11 +52,5 @@ Always - - - - ..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Serilog\bin\Debug\netcoreapp3.1\Volo.Abp.AspNetCore.Serilog.dll - - - + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json index e045906f81..96b4f2fdbf 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock index cbe246e8e3..8d232d1d09 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj index 47f8629dde..9277615d12 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj @@ -1,4 +1,4 @@ - + @@ -6,13 +6,13 @@ netcoreapp3.1 MyCompanyName.MyProjectName true - MyCompanyName-MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 + MyCompanyName.MyProjectName-c2d31439-b723-48e2-b061-5ebd7aeb6010 - + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs index aa253e89d3..cdd5de9398 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs @@ -98,7 +98,8 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português (Brasil)")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); - options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "Chinese")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); Configure(options => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json index e045906f81..96b4f2fdbf 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^2.0.1" } } \ No newline at end of file diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock index b21a160d43..521220bb7e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.0.tgz#824f69bbbf868e4d72c36a0c6d0d11e18bd055b1" - integrity sha512-x3899Y+XZPj1z9aO0sqxsbwFebHCoEaLedcVEOJugJxM9JXfKuNG3tlvuurLirdaFQAs6WoMCFsQ9sbR8ZHm2w== +"@abp/aspnetcore.mvc.ui.theme.basic@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.0.1.tgz#e336c8e3b52b04177fc4039c54f67984f8230f6f" + integrity sha512-yMYL8Q1DdS5Dt8nHz5K0ca+4uQ853iOLts/gWmJ4YybWxn4BMu17hlFWpdbmYrtLCW8n45yRYy8dp+9go8zCQw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "^2.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.0.tgz#9859308a910ecd89fd008bc9622c0fd2ca10e5c6" - integrity sha512-fGIEOY3i9DgrEYay1B+IiTkBW94bBY9Fk0bou6ULxvb0jndqAnuws1mifBUrvKIF2cjKKBxO2iqBZ5n2IbHLhA== - dependencies: - "@abp/aspnetcore.mvc.ui" "^2.0.0" - "@abp/bootstrap" "^2.0.0" - "@abp/bootstrap-datepicker" "^2.0.0" - "@abp/datatables.net-bs4" "^2.0.0" - "@abp/font-awesome" "^2.0.0" - "@abp/jquery-form" "^2.0.0" - "@abp/jquery-validation-unobtrusive" "^2.0.0" - "@abp/lodash" "^2.0.0" - "@abp/luxon" "^2.0.0" - "@abp/malihu-custom-scrollbar-plugin" "^2.0.0" - "@abp/select2" "^2.0.0" - "@abp/sweetalert" "^2.0.0" - "@abp/timeago" "^2.0.0" - "@abp/toastr" "^2.0.0" - -"@abp/aspnetcore.mvc.ui@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.0.tgz#d7e67b99e6c31e670337e787d55dd49f81717155" - integrity sha512-fNxQINx6COagbA2UepOMgOZg6dqXlEKbiftSt+/yhUVkMW3+c8IILJODyHxAaJfGrYjHqKAcyItqR7vVCWDYsw== +"@abp/aspnetcore.mvc.ui.theme.shared@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.0.1.tgz#2bad208bfc422e6be12f22431c713180d924e17c" + integrity sha512-6/ZnF4dFbmpiqDIx3Lc2NJpCNcpmvrEh6kDZC5x9q3ICTPK/CgspM7dVG2dSpFFkXbDNoGH6i/wJwEUWHOKzYQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "^2.0.1" + "@abp/bootstrap" "^2.0.1" + "@abp/bootstrap-datepicker" "^2.0.1" + "@abp/datatables.net-bs4" "^2.0.1" + "@abp/font-awesome" "^2.0.1" + "@abp/jquery-form" "^2.0.1" + "@abp/jquery-validation-unobtrusive" "^2.0.1" + "@abp/lodash" "^2.0.1" + "@abp/luxon" "^2.0.1" + "@abp/malihu-custom-scrollbar-plugin" "^2.0.1" + "@abp/select2" "^2.0.1" + "@abp/sweetalert" "^2.0.1" + "@abp/timeago" "^2.0.1" + "@abp/toastr" "^2.0.1" + +"@abp/aspnetcore.mvc.ui@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.0.1.tgz#2c319182f7ab5f99059df4d36cf894deeba20023" + integrity sha512-bLTyfqoPrzHrdPIw3twJrILO99fzHJZrUJmJDuk5cT1Ox+bCv3AAxi7UEEaOQdjDdZlURq86SKM5x/EndeGpHA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,135 +41,135 @@ path "^0.12.7" rimraf "^3.0.0" -"@abp/bootstrap-datepicker@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.0.tgz#e55064d554163865c3c4871c10cc8e8416cccbf4" - integrity sha512-kz6RYUDO6txf9gJXxXLL3aboM4OjJWwtdMD0pwhwWJCujqjaQi3YJIGZFXAxO2GhUq5bqX+KaBdOqdMl0gIasA== +"@abp/bootstrap-datepicker@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.0.1.tgz#458361b7c7ba8c4fc260e9117ae52f054cbab705" + integrity sha512-mkF2ioq1UxOw7K2IDzzjuLco/V/HNkB5t7HqDfnNt9JFEt71ms2xRFe8KLxpr9MUWB9MdzlGo4ywyHzGxA61mg== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.0.tgz#1c12edc28a9400a349049ab60f43a8123da0f2b0" - integrity sha512-sim0zmmUqtTvFDn4RQxJZPHCH4kxHsuep63O86sfn3XjgU8FDw6C2AP7j0l+q2yDt94qKTUMxg17MWDr5DqEEA== +"@abp/bootstrap@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.0.1.tgz#78d6a7c0787787fd92f8d19c7f8cfee05d8f863e" + integrity sha512-GFAho519IBIK0199LCK5NpuaG44w0Tmjjmxns3V+MbzdXGa5d3hZzuPDhYv6hOB9Aj5d0UIqT39KmvrbHAgvuQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" bootstrap "^4.3.1" -"@abp/core@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.0.tgz#19368fc332eec89d6442e6b991eed72af92f8ec8" - integrity sha512-aPb4anAZhmVxJrPnBNT33bRkYLUMmCqpPIrN+NCqejwiEIg5jb4zu4bOS71/oTxViNRF5S/XzKF6ceLD+CVq4g== +"@abp/core@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.0.1.tgz#441b231f7deb4356f71fdc853873ee3e7eacebea" + integrity sha512-5m5Buci+efcmkxPkVWAIAad6idvXS5qSqK/oq8fJj2I4J95ug8CUWRwg7cFzZGLljUKX6kEbCtB//NBCoI+aJA== -"@abp/datatables.net-bs4@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.0.tgz#bb7f1eddd0dee5ba8fb7a8e760d6b6fdc9374a65" - integrity sha512-7kCD4WhszgQOCQsAvXUGdDSqi+ZRWqENzjxoPQa9oPxFD2hy3AshYMvc+JQC71Pbp6YIZU09LV3pGkFPHO7lOw== +"@abp/datatables.net-bs4@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.0.1.tgz#fac4afdd44784f3cdd395830cda4b2781a817c05" + integrity sha512-jD2cxrPSxfzjM6xSDBiHJuxk6wj6wBQsD4+Go0kOicQSEzDef9CCN8hi8NsCITosAXVAEIoHGwE1uTlK6sir5Q== dependencies: - "@abp/datatables.net" "^2.0.0" + "@abp/datatables.net" "^2.0.1" datatables.net-bs4 "^1.10.20" -"@abp/datatables.net@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.0.tgz#43fa36590373dccffc3f4402b2c94777c9ce70cd" - integrity sha512-xSUkrpWUfzqPIbo5pI6gcrrbc2R2yBlq+TLxry064ILHfGvZI8lwmv9rEkPP/hBTvk1YnzaZScFneaA0xJn9hw== +"@abp/datatables.net@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.0.1.tgz#3a0a5e5a836fe058d43798139349d92996ea9478" + integrity sha512-xEsvLofWj0W1ieplwEM4j5SEpoW3zS/yRQczHGMWBTR1Uazy0ysqQwMau+nRsNz7z12cFfooVG2mNzfkWRa84g== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" datatables.net "^1.10.20" -"@abp/font-awesome@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.0.tgz#aed2718808820f2cbe54edf09a23a65d819a798d" - integrity sha512-zfNjgnvOnCQQh4egk3NE7e6FbaDbjCzFnVDiHelM+9R6GAfDZTMS9jm3X+vDrn8vQfqQmDpzTpcz0v0IMNM8/g== +"@abp/font-awesome@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.0.1.tgz#738e5d8a93c29ba13f019a1f0198b9272c644e5c" + integrity sha512-+2yQ3RRMTkj0QsxbYB1gHzqEM+/yiFpuXakKTHxFnCZjgZhmmU229hm14xWbpyWsKohbtrr4R/te1WBrqryqPA== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" "@fortawesome/fontawesome-free" "^5.11.2" -"@abp/jquery-form@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.0.tgz#b987944d1aff79c540c951cca020ec49e1a0a004" - integrity sha512-2JmXIbeTM+9RQSTFOurbL6Vk0WR2RbwU+ApKVYJhF7NxEdE9cMGTrs1Z2xF85h28VrVAtPnpApd9ORaopSqaYQ== +"@abp/jquery-form@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.0.1.tgz#e92b9ad75a4f08c63b1005d97d8baeb689ebfe6c" + integrity sha512-A/imqgswwLrU+mR1oyDeVW5PDCIBQk/sMtU/PvRXaNL9c59nU5EVWIuPzORDzpkoECtuNMqStjERHc9IROMjnA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-form "^4.2.2" -"@abp/jquery-validation-unobtrusive@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.0.tgz#75d4f54732a4608542d968874e676f3de08126bf" - integrity sha512-CfU9/Q2dsaqLAWvqEb/VgMvJ5RC2IoSSW7l8SbduKOzqg7FiiBOpOd1AcqApjh0vuzZrRj+HcuoFBE+jWiberw== +"@abp/jquery-validation-unobtrusive@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.0.1.tgz#e4ed82f6432bba68139210552a9e7800d838d788" + integrity sha512-72XyC3megf6VXm283pCXB5kctbNLmI/EtfoIEp+FffTUmxCoL+gEEnqb1V+7dMUm5QYCNDnhYWk7K6TTxBPGPw== dependencies: - "@abp/jquery-validation" "^2.0.0" + "@abp/jquery-validation" "^2.0.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.0.tgz#e8afe0e677f8a7ec1fd7818b916b1894904d3cc3" - integrity sha512-cjkk5TJyr09H6EO13/GtiIRZv/1FP94IX2tVstqtOa5x8uI8HWCgFpPrchg9ldBsBoBelyExoISjlzqiKNkIHA== +"@abp/jquery-validation@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.0.1.tgz#f0287d8687275b400a15d4ce8dc76d40b8b38cee" + integrity sha512-18teWDVaMVHGEHc8eGuK7yUG+H6HxlKBRtB0L+VCYiUYsnTKshu+4DvSf0QTtGcbKquY8ui9AwgDnWZJ8Qqjqg== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" jquery-validation "^1.19.1" -"@abp/jquery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.0.tgz#71781f3ad1914c1d2a516c7157080d7c82c9b7aa" - integrity sha512-2EfGIiSaXPTxfdb/jomae75Y77OlS4H+G1oWz7L6XDhBIzctVivbOKSJim3BI2no1GJWOM/U1r1TKEKzwJyY4Q== +"@abp/jquery@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.0.1.tgz#0048b2344523c1c1d602d81291adf35fe9234d62" + integrity sha512-daM0nlxHW3iGoLh8sq03/co2dF9aM6LYqj5hFAHnmwx0UunDnS0rXkgbRieu66tGPvk325Qb2S1Ibpjn8/CqAQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" jquery "^3.4.1" -"@abp/lodash@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.0.tgz#ac5697a32a0ab0b3a0420c90ada1b87b853d19bc" - integrity sha512-QZWrDDfCjyW+q5lauwyrdFmsoDTC154k9ZZAkgAt9lJ6bbBWvDFgNEevg9etfh6heTBzBO7v7ftqDTt01/ArCQ== +"@abp/lodash@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.0.1.tgz#2f8932eddcc54d569ff37525d5da5219c68247c4" + integrity sha512-YsnQwXDH1EAz/fUs42E5TxclMaHN00oSWqGNmWrVqPMIw671sjyFf8QwQWIQujlo/7hXNYMxwmh5VGqR0TKNqQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" lodash "^4.17.15" -"@abp/luxon@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.0.tgz#3bb3c3fcb0a9d74161a9f82afd840f9fdbffd42e" - integrity sha512-DloPuJrAcpgcPGkuaJCi9XfC+2JsKPxFXTtxNlgkEaTuFwKnrWeGSOZqwedfawnQA+YPGGg1hz+7+WPb0X4Fog== +"@abp/luxon@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.0.1.tgz#6d0780254699171a509ab6bd5b1dd1a6ebc96468" + integrity sha512-tVdGgfH/ZvKAUYDiVB9x7WnyrXtUQGl7grvdFnXU8fzH0X8HNsQ4cSswlfMNQhiew8es93UqsjCx9VU8wZT08g== dependencies: luxon "^1.21.3" -"@abp/malihu-custom-scrollbar-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.0.tgz#6df2bcf1a3413880ebcf45017fe4966ad01e4fb9" - integrity sha512-ZqfVJyEMykg7IqemxV1jZ4FXu74F3eT8Be2EobSrc0avx27Oh6sD38TvgPv3e4etDbCekZYG1J7glKY7RzNPYw== +"@abp/malihu-custom-scrollbar-plugin@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.0.1.tgz#7099199447db1d49eebd12519bbecba80a49c243" + integrity sha512-Ljqt/poELw9xGr+fh29Ui/cA1zFLcOTZzy6/OyGUWW+BaMGjY8CY5k47ZlI0Vo3MGZpHu0AECKF95/P0RqBd9w== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.0.tgz#252710d172c7a7385f41292d3d3400c68ed93dbb" - integrity sha512-kRNuVdr5EbFQxXD7Fq8H3bYJo3bmE7QsIlxZQeSl6xfBK4nYGeLJ6ZGPwzKPFN9P6sfpZ4TBM2eOie9LgmHWLA== +"@abp/select2@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.0.1.tgz#f274a3fc51e79fd556012844b54bbbfa0d7fedbf" + integrity sha512-RertY05XH+UWp+zipVt0BKGW7Rm3Yn5EZOKKTwlFJ0ciUfPRxkVl70I4xSEgm3Naq83WEH2MmwyOx4yntKZoaQ== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" select2 "^4.0.12" -"@abp/sweetalert@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.0.tgz#2bb99ba7c0b6154181bce8fc5a959d4520032279" - integrity sha512-uotKepUBfQL8hrwSxSDLBLiAesIZ8low6OLsFIXqkUDDQIgKWUpPBuTbP7XGiHvHBOXXLxmpQ+YeYe72eOPtXQ== +"@abp/sweetalert@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.0.1.tgz#8198f43855392d0c07eeb0faac0d68ed5bbdf6b2" + integrity sha512-ZfbQqUNc1PuzchZzCnmhPMuy2mXAvtVEi3CZiLLAy2DHq+jf3Q3jUG9X6hZiqGuyl+Aq5htTX3HLfimca+gVxg== dependencies: - "@abp/core" "^2.0.0" + "@abp/core" "^2.0.1" sweetalert "^2.1.2" -"@abp/timeago@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.0.tgz#6e410cbf09e252b9eb1cf03cdc7ea62424249694" - integrity sha512-rtZ/avYpCTIDq4ZjIxaSQxN9wuRnQwhZ+dS1HfHb2NZK2sqJnb+iH7Nm9IQPHk7y89mgSrMWskYW91KaABSolw== +"@abp/timeago@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.0.1.tgz#1f82b07abc281363ada06909143ff09adcee2c13" + integrity sha512-zxvoOt2N7ikF1lZ5EBbSWuNdPsn6Z1O+JtnF5B73WEZ0JGp3wVrLN10RkvHLyDqI86dn0SKrocXvFCMEIot7vA== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" timeago "^1.6.7" -"@abp/toastr@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.0.tgz#a87591132c5586b16d521346ae9012affed0e3cd" - integrity sha512-SC8zWe87Kyec7mIsp9LRSmOlBfu+a1X658oS2eP/NscirU8tCnhvl/F2PeHWLjE8zkULLd8GZ8ht/XSU1gtTpg== +"@abp/toastr@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.0.1.tgz#3f41d53bdb66a0b1fe400ae190958540ce2616c1" + integrity sha512-cgOlPVuOyw+4Av9ZXqaQIdKzMTJCpxdd60hSm4drYoq0m7wQADL0X5LB7rH/8i/oPvn+BAD2gRomGZEhTSgouw== dependencies: - "@abp/jquery" "^2.0.0" + "@abp/jquery" "^2.0.1" toastr "^2.1.4" "@fortawesome/fontawesome-free@^5.11.2": diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj index fba582f665..c572d2bee1 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj index 04cbe3d9c1..c24b0db2a5 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj index 6afc84fe77..3483fb41cd 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj index 26ff6449ea..2902edbe3d 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj @@ -1,4 +1,4 @@ - + @@ -12,4 +12,4 @@ - \ No newline at end of file + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj index 6060761768..101992f75e 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj @@ -1,9 +1,9 @@ - + - netstandard2.1 + netstandard2.0 MyCompanyName.MyProjectName diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj index de13c7ca19..1466849524 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj index ba4e986b5c..df14ec39e9 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj index 05e4a798d6..0d2c58c6a4 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index bb17b03a01..41e6fc059d 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj index 3aab1f8ff9..d3561b3d90 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj index fec1bbe88b..968f46f080 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj index e45d914ca5..4448a56b41 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000000..1ea99ce263 --- /dev/null +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj index 98be0699f3..35f7e7344c 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs index 23192c4e92..1e24d8a349 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/Program.cs @@ -1,24 +1,21 @@ -using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; -using Volo.Abp.Threading; +using Microsoft.Extensions.Hosting; -namespace MyCompanyName.MyProjectName +namespace MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) - { - application.Initialize(); - - var demo = application.ServiceProvider.GetRequiredService(); - AsyncHelper.RunSync(() => demo.RunAsync()); - - Console.WriteLine("Press ENTER to stop application..."); - Console.ReadLine(); - } + await CreateHostBuilder(args).RunConsoleAsync(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); } } diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj index 6ad7da064f..e2e63120e2 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj index 0345987266..33361c5f89 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj @@ -1,4 +1,4 @@ - + diff --git a/test-all.ps1 b/test-all.ps1 deleted file mode 100644 index 10ed0a9583..0000000000 --- a/test-all.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -# COMMON PATHS - -$rootFolder = (Get-Item -Path "./" -Verbose).FullName - -# List of solutions - -$solutionPaths = ( - "framework", - "modules/users", - "modules/permission-management", - "modules/setting-management", - "modules/feature-management", - "modules/identity", - "modules/identityserver", - "modules/tenant-management", - "modules/account", - "modules/docs", - "modules/blogging", - "modules/audit-logging", - "modules/background-jobs", - "modules/client-simulation", - "templates/module/aspnet-core", - "templates/app/aspnet-core" -) - -# Test all solutions - -foreach ($solutionPath in $solutionPaths) { - $solutionAbsPath = (Join-Path $rootFolder $solutionPath) - Set-Location $solutionAbsPath - dotnet test --no-build --no-restore - if (-Not $?) { - Write-Host ("Test failed for the solution: " + $solutionPath) - Set-Location $rootFolder - exit $LASTEXITCODE - } -} - -Set-Location $rootFolder