From 8d4ec39df003ecda2423e4335cf111adc483ca02 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Thu, 8 Sep 2022 12:00:13 +0800 Subject: [PATCH] adjust the keyword sequence. --- .../LINGYUN/Abp/Account/AccountAppService.cs | 18 +-- .../Account/AccountApplicationServiceBase.cs | 2 +- .../LINGYUN/Abp/Account/MyClaimAppService.cs | 2 +- .../Abp/Account/MyProfileAppService.cs | 8 +- .../LINGYUN/Abp/Account/MyClaimController.cs | 2 +- .../Abp/Account/MyProfileController.cs | 8 +- .../Pages/Account/SendCode.cshtml.cs | 6 +- .../Account/VerifyAuthenticatorCode.cshtml.cs | 4 +- .../Pages/Account/VerifyCode.cshtml.cs | 6 +- .../ElasticsearchAuditLogManager.cs | 12 +- .../ElasticsearchSecurityLogManager.cs | 10 +- .../Elasticsearch/IndexInitializer.cs | 6 +- .../EntityFrameworkCore/AuditLogManager.cs | 12 +- .../EntityFrameworkCore/SecurityLogManager.cs | 10 +- .../LINGYUN/Abp/AuditLogging/AuditingStore.cs | 2 +- .../Abp/AuditLogging/SecurityLogStore.cs | 2 +- .../Auditing/AuditLogs/AuditLogAppService.cs | 6 +- .../Abp/Auditing/Logging/LogAppService.cs | 4 +- .../SecurityLogs/SecurityLogAppService.cs | 6 +- .../Auditing/AuditLogs/AuditLogController.cs | 6 +- .../Abp/Auditing/Logging/LogController.cs | 4 +- .../SecurityLogs/SecurityLogController.cs | 6 +- .../Commands/LocalFileCreateProjectService.cs | 10 +- .../CSharp/CSharpServiceProxyGenerator.cs | 22 +-- .../AliyunSettingAppService.cs | 6 +- .../AliyunSettingController.cs | 4 +- .../LINGYUN/Abp/Aliyun/AliyunClientFactory.cs | 8 +- .../BlobStoring/Tencent/CosClientFactory.cs | 2 +- .../Tencent/TencentCloudBlobProvider.cs | 4 +- .../Abp/Sms/Tencent/TencentCloudSmsSender.cs | 2 +- .../Tencent/QQ/AbpTencentQQOptionsFactory.cs | 2 +- .../Tencent/QQ/AbpTencentQQOptionsManager.cs | 2 +- .../TencentCloudSettingAppService.cs | 6 +- .../AbstractTencentCloudClientFactory.cs | 8 +- ...tionConfigurationCacheResetEventHandler.cs | 2 +- .../HangfireBackgroundWorkerAdapter.cs | 2 +- .../BlobStoring/Aliyun/AliyunBlobProvider.cs | 4 +- .../BlobStoring/Aliyun/OssClientFactory.cs | 2 +- .../DbMigrator/DefaultDbSchemaMigrator.cs | 2 +- .../EventBus/CAP/AbpCAPSubscribeInvoker.cs | 2 +- .../CAP/FailedThresholdCallbackNotifier.cs | 2 +- .../Redis/RedisRequiresLimitFeatureChecker.cs | 4 +- .../FeaturesLimitValidationInterceptor.cs | 4 +- .../DashboardPermissionChecker.cs | 2 +- .../Abp/IM/SignalR/Hubs/MessagesHub.cs | 14 +- .../Messages/SignalRMessageSenderProvider.cs | 6 +- .../LINGYUN/Abp/IM/Messages/MessageSender.cs | 2 +- .../IM/Messages/MessageSenderProviderBase.cs | 2 +- ...dentityModelCachedAuthenticationService.cs | 4 +- .../Dynamic/DynamicLanguageProvider.cs | 2 +- .../Location/Amap/AmapHttpRequestClient.cs | 4 +- .../Location/Baidu/BaiduLocationHttpClient.cs | 8 +- .../Baidu/BaiduLocationResolveProvider.cs | 6 +- .../Tencent/TencentLocationHttpClient.cs | 10 +- .../Tencent/TencentLocationResolveProvider.cs | 6 +- .../NotificationDefinitionManager.cs | 6 +- .../SignalR/Hubs/NotificationsHub.cs | 6 +- .../Sms/SmsNotificationSender.cs | 2 +- .../NotificationSubscriptionManager.cs | 18 +-- .../LINGYUN/Abp/Sms/Aliyun/AliyunSmsSender.cs | 2 +- .../DaprApiDescriptionFinder.cs | 14 +- .../DynamicDaprClientProxyInterceptor.cs | 6 +- .../EfCoreDataProtectionRepositoryBase.cs | 8 +- .../Identity/IdentityClaimTypeAppService.cs | 12 +- .../Abp/Identity/IdentityRoleAppService.cs | 14 +- .../Abp/Identity/IdentityUserAppService.cs | 22 +-- .../Identity/OrganizationUnitAppService.cs | 34 ++--- .../Identity/PhoneNumberUserValidator.cs | 2 +- .../EfCoreIdentityRoleRepository.cs | 12 +- .../EfCoreIdentityUserRepository.cs | 24 ++-- .../Identity/IdentityClaimTypeController.cs | 12 +- .../Abp/Identity/IdentityRoleController.cs | 14 +- .../Abp/Identity/IdentityUserController.cs | 20 +-- .../Identity/OrganizationUnitController.cs | 34 ++--- .../Identity/IdentityPermissionManager.cs | 2 +- .../AbpIdentityServerAppServiceBase.cs | 2 +- .../ApiResources/ApiResourceAppService.cs | 12 +- .../ApiScopes/ApiScopeAppService.cs | 12 +- .../Clients/ClientAppService.cs | 18 +-- .../Grants/PersistedGrantAppService.cs | 6 +- .../IdentityResourceAppService.cs | 12 +- .../CustomIdentityResourceDataSeeder.cs | 6 +- .../EfCoreApiResourceRepository.cs | 2 +- .../Grants/EfCorePersistentGrantRepository.cs | 4 +- .../EfCoreIdentityResourceRepository.cs | 2 +- .../ApiResources/ApiResourceController.cs | 10 +- .../ApiScopes/ApiScopeController.cs | 10 +- .../Clients/ClientController.cs | 18 +-- .../Grants/PersistedGrantController.cs | 6 +- .../IdentityResourceController.cs | 10 +- .../LinkUser/LinkUserGrantValidator.cs | 2 +- .../SmsValidator/SmsTokenGrantValidator.cs | 128 +++++++++--------- .../WeChat/WeChatGrantValidator.cs | 4 +- .../WeChat/WeChatResourceDataSeeder.cs | 6 +- .../Mvc/Localization/LanguageAppService.cs | 2 +- .../SerilogElasticsearchLoggingManager.cs | 6 +- .../LocalizationSynchronizer.cs | 6 +- .../EfCoreLanguageRepository.cs | 4 +- .../EfCoreResourceRepository.cs | 4 +- .../EfCoreTextRepository.cs | 18 +-- .../Abp/MessageService/Chat/ChatAppService.cs | 8 +- .../MessageService/Chat/MyFriendAppService.cs | 12 +- .../MessageService/Groups/GroupAppService.cs | 4 +- .../Groups/UserGroupAppService.cs | 8 +- .../Subscriptions/MySubscriptionAppService.cs | 10 +- .../Abp/MessageService/Chat/ChatDataSeeder.cs | 2 +- .../Abp/MessageService/Chat/FriendStore.cs | 26 ++-- .../MessageService/Chat/MessageProcessor.cs | 4 +- .../Abp/MessageService/Chat/MessageStore.cs | 16 +-- .../Abp/MessageService/Chat/UserCardFinder.cs | 6 +- .../MessageService/Chat/UserOnlineChanger.cs | 2 +- .../Local/UserChatFriendEventHandler.cs | 14 +- .../Abp/MessageService/Groups/GroupStore.cs | 6 +- .../MessageService/Groups/UserGroupStore.cs | 4 +- .../Notifications/NotificationStore.cs | 40 +++--- .../Chat/EfCoreMessageRepository.cs | 30 ++-- .../Chat/EfCoreUserChatCardRepository.cs | 10 +- .../Chat/EfCoreUserChatFriendRepository.cs | 16 +-- .../Groups/EfCoreGroupRepository.cs | 10 +- .../Groups/EfCoreUserChatGroupRepository.cs | 12 +- .../EfCoreUserNotificationRepository.cs | 10 +- .../EfCoreUserSubscribeRepository.cs | 24 ++-- .../Abp/MessageService/Chat/ChatController.cs | 8 +- .../MessageService/Chat/MyFriendController.cs | 12 +- .../MessageService/Groups/GroupController.cs | 4 +- .../Groups/UserGroupController.cs | 10 +- .../Subscriptions/MySubscriptionController.cs | 10 +- .../NavigationDataSeedContributor.cs | 2 +- .../OpenApiAuthorizationService.cs | 4 +- .../OpenApi.Sdk/OpenApi/ClientProxy.cs | 14 +- .../Aliyun/AliyunOssContainer.cs | 22 +-- .../Abp/OssManagement/FileAppServiceBase.cs | 10 +- .../Abp/OssManagement/FileUploadMerger.cs | 2 +- .../LINGYUN/Abp/OssManagement/FileUploader.cs | 2 +- .../Abp/OssManagement/FileValidater.cs | 6 +- .../OssManagement/OssContainerAppService.cs | 10 +- .../Abp/OssManagement/OssObjectAppService.cs | 10 +- .../OssManagement/PrivateFileAppService.cs | 4 +- .../Abp/OssManagement/PublicFileAppService.cs | 2 +- .../Abp/OssManagement/ShareFileAppService.cs | 4 +- .../OssManagement/StaticFilesAppService.cs | 2 +- .../OssStaticContainerDataSeedContributor.cs | 2 +- .../ImageSharpFileSystemOssObjectProcesser.cs | 2 +- .../FileSystem/FileSystemOssContainer.cs | 4 +- .../OssManagement/OssContainerController.cs | 10 +- .../Abp/OssManagement/OssObjectController.cs | 12 +- .../OssManagement/PrivateFilesController.cs | 14 +- .../OssManagement/PublicFilesController.cs | 10 +- .../Abp/OssManagement/ShareFilesController.cs | 2 +- .../OssManagement/StaticFilesController.cs | 4 +- .../OssManagementSettingAppService.cs | 6 +- .../OssManagementSettingController.cs | 4 +- .../Tencent/TencentOssContainer.cs | 22 +-- .../DefaultPermissionManager.cs | 2 +- .../LINGYUN/Platform/Datas/Dto/DataMoveDto.cs | 8 ++ .../LINGYUN/Platform/Datas/IDataAppService.cs | 2 + .../Localization/ApplicationContracts/en.json | 1 + .../ApplicationContracts/zh-Hans.json | 1 + .../PlatformPermissionDefinitionProvider.cs | 1 + .../Permissions/PlatformPermissions.cs | 2 + .../LINGYUN/Platform/Datas/DataAppService.cs | 33 +++-- .../Platform/Layouts/LayoutAppService.cs | 12 +- .../LINGYUN/Platform/Menus/MenuAppService.cs | 22 +-- .../Platform/Versions/VersionAppService.cs | 16 +-- .../Datas/DataDictionaryDataSeeder.cs | 2 +- .../LINGYUN/Platform/Menus/MenuManager.cs | 22 +-- .../Platform/Routes/RouteDataSeeder.cs | 8 +- .../Platform/Versions/VersionManager.cs | 30 ++-- .../Platform/Datas/EfCoreDataRepository.cs | 8 +- .../Layouts/EfCoreLayoutRepository.cs | 6 +- .../Platform/Menus/EfCoreMenuRepository.cs | 28 ++-- .../Menus/EfCoreRoleMenuRepository.cs | 6 +- .../Menus/EfCoreUserMenuRepository.cs | 6 +- .../Versions/EfCoreVersionRepository.cs | 10 +- .../LINGYUN/Platform/Datas/DataController.cs | 27 ++-- .../Platform/Layouts/LayoutController.cs | 12 +- .../LINGYUN/Platform/Menus/MenuController.cs | 26 ++-- .../Platform/Versions/VersionController.cs | 18 +-- .../Projects/ProjectManager.cs | 12 +- .../RulesManagement/EntityRuleDataSeeder.cs | 2 +- .../Abp/RulesManagement/EntityRuleFinder.cs | 10 +- .../EfCoreEntityRuleGroupRepository.cs | 10 +- .../EfCoreEntityRuleRepository.cs | 6 +- ...ProviderWorkflowRulesResolveContributor.cs | 2 +- .../RulesEngine/RulesEngineContributor.cs | 2 +- .../RulesEngine/WorkflowRulesResolver.cs | 2 +- .../LINGYUN/Abp/Rules/RuleProvider.cs | 2 +- .../Abp/Saas/Tenants/TenantAppService.cs | 20 +-- .../Abp/Saas/Editions/EditionManager.cs | 4 +- .../Tenants/ConnectionStringInvalidator.cs | 4 +- .../Tenants/TenantCacheItemInvalidator.cs | 2 +- .../LINGYUN/Abp/Saas/Tenants/TenantManager.cs | 8 +- .../LINGYUN/Abp/Saas/Tenants/TenantStore.cs | 10 +- .../EfCoreTenantRepository.cs | 6 +- .../SettingManagement/SettingAppService.cs | 12 +- .../UserSettingAppService.cs | 8 +- .../SettingManagement/SettingController.cs | 8 +- .../UserSettingController.cs | 4 +- .../JobDistributedLockingProvider.cs | 4 +- .../BackgroundTasks/Jobs/HttpRequestJob.cs | 2 +- .../Jobs/HttpRequestJobBase.cs | 6 +- .../Abp/BackgroundTasks/Jobs/SendEmailJob.cs | 2 +- .../Abp/BackgroundTasks/Jobs/SendSmsJob.cs | 2 +- .../Jobs/ServiceInvocationJob.cs | 12 +- .../Quartz/QuartzJobScheduler.cs | 22 +-- .../BackgroundTasks/BackgroundJobAdapter.cs | 2 +- .../BackgroundTasks/BackgroundJobManager.cs | 2 +- .../Internal/BackgroundCleaningJob.cs | 2 +- .../Internal/BackgroundPollingJob.cs | 2 +- .../BackgroundJobLogAppService.cs | 4 +- .../TaskManagement/BackgroundJobManager.cs | 28 ++-- .../EfCoreBackgroundJobInfoRepository.cs | 14 +- .../EfCoreBackgroundJobLogRepository.cs | 4 +- .../Quartz/QuartzJobScheduler.cs | 2 +- .../Distributed/TenantSynchronizer.cs | 14 +- .../Abp/MultiTenancy/DbFinder/TenantStore.cs | 8 +- .../Distributed/TenantSynchronizer.cs | 14 +- .../MultiTenancy/RemoteService/TenantStore.cs | 8 +- .../Saas/TenantCacheItemInvalidator.cs | 8 +- .../Abp/MultiTenancy/Saas/TenantStore.cs | 52 +++---- .../Abp/TenantManagement/TenantAppService.cs | 20 +-- .../ClientProxiesWebhookPublisher.cs | 2 +- .../Abp/Webhooks/DefaultWebhookPublisher.cs | 10 +- .../Abp/Webhooks/DefaultWebhookSender.cs | 2 +- .../LINGYUN/Abp/Webhooks/WebhookManager.cs | 4 +- .../Webhooks/WebhookSubscriptionManager.cs | 24 ++-- .../WeChat/OpenId/UserWeChatOpenIdFinder.cs | 4 +- ...tMiniProgramNotificationPublishProvider.cs | 2 +- .../Abp/WeChat/Crypto/CryptoAppService.cs | 2 +- .../Abp/WeChat/Crypto/CryptoController.cs | 2 +- .../AbpWeChatMiniProgramOptionsFactory.cs | 2 +- .../MiniProgram/Messages/SubscribeMessager.cs | 6 +- .../AbpWeChatOfficialOptionsFactory.cs | 2 +- .../WeChatSettingAppService.cs | 6 +- .../WeChatSettingController.cs | 4 +- .../Abp/WeChat/OpenId/WeChatOpenIdFinder.cs | 6 +- .../Abp/WeChat/Token/WeChatTokenProvider.cs | 4 +- .../AbpDistributedLockProvider.cs | 4 +- .../ElasticsearchPersistenceProvider.cs | 44 +++--- .../PersistenceIndexInitializer.cs | 12 +- .../EfCoreWorkflowRepository.cs | 4 +- ...fCoreWorkflowScheduledCommandRepository.cs | 2 +- .../AbpWorkflowPersistenceProvider.cs | 44 +++--- .../Persistence/AbpWorkflowPurger.cs | 2 +- .../RabbitMQ/AbpRabbitMqQueueProvider.cs | 2 +- .../AbpUnitOfWorkQueueProvider.cs | 2 +- .../Activitys/ActivityAppService.cs | 8 +- .../Engine/EngineAppService.cs | 4 +- .../Events/EventAppService.cs | 2 +- .../Workflows/WorkflowAppService.cs | 10 +- .../Workflows/WorkflowDefinitionAppService.cs | 6 +- .../WorkflowRegistryManager.cs | 2 +- .../EfCoreCompensateNodeRepository.cs | 2 +- .../EfCoreStepNodeRepository.cs | 2 +- .../EfCoreWorkflowRepository.cs | 2 +- .../Activitys/ActivityController.cs | 8 +- .../Engine/EngineController.cs | 4 +- .../Events/EventController.cs | 2 +- .../Workflows/WorkflowController.cs | 10 +- .../Workflows/WorkflowDefinitionController.cs | 6 +- .../SettingManagement/SettingAppService.cs | 8 +- .../SettingManagement/SettingController.cs | 8 +- .../EventBus/Handlers/TenantSynchronizer.cs | 2 +- .../Local/UserCreateJoinIMEventHandler.cs | 6 +- .../EventBus/Handlers/TenantSynchronizer.cs | 2 +- .../EventBus/Handlers/TenantSynchronizer.cs | 2 +- .../IdentityServerDataSeedContributor.cs | 2 +- .../Pages/Account/SendCode.cshtml.cs | 4 +- .../Account/VerifyAuthenticatorCode.cshtml.cs | 2 +- .../Pages/Account/VerifyCode.cshtml.cs | 2 +- .../Abp/AspNetCore/AbpAspNetCoreTestBase.cs | 6 +- .../Elasticsearch/AuditLogManagerTests.cs | 2 +- .../BlobStoring/Aliyun/BlobContainer_Tests.cs | 2 +- .../LINGYUN/Abp/Dapr/Actors/TestActor.cs | 2 +- .../TestClientProxy.Generated.cs | 6 +- .../DataProtection/ProtectionFieldTests.cs | 2 +- .../RedisRequiresLimitFeatureCheckerTests.cs | 6 +- .../LINGYUN/Abp/Tests/AbpTestsBase.cs | 4 +- 278 files changed, 1216 insertions(+), 1181 deletions(-) create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/Dto/DataMoveDto.cs diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs index dd557cd26..662b1297d 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs @@ -54,7 +54,7 @@ namespace LINGYUN.Abp.Account IdentitySecurityLogManager = identitySecurityLogManager; } - public virtual async Task RegisterAsync(WeChatRegisterDto input) + public async virtual Task RegisterAsync(WeChatRegisterDto input) { ThowIfInvalidEmailAddress(input.EmailAddress); @@ -103,7 +103,7 @@ namespace LINGYUN.Abp.Account await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task SendPhoneRegisterCodeAsync(SendPhoneRegisterCodeDto input) + public async virtual Task SendPhoneRegisterCodeAsync(SendPhoneRegisterCodeDto input) { await CheckSelfRegistrationAsync(); await CheckNewUserPhoneNumberNotBeUsedAsync(input.PhoneNumber); @@ -136,7 +136,7 @@ namespace LINGYUN.Abp.Account }); } - public virtual async Task RegisterAsync(PhoneRegisterDto input) + public async virtual Task RegisterAsync(PhoneRegisterDto input) { await CheckSelfRegistrationAsync(); await IdentityOptions.SetAsync(); @@ -191,7 +191,7 @@ namespace LINGYUN.Abp.Account throw new UserFriendlyException(L["InvalidVerifyCode"]); } - public virtual async Task SendPhoneResetPasswordCodeAsync(SendPhoneResetPasswordCodeDto input) + public async virtual Task SendPhoneResetPasswordCodeAsync(SendPhoneResetPasswordCodeDto input) { /* * 注解: 微软的重置密码方法通过 UserManager.GeneratePasswordResetTokenAsync 接口生成密码重置Token @@ -240,7 +240,7 @@ namespace LINGYUN.Abp.Account }); } - public virtual async Task ResetPasswordAsync(PhoneResetPasswordDto input) + public async virtual Task ResetPasswordAsync(PhoneResetPasswordDto input) { var securityTokenCacheKey = SecurityTokenCacheItem.CalculateSmsCacheKey(input.PhoneNumber, "SmsVerifyCode"); var securityTokenCacheItem = await SecurityTokenCache.GetAsync(securityTokenCacheKey); @@ -281,7 +281,7 @@ namespace LINGYUN.Abp.Account await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task SendPhoneSigninCodeAsync(SendPhoneSigninCodeDto input) + public async virtual Task SendPhoneSigninCodeAsync(SendPhoneSigninCodeDto input) { var securityTokenCacheKey = SecurityTokenCacheItem.CalculateSmsCacheKey(input.PhoneNumber, "SmsVerifyCode"); var securityTokenCacheItem = await SecurityTokenCache.GetAsync(securityTokenCacheKey); @@ -336,7 +336,7 @@ namespace LINGYUN.Abp.Account userFactors.Select(key => new NameValue(L[$"TwoFactor:{key}"].Value, key)).ToList()); } - protected virtual async Task GetUserByPhoneNumberAsync(string phoneNumber, bool isConfirmed = true) + protected async virtual Task GetUserByPhoneNumberAsync(string phoneNumber, bool isConfirmed = true) { var user = await UserRepository.FindByPhoneNumberAsync(phoneNumber, isConfirmed, true); if (user == null) @@ -350,7 +350,7 @@ namespace LINGYUN.Abp.Account /// 检查是否允许用户注册 /// /// - protected virtual async Task CheckSelfRegistrationAsync() + protected async virtual Task CheckSelfRegistrationAsync() { if (!await SettingProvider.IsTrueAsync(Volo.Abp.Account.Settings.AccountSettingNames.IsSelfRegistrationEnabled)) { @@ -358,7 +358,7 @@ namespace LINGYUN.Abp.Account } } - protected virtual async Task CheckNewUserPhoneNumberNotBeUsedAsync(string phoneNumber) + protected async virtual Task CheckNewUserPhoneNumberNotBeUsedAsync(string phoneNumber) { if (await UserRepository.IsPhoneNumberUedAsync(phoneNumber)) { diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountApplicationServiceBase.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountApplicationServiceBase.cs index 55e3d575a..a094887cf 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountApplicationServiceBase.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountApplicationServiceBase.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.Account LocalizationResource = typeof(AccountResource); } - protected virtual async Task GetCurrentUserAsync() + protected async virtual Task GetCurrentUserAsync() { await IdentityOptions.SetAsync(); diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyClaimAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyClaimAppService.cs index a07a782fe..3d49538fd 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyClaimAppService.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyClaimAppService.cs @@ -15,7 +15,7 @@ namespace LINGYUN.Abp.Account } - public virtual async Task ChangeAvatarAsync(ChangeAvatarInput input) + public async virtual Task ChangeAvatarAsync(ChangeAvatarInput input) { var user = await GetCurrentUserAsync(); diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs index 64c908270..8d47d3b59 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs @@ -36,7 +36,7 @@ namespace LINGYUN.Abp.Account LocalizationResource = typeof(AccountResource); } - public virtual async Task GetTwoFactorEnabledAsync() + public async virtual Task GetTwoFactorEnabledAsync() { var user = await GetCurrentUserAsync(); @@ -46,7 +46,7 @@ namespace LINGYUN.Abp.Account }; } - public virtual async Task ChangeTwoFactorEnabledAsync(TwoFactorEnabledDto input) + public async virtual Task ChangeTwoFactorEnabledAsync(TwoFactorEnabledDto input) { // Removed See: https://github.com/abpframework/abp/pull/7719 //if (!await SettingProvider.IsTrueAsync(IdentitySettingNames.TwoFactor.UsersCanChange)) @@ -61,7 +61,7 @@ namespace LINGYUN.Abp.Account await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task SendChangePhoneNumberCodeAsync(SendChangePhoneNumberCodeInput input) + public async virtual Task SendChangePhoneNumberCodeAsync(SendChangePhoneNumberCodeInput input) { var securityTokenCacheKey = SecurityTokenCacheItem.CalculateSmsCacheKey(input.NewPhoneNumber, "SmsChangePhoneNumber"); var securityTokenCacheItem = await SecurityTokenCache.GetAsync(securityTokenCacheKey); @@ -92,7 +92,7 @@ namespace LINGYUN.Abp.Account }); } - public virtual async Task ChangePhoneNumberAsync(ChangePhoneNumberInput input) + public async virtual Task ChangePhoneNumberAsync(ChangePhoneNumberInput input) { // 是否已有用户使用手机号绑定 if (await UserRepository.IsPhoneNumberConfirmedAsync(input.NewPhoneNumber)) diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs index a568716bc..50bf7a048 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.Account [HttpPost] [Route("change-avatar")] - public virtual async Task ChangeAvatarAsync(ChangeAvatarInput input) + public async virtual Task ChangeAvatarAsync(ChangeAvatarInput input) { await _service.ChangeAvatarAsync(input); } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs index a4d71fbe0..db9c9274a 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs @@ -22,28 +22,28 @@ namespace LINGYUN.Abp.Account [HttpGet] [Route("two-factor")] - public virtual async Task GetTwoFactorEnabledAsync() + public async virtual Task GetTwoFactorEnabledAsync() { return await MyProfileAppService.GetTwoFactorEnabledAsync(); } [HttpPut] [Route("change-two-factor")] - public virtual async Task ChangeTwoFactorEnabledAsync(TwoFactorEnabledDto input) + public async virtual Task ChangeTwoFactorEnabledAsync(TwoFactorEnabledDto input) { await MyProfileAppService.ChangeTwoFactorEnabledAsync(input); } [HttpPost] [Route("send-phone-number-change-code")] - public virtual async Task SendChangePhoneNumberCodeAsync(SendChangePhoneNumberCodeInput input) + public async virtual Task SendChangePhoneNumberCodeAsync(SendChangePhoneNumberCodeInput input) { await MyProfileAppService.SendChangePhoneNumberCodeAsync(input); } [HttpPut] [Route("change-phone-number")] - public virtual async Task ChangePhoneNumberAsync(ChangePhoneNumberInput input) + public async virtual Task ChangePhoneNumberAsync(ChangePhoneNumberInput input) { await MyProfileAppService.ChangePhoneNumberAsync(input); } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/SendCode.cshtml.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/SendCode.cshtml.cs index 4f5289e5d..40c3f9ad7 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/SendCode.cshtml.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/SendCode.cshtml.cs @@ -23,12 +23,12 @@ namespace LINGYUN.Abp.Account.Web.Pages.Account return Page(); } - public virtual async Task OnPostAsync() + public async virtual Task OnPostAsync() { var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); if (user == null) { - Alerts.Warning("˫֤ʧ,ûδ¼!"); + Alerts.Warning("˫������֤ʧ��,�û�δ��¼!"); return Page(); } @@ -45,7 +45,7 @@ namespace LINGYUN.Abp.Account.Web.Pages.Account var code = await UserManager.GenerateTwoFactorTokenAsync(user, SendCodeInput.SelectedProvider); if (string.IsNullOrWhiteSpace(code)) { - Alerts.Warning("֤ʧ,ϵϵͳԱ!"); + Alerts.Warning("��֤������ʧ��,����ϵϵͳ����Ա!"); return Page(); } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyAuthenticatorCode.cshtml.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyAuthenticatorCode.cshtml.cs index b25467e5d..2be58bf5d 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyAuthenticatorCode.cshtml.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyAuthenticatorCode.cshtml.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Abp.Account.Web.Pages.Account return Page(); } - public virtual async Task OnPostAsync() + public async virtual Task OnPostAsync() { var result = await SignInManager.TwoFactorAuthenticatorSignInAsync(Input.Code, Input.RememberMe, Input.RememberBrowser); if (result.Succeeded) @@ -33,7 +33,7 @@ namespace LINGYUN.Abp.Account.Web.Pages.Account } else { - Alerts.Danger("Ȩ֤Ч!"); + Alerts.Danger("��Ȩ����֤��Ч!"); return Page(); } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyCode.cshtml.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyCode.cshtml.cs index 5fba3fd04..25e8ba1ae 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyCode.cshtml.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/VerifyCode.cshtml.cs @@ -18,12 +18,12 @@ namespace LINGYUN.Abp.Account.Web.Pages.Account return Page(); } - public virtual async Task OnPostAsync() + public async virtual Task OnPostAsync() { var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); if (user == null) { - Alerts.Warning("˫֤ʧ,ûδ¼ʧЧ!"); + Alerts.Warning("˫������֤ʧ��,�û�δ��¼����ʧЧ!"); return Page(); } @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.Account.Web.Pages.Account } else { - Alerts.Danger("Ȩ֤Ч!"); + Alerts.Danger("��Ȩ����֤��Ч!"); return Page(); } } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs index 2c08377bf..764636c76 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( DateTime? startTime = null, DateTime? endTime = null, string httpMethod = null, @@ -85,7 +85,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch return response.Count; } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string sorting = null, int maxResultCount = 50, int skipCount = 0, @@ -157,7 +157,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch return response.Documents.ToList(); } - public virtual async Task GetAsync( + public async virtual Task GetAsync( Guid id, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -173,7 +173,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch return response.Source; } - public virtual async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) + public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) { var client = _clientFactory.Create(); @@ -184,7 +184,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch cancellationToken); } - public virtual async Task SaveAsync( + public async virtual Task SaveAsync( AuditLogInfo auditInfo, CancellationToken cancellationToken = default(CancellationToken)) { @@ -205,7 +205,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch return ""; } - protected virtual async Task SaveLogAsync( + protected async virtual Task SaveLogAsync( AuditLogInfo auditLogInfo, CancellationToken cancellationToken = default(CancellationToken)) { diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs index e8d00bb36..482c1fb51 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs @@ -41,7 +41,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch Logger = NullLogger.Instance; } - public virtual async Task SaveAsync( + public async virtual Task SaveAsync( SecurityLogInfo securityLogInfo, CancellationToken cancellationToken = default(CancellationToken)) { @@ -64,7 +64,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch cancellationToken); } - public virtual async Task GetAsync( + public async virtual Task GetAsync( Guid id, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -80,7 +80,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch return response.Source; } - public virtual async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) + public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) { var client = _clientFactory.Create(); @@ -91,7 +91,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch cancellationToken); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string sorting = null, int maxResultCount = 50, int skipCount = 0, @@ -141,7 +141,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( DateTime? startTime = null, DateTime? endTime = null, string applicationName = null, diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs index f49259704..fb59eee97 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs @@ -34,7 +34,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch Logger = NullLogger.Instance; } - public virtual async Task InitializeAsync() + public async virtual Task InitializeAsync() { var client = _clientFactory.Create(); var dateTimeFormat = !_jsonOptions.DefaultDateTimeFormat.IsNullOrWhiteSpace() @@ -48,7 +48,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch await InitlizeSecurityLogIndex(client, indexState, dateTimeFormat); } - protected virtual async Task InitlizeAuditLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeAuditLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("audit-log"); var indexExists = await client.Indices.ExistsAsync(indexName); @@ -82,7 +82,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch } } - protected virtual async Task InitlizeSecurityLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeSecurityLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("security-log"); var indexExists = await client.Indices.ExistsAsync(indexName); diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs index 54738b4d1..45beebd93 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( DateTime? startTime = null, DateTime? endTime = null, string httpMethod = null, @@ -76,7 +76,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore cancellationToken); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string sorting = null, int maxResultCount = 50, int skipCount = 0, @@ -120,7 +120,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore return ObjectMapper.Map, List>(auditLogs); } - public virtual async Task GetAsync( + public async virtual Task GetAsync( Guid id, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -130,7 +130,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore return ObjectMapper.Map(auditLog); } - public virtual async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) + public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) { using (var uow = UnitOfWorkManager.Begin(true)) { @@ -139,7 +139,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore } } - public virtual async Task SaveAsync( + public async virtual Task SaveAsync( AuditLogInfo auditInfo, CancellationToken cancellationToken = default(CancellationToken)) { @@ -160,7 +160,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore return ""; } - protected virtual async Task SaveLogAsync( + protected async virtual Task SaveLogAsync( AuditLogInfo auditInfo, CancellationToken cancellationToken = default(CancellationToken)) { diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs index a626cd30f..32548ad7e 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore UnitOfWorkManager = unitOfWorkManager; } - public virtual async Task SaveAsync( + public async virtual Task SaveAsync( SecurityLogInfo securityLogInfo, CancellationToken cancellationToken = default(CancellationToken)) { @@ -59,7 +59,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore } } - public virtual async Task GetAsync( + public async virtual Task GetAsync( Guid id, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore return ObjectMapper.Map(securityLog); } - public virtual async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) + public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) { using (var uow = UnitOfWorkManager.Begin(true)) { @@ -78,7 +78,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore } } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string sorting = null, int maxResultCount = 50, int skipCount = 0, @@ -115,7 +115,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( DateTime? startTime = null, DateTime? endTime = null, string applicationName = null, diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs index 7f41a33f3..fc12263f9 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs @@ -15,7 +15,7 @@ namespace LINGYUN.Abp.AuditLogging _manager = manager; } - public virtual async Task SaveAsync(AuditLogInfo auditInfo) + public async virtual Task SaveAsync(AuditLogInfo auditInfo) { await _manager.SaveAsync(auditInfo); } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/SecurityLogStore.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/SecurityLogStore.cs index b68c89f72..a4d50bf73 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/SecurityLogStore.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/SecurityLogStore.cs @@ -15,7 +15,7 @@ namespace LINGYUN.Abp.AuditLogging _manager = manager; } - public virtual async Task SaveAsync(SecurityLogInfo securityLogInfo) + public async virtual Task SaveAsync(SecurityLogInfo securityLogInfo) { await _manager.SaveAsync(securityLogInfo); } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AuditLogs/AuditLogAppService.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AuditLogs/AuditLogAppService.cs index aa896cb7a..1c2f5c38c 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AuditLogs/AuditLogAppService.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AuditLogs/AuditLogAppService.cs @@ -22,14 +22,14 @@ namespace LINGYUN.Abp.Auditing.AuditLogs AuditLogManager = auditLogManager; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var auditLog = await AuditLogManager.GetAsync(id, includeDetails: true); return ObjectMapper.Map(auditLog); } - public virtual async Task> GetListAsync(AuditLogGetByPagedDto input) + public async virtual Task> GetListAsync(AuditLogGetByPagedDto input) { var auditLogCount = await AuditLogManager .GetCountAsync(input.StartTime, input.EndTime, @@ -55,7 +55,7 @@ namespace LINGYUN.Abp.Auditing.AuditLogs } [Authorize(AuditingPermissionNames.AuditLog.Delete)] - public virtual async Task DeleteAsync([Required] Guid id) + public async virtual Task DeleteAsync([Required] Guid id) { await AuditLogManager.DeleteAsync(id); } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/Logging/LogAppService.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/Logging/LogAppService.cs index cf1dc7cd2..9eb7f5af0 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/Logging/LogAppService.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/Logging/LogAppService.cs @@ -14,14 +14,14 @@ namespace LINGYUN.Abp.Auditing.Logging _manager = manager; } - public virtual async Task GetAsync(string id) + public async virtual Task GetAsync(string id) { var log = await _manager.GetAsync(id); return ObjectMapper.Map(log); } - public virtual async Task> GetListAsync(LogGetByPagedDto input) + public async virtual Task> GetListAsync(LogGetByPagedDto input) { var count = await _manager.GetCountAsync( input.StartTime, input.EndTime, input.Level, diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogAppService.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogAppService.cs index 2766bce8b..183c8cd04 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogAppService.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogAppService.cs @@ -20,14 +20,14 @@ namespace LINGYUN.Abp.Auditing.SecurityLogs SecurityLogManager = securityLogManager; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var securityLog = await SecurityLogManager.GetAsync(id, includeDetails: true); return ObjectMapper.Map(securityLog); } - public virtual async Task> GetListAsync(SecurityLogGetByPagedDto input) + public async virtual Task> GetListAsync(SecurityLogGetByPagedDto input) { var securityLogCount = await SecurityLogManager .GetCountAsync(input.StartTime, input.EndTime, @@ -48,7 +48,7 @@ namespace LINGYUN.Abp.Auditing.SecurityLogs } [Authorize(AuditingPermissionNames.SecurityLog.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await SecurityLogManager.DeleteAsync(id); } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs index 57cf524d3..bd08ac7c3 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs @@ -22,20 +22,20 @@ namespace LINGYUN.Abp.Auditing.AuditLogs [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await AuditLogAppService.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await AuditLogAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(AuditLogGetByPagedDto input) + public async virtual Task> GetListAsync(AuditLogGetByPagedDto input) { return await AuditLogAppService.GetListAsync(input); } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs index 52156e95c..aeaebf8ef 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs @@ -21,13 +21,13 @@ namespace LINGYUN.Abp.Auditing.Logging [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(string id) + public async virtual Task GetAsync(string id) { return await _service.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(LogGetByPagedDto input) + public async virtual Task> GetListAsync(LogGetByPagedDto input) { return await _service.GetListAsync(input); } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs index 381b70111..3d74d5618 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs @@ -22,20 +22,20 @@ namespace LINGYUN.Abp.Auditing.SecurityLogs [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await SecurityLogAppService.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await SecurityLogAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(SecurityLogGetByPagedDto input) + public async virtual Task> GetListAsync(SecurityLogGetByPagedDto input) { return await SecurityLogAppService.GetListAsync(input); } diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/LocalFileCreateProjectService.cs b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/LocalFileCreateProjectService.cs index e3ee50bfe..d9f94a639 100644 --- a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/LocalFileCreateProjectService.cs +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/LocalFileCreateProjectService.cs @@ -45,7 +45,7 @@ namespace LINGYUN.Abp.Cli.Commands Logger = NullLogger.Instance; } - public virtual async Task CreateAsync(ProjectCreateArgs createArgs) + public async virtual Task CreateAsync(ProjectCreateArgs createArgs) { Logger.LogInformation("Execute dotnet command..."); @@ -128,7 +128,7 @@ namespace LINGYUN.Abp.Cli.Commands } } - protected virtual async Task TryReplaceVersionWithProjectFile( + protected async virtual Task TryReplaceVersionWithProjectFile( List projectFiles, string version) { @@ -163,7 +163,7 @@ namespace LINGYUN.Abp.Cli.Commands } } - protected virtual async Task TryReplaceApplicationUrlWithProjectFile( + protected async virtual Task TryReplaceApplicationUrlWithProjectFile( List projectFiles, string port = "5000", string daprPort = "3500") @@ -182,7 +182,7 @@ namespace LINGYUN.Abp.Cli.Commands } } - protected virtual async Task TryReplaceAppSettingsWithProjectFile( + protected async virtual Task TryReplaceAppSettingsWithProjectFile( List projectFiles, string packageName, string companyName, @@ -201,7 +201,7 @@ namespace LINGYUN.Abp.Cli.Commands } } - protected virtual async Task TryReplacePackageAndCompanyNameWithProjectFile( + protected async virtual Task TryReplacePackageAndCompanyNameWithProjectFile( List projectFiles, string packageName, string companyName, diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs index 4e6faa15b..2a24a356c 100644 --- a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs @@ -5,10 +5,10 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; -using Volo.Abp.Cli; +using Volo.Abp.Cli; using Volo.Abp.Cli.Commands; using Volo.Abp.Cli.Http; -using Volo.Abp.Cli.ServiceProxying; +using Volo.Abp.Cli.ServiceProxying; using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Modeling; using Volo.Abp.Json; @@ -255,7 +255,7 @@ public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase"; - methodBuilder.AppendLine($"public virtual async {returnSign} {action.Name}()"); + methodBuilder.AppendLine($"public async virtual {returnSign} {action.Name}()"); foreach (var parameter in action.ParametersOnMethod) { @@ -372,14 +372,14 @@ public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase "DaprClientProxyBase", - "http" => "ClientProxyBase", - _ => "ClientProxyBase" - }; + private static string GetClientProxyProvider(string provider) + { + return provider switch + { + "dapr" => "DaprClientProxyBase", + "http" => "ClientProxyBase", + _ => "ClientProxyBase" + }; } private string NormalizeTypeName(string typeName) diff --git a/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingAppService.cs b/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingAppService.cs index 31cce24d9..b9ebb8d45 100644 --- a/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingAppService.cs +++ b/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingAppService.cs @@ -28,17 +28,17 @@ namespace LINGYUN.Abp.Aliyun.SettingManagement LocalizationResource = typeof(AliyunResource); } - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await GetAllForProviderAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString()); } - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await GetAllForProviderAsync(GlobalSettingValueProvider.ProviderName, null); } - protected virtual async Task GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task GetAllForProviderAsync(string providerName, string providerKey) { var settingGroups = new SettingGroupResult(); diff --git a/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs b/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs index 59d5cd24c..3d50dad6d 100644 --- a/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs +++ b/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs @@ -22,14 +22,14 @@ namespace LINGYUN.Abp.Aliyun.SettingManagement [HttpGet] [Route("by-current-tenant")] - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await AppService.GetAllForCurrentTenantAsync(); } [HttpGet] [Route("by-global")] - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await AppService.GetAllForGlobalAsync(); } diff --git a/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun/LINGYUN/Abp/Aliyun/AliyunClientFactory.cs b/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun/LINGYUN/Abp/Aliyun/AliyunClientFactory.cs index 9faf7d575..674db8854 100644 --- a/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun/LINGYUN/Abp/Aliyun/AliyunClientFactory.cs +++ b/aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun/LINGYUN/Abp/Aliyun/AliyunClientFactory.cs @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.Aliyun SettingProvider = settingProvider; } - public virtual async Task CreateAsync() + public async virtual Task CreateAsync() { var regionId = await SettingProvider.GetOrNullAsync(AliyunSettingNames.Authorization.RegionId); var accessKey = await SettingProvider.GetOrNullAsync(AliyunSettingNames.Authorization.AccessKeyId); @@ -52,7 +52,7 @@ namespace LINGYUN.Abp.Aliyun protected abstract TClient GetSecurityTokenClient(string regionId, string accessKeyId, string accessKeySecret, string securityToken); - protected virtual async Task GetCacheItemAsync(string accessKeyId, string accessKeySecret, string regionId) + protected async virtual Task GetCacheItemAsync(string accessKeyId, string accessKeySecret, string regionId) { var cacheItem = await Cache.GetAsync(AliyunBasicSessionCredentialsCacheItem.CacheKey); if (cacheItem == null) @@ -111,7 +111,7 @@ namespace LINGYUN.Abp.Aliyun SettingProvider = settingProvider; } - public virtual async Task CreateAsync(TConfiguration configuration) + public async virtual Task CreateAsync(TConfiguration configuration) { var regionId = await SettingProvider.GetOrNullAsync(AliyunSettingNames.Authorization.RegionId); var accessKey = await SettingProvider.GetOrNullAsync(AliyunSettingNames.Authorization.AccessKeyId); @@ -135,7 +135,7 @@ namespace LINGYUN.Abp.Aliyun protected abstract TClient GetSecurityTokenClient(TConfiguration configuration, string regionId, string accessKeyId, string accessKeySecret, string securityToken); - protected virtual async Task GetCacheItemAsync(string accessKeyId, string accessKeySecret, string regionId) + protected async virtual Task GetCacheItemAsync(string accessKeyId, string accessKeySecret, string regionId) { var cacheItem = await Cache.GetAsync(AliyunBasicSessionCredentialsCacheItem.CacheKey); if (cacheItem == null) diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/CosClientFactory.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/CosClientFactory.cs index d45c1846e..a65e54ef5 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/CosClientFactory.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/CosClientFactory.cs @@ -26,7 +26,7 @@ public class CosClientFactory : AbstractTencentCloudClientFactory CreateAsync() + public async virtual Task CreateAsync() { var configuration = ConfigurationProvider.Get(); diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs index 3d09141f7..229fb2ca4 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs @@ -117,14 +117,14 @@ public class TencentCloudBlobProvider : BlobProviderBase, ITransientDependency ossClient.PutObject(putRequest); } - protected virtual async Task GetOssClientAsync(BlobProviderArgs args) + protected async virtual Task GetOssClientAsync(BlobProviderArgs args) { var configuration = args.Configuration.GetTencentConfiguration(); var ossClient = await CosClientFactory.CreateAsync(configuration); return ossClient; } - protected virtual async Task CreateBucketIfNotExists(CosXml cos, BlobProviderArgs args, IList refererList = null) + protected async virtual Task CreateBucketIfNotExists(CosXml cos, BlobProviderArgs args, IList refererList = null) { if (!await BucketExistsAsync(cos, args)) { diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Sms.Tencent/LINGYUN/Abp/Sms/Tencent/TencentCloudSmsSender.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Sms.Tencent/LINGYUN/Abp/Sms/Tencent/TencentCloudSmsSender.cs index 19bbc56f2..6c7738657 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Sms.Tencent/LINGYUN/Abp/Sms/Tencent/TencentCloudSmsSender.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Sms.Tencent/LINGYUN/Abp/Sms/Tencent/TencentCloudSmsSender.cs @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.Sms.Tencent } [RequiresFeature(TencentCloudFeatures.Sms.Enable)] - public virtual async Task SendAsync(SmsMessage smsMessage) + public async virtual Task SendAsync(SmsMessage smsMessage) { var appId = await SettingProvider.GetOrNullAsync(TencentCloudSettingNames.Sms.AppId); diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsFactory.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsFactory.cs index 28094c235..95b699df4 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsFactory.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsFactory.cs @@ -14,7 +14,7 @@ namespace LINGYUN.Abp.Tencent.QQ Options = options; } - public virtual async Task CreateAsync() + public async virtual Task CreateAsync() { await Options.SetAsync(); diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsManager.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsManager.cs index fe2138187..46f81485c 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsManager.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.QQ/LINGYUN/Abp/Tencent/QQ/AbpTencentQQOptionsManager.cs @@ -35,7 +35,7 @@ public class AbpTencentQQOptionsManager : AbpDynamicOptionsManager GetCacheItemAsync() + protected async virtual Task GetCacheItemAsync() { var cacheKey = AbpTencentQQCacheItem.CalculateCacheKey(CurrentTenant.Id); diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.SettingManagement/LINGYUN/Abp/Tencent/SettingManagement/TencentCloudSettingAppService.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.SettingManagement/LINGYUN/Abp/Tencent/SettingManagement/TencentCloudSettingAppService.cs index 4a42e4695..562181e1a 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.SettingManagement/LINGYUN/Abp/Tencent/SettingManagement/TencentCloudSettingAppService.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.SettingManagement/LINGYUN/Abp/Tencent/SettingManagement/TencentCloudSettingAppService.cs @@ -31,17 +31,17 @@ public class TencentCloudSettingAppService : ApplicationService, ITencentCloudSe LocalizationResource = typeof(TencentCloudResource); } - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await GetAllForProviderAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString()); } - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await GetAllForProviderAsync(GlobalSettingValueProvider.ProviderName, null); } - protected virtual async Task GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task GetAllForProviderAsync(string providerName, string providerKey) { var settingGroups = new SettingGroupResult(); diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent/LINGYUN/Abp/Tencent/AbstractTencentCloudClientFactory.cs b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent/LINGYUN/Abp/Tencent/AbstractTencentCloudClientFactory.cs index 235914c36..912501af7 100644 --- a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent/LINGYUN/Abp/Tencent/AbstractTencentCloudClientFactory.cs +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent/LINGYUN/Abp/Tencent/AbstractTencentCloudClientFactory.cs @@ -23,7 +23,7 @@ public abstract class AbstractTencentCloudClientFactory SettingProvider = settingProvider; } - public virtual async Task CreateAsync() + public async virtual Task CreateAsync() { var clientCacheItem = await GetClientCacheItemAsync(); @@ -32,7 +32,7 @@ public abstract class AbstractTencentCloudClientFactory protected abstract TClient CreateClient(TencentCloudClientCacheItem cloudCache); - protected virtual async Task GetClientCacheItemAsync() + protected async virtual Task GetClientCacheItemAsync() { return await ClientCache.GetOrCreateAsync( TencentCloudClientCacheItem.CalculateCacheKey(CurrentTenant), @@ -80,7 +80,7 @@ public abstract class AbstractTencentCloudClientFactory SettingProvider = settingProvider; } - public virtual async Task CreateAsync(TConfiguration configuration) + public async virtual Task CreateAsync(TConfiguration configuration) { var clientCacheItem = await GetClientCacheItemAsync(); @@ -89,7 +89,7 @@ public abstract class AbstractTencentCloudClientFactory protected abstract TClient CreateClient(TConfiguration configuration, TencentCloudClientCacheItem cloudCache); - protected virtual async Task GetClientCacheItemAsync() + protected async virtual Task GetClientCacheItemAsync() { return await ClientCache.GetOrCreateAsync( TencentCloudClientCacheItem.CalculateCacheKey(CurrentTenant), diff --git a/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN/Abp/AspNetCore/Mvc/Client/MvcCurrentApplicationConfigurationCacheResetEventHandler.cs b/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN/Abp/AspNetCore/Mvc/Client/MvcCurrentApplicationConfigurationCacheResetEventHandler.cs index a8ca5685e..fa2e7ef65 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN/Abp/AspNetCore/Mvc/Client/MvcCurrentApplicationConfigurationCacheResetEventHandler.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN/Abp/AspNetCore/Mvc/Client/MvcCurrentApplicationConfigurationCacheResetEventHandler.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Client Cache = cache; } - public virtual async Task HandleEventAsync(CurrentApplicationConfigurationCacheResetEventData eventData) + public async virtual Task HandleEventAsync(CurrentApplicationConfigurationCacheResetEventData eventData) { await Cache.RemoveAsync(CreateCacheKey()); } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerAdapter.cs b/aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerAdapter.cs index d8a8c84e5..12dea60fd 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerAdapter.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.BackgroundWorkers.Hangfire/LINGYUN/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerAdapter.cs @@ -16,7 +16,7 @@ namespace LINGYUN.Abp.BackgroundWorkers.Hangfire _doWorkMethod = typeof(TWorker).GetMethod("DoWork", BindingFlags.Instance | BindingFlags.NonPublic); } - public virtual async Task ExecuteAsync() + public async virtual Task ExecuteAsync() { var worker = (IBackgroundWorker)ServiceProvider.GetService(typeof(TWorker)); var workerContext = new PeriodicBackgroundWorkerContext(ServiceProvider); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs index 7a4ba3da7..0eadfb477 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs @@ -90,14 +90,14 @@ namespace LINGYUN.Abp.BlobStoring.Aliyun ossClient.PutObject(bucketName, blobName, args.BlobStream); } - protected virtual async Task GetOssClientAsync(BlobProviderArgs args) + protected async virtual Task GetOssClientAsync(BlobProviderArgs args) { var configuration = args.Configuration.GetAliyunConfiguration(); var ossClient = await OssClientFactory.CreateAsync(configuration); return ossClient; } - protected virtual async Task CreateBucketIfNotExists(IOss ossClient, BlobProviderArgs args, IList refererList = null) + protected async virtual Task CreateBucketIfNotExists(IOss ossClient, BlobProviderArgs args, IList refererList = null) { if (! await BucketExistsAsync(ossClient, args)) { diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/OssClientFactory.cs b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/OssClientFactory.cs index df8fd6c80..4d271876f 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/OssClientFactory.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/OssClientFactory.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Abp.BlobStoring.Aliyun ConfigurationProvider = configurationProvider; } - public virtual async Task CreateAsync() + public async virtual Task CreateAsync() { var configuration = ConfigurationProvider.Get(); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs index 879953f2a..2814099a8 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs @@ -23,7 +23,7 @@ namespace LINGYUN.Abp.Data.DbMigrator _dbConnectionOptions = dbConnectionOptions.Value; } - public virtual async Task MigrateAsync( + public async virtual Task MigrateAsync( [NotNull] Func, TDbContext> configureDbContext) where TDbContext : AbpDbContext { diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs index 3b1fdadf2..957206ae8 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs @@ -52,7 +52,7 @@ namespace LINGYUN.Abp.EventBus.CAP /// /// /// - public virtual async Task InvokeAsync(ConsumerContext context, CancellationToken cancellationToken = default) + public async virtual Task InvokeAsync(ConsumerContext context, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/FailedThresholdCallbackNotifier.cs b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/FailedThresholdCallbackNotifier.cs index eba4e0930..168971fd1 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/FailedThresholdCallbackNotifier.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/FailedThresholdCallbackNotifier.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.EventBus.CAP ExceptionNotifier = exceptionNotifier; } - public virtual async Task NotifyAsync(AbpCAPExecutionFailedException exception) + public async virtual Task NotifyAsync(AbpCAPExecutionFailedException exception) { // 通过额外的选项来控制是否发送消息处理失败的事件 if (Options.NotifyFailedCallback) diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation.Redis/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureChecker.cs b/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation.Redis/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureChecker.cs index d2ef589e8..e9ba43550 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation.Redis/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureChecker.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation.Redis/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureChecker.cs @@ -52,7 +52,7 @@ namespace LINGYUN.Abp.Features.LimitValidation.Redis Logger = NullLogger.Instance; } - public virtual async Task CheckAsync(RequiresLimitFeatureContext context, CancellationToken cancellation = default) + public async virtual Task CheckAsync(RequiresLimitFeatureContext context, CancellationToken cancellation = default) { await ConnectAsync(cancellation); @@ -60,7 +60,7 @@ namespace LINGYUN.Abp.Features.LimitValidation.Redis return result + 1 <= context.Limit; } - public virtual async Task ProcessAsync(RequiresLimitFeatureContext context, CancellationToken cancellation = default) + public async virtual Task ProcessAsync(RequiresLimitFeatureContext context, CancellationToken cancellation = default) { await ConnectAsync(cancellation); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation/LINGYUN/Abp/Features/LimitValidation/FeaturesLimitValidationInterceptor.cs b/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation/LINGYUN/Abp/Features/LimitValidation/FeaturesLimitValidationInterceptor.cs index 8fda52f0e..1f1e1786d 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation/LINGYUN/Abp/Features/LimitValidation/FeaturesLimitValidationInterceptor.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Features.LimitValidation/LINGYUN/Abp/Features/LimitValidation/FeaturesLimitValidationInterceptor.cs @@ -60,7 +60,7 @@ namespace LINGYUN.Abp.Features.LimitValidation await PostCheckFeatureAsync(limitFeatureContext); } - protected virtual async Task PreCheckFeatureAsync(RequiresLimitFeatureContext context) + protected async virtual Task PreCheckFeatureAsync(RequiresLimitFeatureContext context) { var allowed = await _limitFeatureChecker.CheckAsync(context); if (!allowed) @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.Features.LimitValidation } } - protected virtual async Task PostCheckFeatureAsync(RequiresLimitFeatureContext context) + protected async virtual Task PostCheckFeatureAsync(RequiresLimitFeatureContext context) { await _limitFeatureChecker.ProcessAsync(context); } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Dashboard/LINGYUN/Abp/Hangfire/Dashboard/Authorization/DashboardPermissionChecker.cs b/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Dashboard/LINGYUN/Abp/Hangfire/Dashboard/Authorization/DashboardPermissionChecker.cs index 5c705a283..1901f9731 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Dashboard/LINGYUN/Abp/Hangfire/Dashboard/Authorization/DashboardPermissionChecker.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Dashboard/LINGYUN/Abp/Hangfire/Dashboard/Authorization/DashboardPermissionChecker.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.Hangfire.Dashboard.Authorization _permissionChecker = permissionChecker; } - public virtual async Task IsGrantedAsync(DashboardContext context, string[] requiredPermissionNames) + public async virtual Task IsGrantedAsync(DashboardContext context, string[] requiredPermissionNames) { var localPermissionKey = $"_HDPS:{requiredPermissionNames.JoinAsString(";")}"; diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessagesHub.cs b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessagesHub.cs index db59f19bb..638a53f76 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessagesHub.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessagesHub.cs @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs } } - protected virtual async Task SendUserOnlineStateAsync(bool isOnlined = true) + protected async virtual Task SendUserOnlineStateAsync(bool isOnlined = true) { var methodName = isOnlined ? Options.UserOnlineMethod : Options.UserOfflineMethod; @@ -99,13 +99,13 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs /// /// [HubMethodName("send")] - public virtual async Task SendMessageAsync(ChatMessage chatMessage) + public async virtual Task SendMessageAsync(ChatMessage chatMessage) { return await SendMessageAsync(Options.GetChatMessageMethod, chatMessage, true); } [HubMethodName("recall")] - public virtual async Task ReCallAsync(ChatMessage chatMessage) + public async virtual Task ReCallAsync(ChatMessage chatMessage) { try { @@ -177,7 +177,7 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs } [HubMethodName("read")] - public virtual async Task ReadAsync(ChatMessage chatMessage) + public async virtual Task ReadAsync(ChatMessage chatMessage) { try { @@ -189,7 +189,7 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs } } - protected virtual async Task SendMessageAsync(string methodName, ChatMessage chatMessage, bool callbackException = false) + protected async virtual Task SendMessageAsync(string methodName, ChatMessage chatMessage, bool callbackException = false) { // 持久化 try @@ -248,13 +248,13 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs return ""; } - protected virtual async Task SendMessageToGroupAsync(string methodName, ChatMessage chatMessage) + protected async virtual Task SendMessageToGroupAsync(string methodName, ChatMessage chatMessage) { var signalRClient = Clients.Group(chatMessage.GroupId); await signalRClient.SendAsync(methodName, chatMessage); } - protected virtual async Task SendMessageToUserAsync(string methodName, ChatMessage chatMessage) + protected async virtual Task SendMessageToUserAsync(string methodName, ChatMessage chatMessage) { var onlineClients = Clients.User(chatMessage.ToUserId.GetValueOrDefault().ToString()); await onlineClients.SendAsync(methodName, chatMessage); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Messages/SignalRMessageSenderProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Messages/SignalRMessageSenderProvider.cs index c16cb9e75..7959a17e9 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Messages/SignalRMessageSenderProvider.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Messages/SignalRMessageSenderProvider.cs @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.IM.SignalR.Messages await TrySendMessageToUserAsync(chatMessage, true); } - protected virtual async Task TrySendMessageToGroupAsync(ChatMessage chatMessage, bool sendingExceptionCallback = true) + protected async virtual Task TrySendMessageToGroupAsync(ChatMessage chatMessage, bool sendingExceptionCallback = true) { try { @@ -65,7 +65,7 @@ namespace LINGYUN.Abp.IM.SignalR.Messages } } - protected virtual async Task TrySendMessageToUserAsync(ChatMessage chatMessage, bool sendingExceptionCallback = true) + protected async virtual Task TrySendMessageToUserAsync(ChatMessage chatMessage, bool sendingExceptionCallback = true) { try { @@ -89,7 +89,7 @@ namespace LINGYUN.Abp.IM.SignalR.Messages } } - protected virtual async Task TrySendBusinessErrorMessage(Exception ex, ChatMessage chatMessage) + protected async virtual Task TrySendBusinessErrorMessage(Exception ex, ChatMessage chatMessage) { if (ex is IBusinessException) { diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSender.cs b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSender.cs index 9a941ace6..60c28c105 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSender.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSender.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.IM.Messages DistributedIdGenerator = distributedIdGenerator; } - public virtual async Task SendMessageAsync(ChatMessage chatMessage) + public async virtual Task SendMessageAsync(ChatMessage chatMessage) { chatMessage.SetProperty(nameof(ChatMessage.IsAnonymous), chatMessage.IsAnonymous); chatMessage.MessageId = DistributedIdGenerator.Create().ToString(); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSenderProviderBase.cs b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSenderProviderBase.cs index 5a708a8b5..16db640c8 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSenderProviderBase.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN/Abp/IM/Messages/MessageSenderProviderBase.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.IM.Messages ServiceProvider = serviceProvider; } - public virtual async Task SendMessageAsync(ChatMessage chatMessage) + public async virtual Task SendMessageAsync(ChatMessage chatMessage) { try { diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IdentityModel/LINGYUN/Abp/IdentityModel/IdentityModelCachedAuthenticationService.cs b/aspnet-core/modules/common/LINGYUN.Abp.IdentityModel/LINGYUN/Abp/IdentityModel/IdentityModelCachedAuthenticationService.cs index 12cbfe3d4..7554c0df4 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IdentityModel/LINGYUN/Abp/IdentityModel/IdentityModelCachedAuthenticationService.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.IdentityModel/LINGYUN/Abp/IdentityModel/IdentityModelCachedAuthenticationService.cs @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.IdentityModel return accessTokenCacheItem.AccessToken; } - protected virtual async Task GetCacheItemAsync(IdentityClientConfiguration configuration) + protected async virtual Task GetCacheItemAsync(IdentityClientConfiguration configuration) { var cacheKey = IdentityModelAuthenticationCacheItem.CalculateCacheKey(configuration.GrantType, configuration.ClientId, configuration.UserName); @@ -74,7 +74,7 @@ namespace LINGYUN.Abp.IdentityModel return cacheItem; } - protected virtual async Task GetAccessTokenResponseAsync(IdentityClientConfiguration configuration) + protected async virtual Task GetAccessTokenResponseAsync(IdentityClientConfiguration configuration) { var discoveryResponse = await GetDiscoveryResponse(configuration); if (discoveryResponse.IsError) diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Localization.Dynamic/LINGYUN/Abp/Localization/Dynamic/DynamicLanguageProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Localization.Dynamic/LINGYUN/Abp/Localization/Dynamic/DynamicLanguageProvider.cs index ae79c7133..b580f7a4b 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Localization.Dynamic/LINGYUN/Abp/Localization/Dynamic/DynamicLanguageProvider.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Localization.Dynamic/LINGYUN/Abp/Localization/Dynamic/DynamicLanguageProvider.cs @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.Localization.Dynamic Options = options.Value; } - public virtual async Task> GetLanguagesAsync() + public async virtual Task> GetLanguagesAsync() { var languages = await Store.GetLanguageListAsync(); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Amap/LINGYUN/Abp/Location/Amap/AmapHttpRequestClient.cs b/aspnet-core/modules/common/LINGYUN.Abp.Location.Amap/LINGYUN/Abp/Location/Amap/AmapHttpRequestClient.cs index 7da0b0906..4cfe6cc6c 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Amap/LINGYUN/Abp/Location/Amap/AmapHttpRequestClient.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Amap/LINGYUN/Abp/Location/Amap/AmapHttpRequestClient.cs @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.Location.Amap CancellationTokenProvider = cancellationTokenProvider; } - public virtual async Task PositiveAsync(AmapPositiveHttpRequestParamter requestParamter) + public async virtual Task PositiveAsync(AmapPositiveHttpRequestParamter requestParamter) { var client = HttpClientFactory.CreateClient(AmapHttpConsts.HttpClientName); var requestUrlBuilder = new StringBuilder(128); @@ -110,7 +110,7 @@ namespace LINGYUN.Abp.Location.Amap return postiveLocation; } - public virtual async Task InverseAsync(AmapInverseHttpRequestParamter requestParamter) + public async virtual Task InverseAsync(AmapInverseHttpRequestParamter requestParamter) { if(requestParamter.Locations.Length > 20) { diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationHttpClient.cs b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationHttpClient.cs index bd977d743..8a33269a5 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationHttpClient.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationHttpClient.cs @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.Location.Baidu CancellationTokenProvider = cancellationTokenProvider; } - public virtual async Task IPGeocodeAsync(string ipAddress) + public async virtual Task IPGeocodeAsync(string ipAddress) { var requestParamters = new Dictionary { @@ -88,7 +88,7 @@ namespace LINGYUN.Abp.Location.Baidu return location; } - public virtual async Task GeocodeAsync(string address, string city = null) + public async virtual Task GeocodeAsync(string address, string city = null) { var requestParamters = new Dictionary { @@ -137,7 +137,7 @@ namespace LINGYUN.Abp.Location.Baidu return location; } - public virtual async Task ReGeocodeAsync(double lat, double lng, int radius = 1000) + public async virtual Task ReGeocodeAsync(double lat, double lng, int radius = 1000) { var requestParamters = new Dictionary { @@ -222,7 +222,7 @@ namespace LINGYUN.Abp.Location.Baidu return location; } - protected virtual async Task MakeRequestAndGetResultAsync(string url) + protected async virtual Task MakeRequestAndGetResultAsync(string url) { var client = HttpClientFactory.CreateClient(BaiduLocationHttpConsts.HttpClientName); var requestMessage = new HttpRequestMessage(HttpMethod.Get, url); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationResolveProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationResolveProvider.cs index 9c34d83d4..52f4aa371 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationResolveProvider.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN/Abp/Location/Baidu/BaiduLocationResolveProvider.cs @@ -15,17 +15,17 @@ namespace LINGYUN.Abp.Location.Baidu BaiduLocationHttpClient = baiduHttpRequestClient; } - public virtual async Task IPGeocodeAsync(string ipAddress) + public async virtual Task IPGeocodeAsync(string ipAddress) { return await BaiduLocationHttpClient.IPGeocodeAsync(ipAddress); } - public virtual async Task ReGeocodeAsync(double lat, double lng, int radius = 50) + public async virtual Task ReGeocodeAsync(double lat, double lng, int radius = 50) { return await BaiduLocationHttpClient.ReGeocodeAsync(lat, lng, radius); } - public virtual async Task GeocodeAsync(string address, string city = null) + public async virtual Task GeocodeAsync(string address, string city = null) { return await BaiduLocationHttpClient.GeocodeAsync(address, city); } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationHttpClient.cs b/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationHttpClient.cs index cf15b4b9c..863f04032 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationHttpClient.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationHttpClient.cs @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.Location.Tencent CancellationTokenProvider = cancellationTokenProvider; } - public virtual async Task IPGeocodeAsync(string ipAddress) + public async virtual Task IPGeocodeAsync(string ipAddress) { var requestParamters = new Dictionary { @@ -77,7 +77,7 @@ namespace LINGYUN.Abp.Location.Tencent return location; } - public virtual async Task GeocodeAsync(string address, string city = null) + public async virtual Task GeocodeAsync(string address, string city = null) { var requestParamters = new Dictionary { @@ -110,7 +110,7 @@ namespace LINGYUN.Abp.Location.Tencent return location; } - public virtual async Task ReGeocodeAsync(double lat, double lng, int radius = 1000) + public async virtual Task ReGeocodeAsync(double lat, double lng, int radius = 1000) { var requestParamters = new Dictionary { @@ -168,7 +168,7 @@ namespace LINGYUN.Abp.Location.Tencent return location; } - protected virtual async Task MakeRequestAndGetResultAsync(string url) + protected async virtual Task MakeRequestAndGetResultAsync(string url) { var client = HttpClientFactory.CreateClient(TencentLocationHttpConsts.HttpClientName); var requestMessage = new HttpRequestMessage(HttpMethod.Get, url); @@ -188,7 +188,7 @@ namespace LINGYUN.Abp.Location.Tencent return CancellationTokenProvider.Token; } - protected virtual async Task GetTencentMapResponseAsync(string url, string path, IDictionary paramters) + protected async virtual Task GetTencentMapResponseAsync(string url, string path, IDictionary paramters) where TResponse : TencentLocationResponse { var requestUrl = BuildRequestUrl(url, path, paramters); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationResolveProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationResolveProvider.cs index f5bdfad2f..7bcadd476 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationResolveProvider.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Tencent/LINGYUN/Abp/Location/Tencent/TencentLocationResolveProvider.cs @@ -15,17 +15,17 @@ namespace LINGYUN.Abp.Location.Tencent TencentLocationHttpClient = tencentLocationHttpClient; } - public virtual async Task IPGeocodeAsync(string ipAddress) + public async virtual Task IPGeocodeAsync(string ipAddress) { return await TencentLocationHttpClient.IPGeocodeAsync(ipAddress); } - public virtual async Task ReGeocodeAsync(double lat, double lng, int radius = 50) + public async virtual Task ReGeocodeAsync(double lat, double lng, int radius = 50) { return await TencentLocationHttpClient.ReGeocodeAsync(lat, lng, radius); } - public virtual async Task GeocodeAsync(string address, string city = null) + public async virtual Task GeocodeAsync(string address, string city = null) { return await TencentLocationHttpClient.GeocodeAsync(address, city); } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs index 30c906889..d0782846f 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Abp.Notifications _dynamicStore = dynamicStore; } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var notification = await GetOrNullAsync(name); if (notification == null) @@ -31,7 +31,7 @@ namespace LINGYUN.Abp.Notifications return notification; } - public virtual async Task GetOrNullAsync(string name) + public async virtual Task GetOrNullAsync(string name) { Check.NotNull(name, nameof(name)); @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.Notifications await _dynamicStore.GetOrNullAsync(name); } - public virtual async Task> GetNotificationsAsync() + public async virtual Task> GetNotificationsAsync() { var staticNotifications = await _staticStore.GetNotificationsAsync(); var staticNotificationNames = staticNotifications diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/Hubs/NotificationsHub.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/Hubs/NotificationsHub.cs index 5136f049d..8d21833cd 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/Hubs/NotificationsHub.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/Hubs/NotificationsHub.cs @@ -48,7 +48,7 @@ namespace LINGYUN.Abp.Notifications.SignalR.Hubs // [HubMethodName("MySubscriptions")] [HubMethodName("my-subscriptions")] - public virtual async Task> GetMySubscriptionsAsync() + public async virtual Task> GetMySubscriptionsAsync() { var subscriptions = await NotificationStore .GetUserSubscriptionsAsync(CurrentTenant.Id, CurrentUser.GetId()); @@ -59,7 +59,7 @@ namespace LINGYUN.Abp.Notifications.SignalR.Hubs [UnitOfWork] // [HubMethodName("GetNotification")] [HubMethodName("get-notifications")] - public virtual async Task> GetNotificationAsync() + public async virtual Task> GetNotificationAsync() { var userNotifications = await NotificationStore .GetUserNotificationsAsync(CurrentTenant.Id, CurrentUser.GetId(), NotificationReadState.UnRead, 10); @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.Notifications.SignalR.Hubs // [HubMethodName("ChangeState")] [HubMethodName("change-state")] - public virtual async Task ChangeStateAsync(string id, NotificationReadState readState = NotificationReadState.Read) + public async virtual Task ChangeStateAsync(string id, NotificationReadState readState = NotificationReadState.Read) { await NotificationStore .ChangeUserNotificationReadStateAsync( diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/SmsNotificationSender.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/SmsNotificationSender.cs index b55dc353d..f0687afef 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/SmsNotificationSender.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/SmsNotificationSender.cs @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.Notifications.Sms /// /// /// - public virtual async Task SendAsync(NotificationInfo notification, string phoneNumbers) + public async virtual Task SendAsync(NotificationInfo notification, string phoneNumbers) { var templateCode = notification.Data.TryGetData("TemplateCode"); if (templateCode == null) diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSubscriptionManager.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSubscriptionManager.cs index 006ee9c83..aedef2807 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSubscriptionManager.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSubscriptionManager.cs @@ -16,7 +16,7 @@ namespace LINGYUN.Abp.Notifications.Internal _store = store; } - public virtual async Task> GetUsersSubscriptionsAsync( + public async virtual Task> GetUsersSubscriptionsAsync( Guid? tenantId, string notificationName, IEnumerable identifiers = null, @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.Notifications.Internal return await _store.GetUserSubscriptionsAsync(tenantId, notificationName, identifiers, cancellationToken); } - public virtual async Task> GetUserSubscriptionsAsync( + public async virtual Task> GetUserSubscriptionsAsync( Guid? tenantId, Guid userId, CancellationToken cancellationToken = default) @@ -33,7 +33,7 @@ namespace LINGYUN.Abp.Notifications.Internal return await _store.GetUserSubscriptionsAsync(tenantId, userId, cancellationToken); } - public virtual async Task> GetUserSubscriptionsAsync( + public async virtual Task> GetUserSubscriptionsAsync( Guid? tenantId, string userName, CancellationToken cancellationToken = default) @@ -41,7 +41,7 @@ namespace LINGYUN.Abp.Notifications.Internal return await _store.GetUserSubscriptionsAsync(tenantId, userName, cancellationToken); } - public virtual async Task IsSubscribedAsync( + public async virtual Task IsSubscribedAsync( Guid? tenantId, Guid userId, string notificationName, @@ -50,7 +50,7 @@ namespace LINGYUN.Abp.Notifications.Internal return await _store.IsSubscribedAsync(tenantId, userId, notificationName, cancellationToken); } - public virtual async Task SubscribeAsync( + public async virtual Task SubscribeAsync( Guid? tenantId, UserIdentifier identifier, string notificationName, @@ -63,7 +63,7 @@ namespace LINGYUN.Abp.Notifications.Internal await _store.InsertUserSubscriptionAsync(tenantId, identifier, notificationName, cancellationToken); } - public virtual async Task SubscribeAsync( + public async virtual Task SubscribeAsync( Guid? tenantId, IEnumerable identifiers, string notificationName, @@ -75,7 +75,7 @@ namespace LINGYUN.Abp.Notifications.Internal } } - public virtual async Task UnsubscribeAsync( + public async virtual Task UnsubscribeAsync( Guid? tenantId, UserIdentifier identifier, string notificationName, @@ -84,7 +84,7 @@ namespace LINGYUN.Abp.Notifications.Internal await _store.DeleteUserSubscriptionAsync(tenantId, identifier.UserId, notificationName, cancellationToken); } - public virtual async Task UnsubscribeAllAsync( + public async virtual Task UnsubscribeAllAsync( Guid? tenantId, string notificationName, CancellationToken cancellationToken = default) @@ -92,7 +92,7 @@ namespace LINGYUN.Abp.Notifications.Internal await _store.DeleteAllUserSubscriptionAsync(tenantId, notificationName, cancellationToken); } - public virtual async Task UnsubscribeAsync( + public async virtual Task UnsubscribeAsync( Guid? tenantId, IEnumerable identifiers, string notificationName, diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN/Abp/Sms/Aliyun/AliyunSmsSender.cs b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN/Abp/Sms/Aliyun/AliyunSmsSender.cs index 5d02fa092..d9ab8e8d7 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN/Abp/Sms/Aliyun/AliyunSmsSender.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN/Abp/Sms/Aliyun/AliyunSmsSender.cs @@ -36,7 +36,7 @@ namespace LINGYUN.Abp.Sms.Aliyun AcsClientFactory = acsClientFactory; } - public virtual async Task SendAsync(SmsMessage smsMessage) + public async virtual Task SendAsync(SmsMessage smsMessage) { var domain = await SettingProvider.GetOrNullAsync(AliyunSettingNames.Sms.Domain); var action = await SettingProvider.GetOrNullAsync(AliyunSettingNames.Sms.ActionName); diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DaprApiDescriptionFinder.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DaprApiDescriptionFinder.cs index 9eac6c797..18dfa87b3 100644 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DaprApiDescriptionFinder.cs +++ b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DaprApiDescriptionFinder.cs @@ -14,7 +14,7 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client.DynamicProxying; using Volo.Abp.Http.Modeling; using Volo.Abp.MultiTenancy; -using Volo.Abp.Reflection; +using Volo.Abp.Reflection; using Volo.Abp.Threading; using Volo.Abp.Tracing; @@ -22,9 +22,9 @@ namespace LINGYUN.Abp.Dapr.Client.DynamicProxying { public class DaprApiDescriptionFinder : IDaprApiDescriptionFinder, ITransientDependency { - public static JsonSerializerOptions DeserializeOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase + public static JsonSerializerOptions DeserializeOptions = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; public ICancellationTokenProvider CancellationTokenProvider { get; set; } @@ -50,7 +50,7 @@ namespace LINGYUN.Abp.Dapr.Client.DynamicProxying CancellationTokenProvider = NullCancellationTokenProvider.Instance; } - public virtual async Task FindActionAsync(string service, string appId, Type serviceType, MethodInfo method) + public async virtual Task FindActionAsync(string service, string appId, Type serviceType, MethodInfo method) { var apiDescription = await GetApiDescriptionAsync(service, appId); @@ -94,12 +94,12 @@ namespace LINGYUN.Abp.Dapr.Client.DynamicProxying throw new AbpException($"Could not found remote action for method: {method} on the appId: {appId}"); } - public virtual async Task GetApiDescriptionAsync(string service, string appId) + public async virtual Task GetApiDescriptionAsync(string service, string appId) { return await Cache.GetAsync(appId, () => GetApiDescriptionFromServerAsync(service, appId)); } - protected virtual async Task GetApiDescriptionFromServerAsync(string service, string appId) + protected async virtual Task GetApiDescriptionFromServerAsync(string service, string appId) { var client = DaprClientFactory.CreateClient(service); var requestMessage = client.CreateInvokeMethodRequest(HttpMethod.Get, appId, "api/abp/api-definition"); diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DynamicDaprClientProxyInterceptor.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DynamicDaprClientProxyInterceptor.cs index 2344d9892..2aade5ee6 100644 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DynamicDaprClientProxyInterceptor.cs +++ b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Client/LINGYUN/Abp/Dapr/Client/DynamicProxying/DynamicDaprClientProxyInterceptor.cs @@ -70,7 +70,7 @@ namespace LINGYUN.Abp.Dapr.Client.DynamicProxying } } - protected virtual async Task GetActionApiDescriptionModel(IAbpMethodInvocation invocation) + protected async virtual Task GetActionApiDescriptionModel(IAbpMethodInvocation invocation) { var clientConfig = ClientProxyOptions.DaprClientProxies.GetOrDefault(typeof(TService)) ?? throw new AbpException($"Could not get DynamicDaprClientProxyConfig for {typeof(TService).FullName}."); @@ -84,12 +84,12 @@ namespace LINGYUN.Abp.Dapr.Client.DynamicProxying ); } - protected virtual async Task CallRequestAsync(ClientProxyRequestContext context) + protected async virtual Task CallRequestAsync(ClientProxyRequestContext context) { return await InterceptorClientProxy.CallRequestAsync(context); } - protected virtual async Task GetResultAsync(Task task, Type resultType) + protected async virtual Task GetResultAsync(Task task, Type resultType) { await task; var resultProperty = typeof(Task<>) diff --git a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtection.EntityFrameworkCore/LINGYUN/Abp/DataProtection/EntityFrameworkCore/EfCoreDataProtectionRepositoryBase.cs b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtection.EntityFrameworkCore/LINGYUN/Abp/DataProtection/EntityFrameworkCore/EfCoreDataProtectionRepositoryBase.cs index 9ea99a12b..308781eca 100644 --- a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtection.EntityFrameworkCore/LINGYUN/Abp/DataProtection/EntityFrameworkCore/EfCoreDataProtectionRepositoryBase.cs +++ b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtection.EntityFrameworkCore/LINGYUN/Abp/DataProtection/EntityFrameworkCore/EfCoreDataProtectionRepositoryBase.cs @@ -115,7 +115,7 @@ namespace LINGYUN.Abp.DataProtection.EntityFrameworkCore await DeleteManyAsync(entities, autoSave, cancellationToken); } - protected virtual async Task> WithDetailsAsync(ProtectBehavior behavior = ProtectBehavior.All) + protected async virtual Task> WithDetailsAsync(ProtectBehavior behavior = ProtectBehavior.All) { if (typeof(IDataProtection).IsAssignableFrom(typeof(TEntity))) { @@ -131,7 +131,7 @@ namespace LINGYUN.Abp.DataProtection.EntityFrameworkCore return await base.WithDetailsAsync(); } - protected virtual async Task> WithDetailsAsync(ResourceGrantedResult resourceGranted) + protected async virtual Task> WithDetailsAsync(ResourceGrantedResult resourceGranted) { if (AbpEntityOptions.DefaultWithDetailsFunc == null) { @@ -140,7 +140,7 @@ namespace LINGYUN.Abp.DataProtection.EntityFrameworkCore return AbpEntityOptions.DefaultWithDetailsFunc(await GetQueryableAsync(resourceGranted)); } - protected virtual async Task> GetQueryableAsync(ProtectBehavior behavior = ProtectBehavior.All) + protected async virtual Task> GetQueryableAsync(ProtectBehavior behavior = ProtectBehavior.All) { if (typeof(IDataProtection).IsAssignableFrom(typeof(TEntity))) { @@ -156,7 +156,7 @@ namespace LINGYUN.Abp.DataProtection.EntityFrameworkCore return await base.GetQueryableAsync(); } - protected virtual async Task> GetQueryableAsync(ResourceGrantedResult resourceGranted) + protected async virtual Task> GetQueryableAsync(ResourceGrantedResult resourceGranted) { var queryable = await base.GetQueryableAsync(); if (!resourceGranted.Succeeded) diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityClaimTypeAppService.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityClaimTypeAppService.cs index 4e17d2dc1..920d37789 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityClaimTypeAppService.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityClaimTypeAppService.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.IdentityClaimType.Create)] - public virtual async Task CreateAsync(IdentityClaimTypeCreateDto input) + public async virtual Task CreateAsync(IdentityClaimTypeCreateDto input) { if (await IdentityClaimTypeRepository.AnyAsync(input.Name)) { @@ -47,7 +47,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.IdentityClaimType.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var identityClaimType = await IdentityClaimTypeRepository.FindAsync(id); if (identityClaimType == null) @@ -58,14 +58,14 @@ namespace LINGYUN.Abp.Identity await IdentityClaimTypeRepository.DeleteAsync(identityClaimType); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var identityClaimType = await IdentityClaimTypeRepository.FindAsync(id); return ObjectMapper.Map(identityClaimType); } - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { var identityClaimTypes = await IdentityClaimTypeRepository .GetListAsync(); @@ -74,7 +74,7 @@ namespace LINGYUN.Abp.Identity ObjectMapper.Map, List>(identityClaimTypes)); } - public virtual async Task> GetListAsync(IdentityClaimTypeGetByPagedDto input) + public async virtual Task> GetListAsync(IdentityClaimTypeGetByPagedDto input) { var identityClaimTypeCount = await IdentityClaimTypeRepository.GetCountAsync(input.Filter); @@ -86,7 +86,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.IdentityClaimType.Update)] - public virtual async Task UpdateAsync(Guid id, IdentityClaimTypeUpdateDto input) + public async virtual Task UpdateAsync(Guid id, IdentityClaimTypeUpdateDto input) { var identityClaimType = await IdentityClaimTypeRepository.GetAsync(id); CheckChangingClaimType(identityClaimType); diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityRoleAppService.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityRoleAppService.cs index 93e8d21bc..06946697b 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityRoleAppService.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityRoleAppService.cs @@ -27,7 +27,7 @@ namespace LINGYUN.Abp.Identity #region OrganizationUnit [Authorize(IdentityPermissions.Roles.ManageOrganizationUnits)] - public virtual async Task> GetOrganizationUnitsAsync(Guid id) + public async virtual Task> GetOrganizationUnitsAsync(Guid id) { var origanizationUnits = await IdentityRoleRepository.GetOrganizationUnitsAsync(id); @@ -36,7 +36,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Roles.ManageOrganizationUnits)] - public virtual async Task SetOrganizationUnitsAsync(Guid id, IdentityRoleAddOrRemoveOrganizationUnitDto input) + public async virtual Task SetOrganizationUnitsAsync(Guid id, IdentityRoleAddOrRemoveOrganizationUnitDto input) { var origanizationUnits = await IdentityRoleRepository.GetOrganizationUnitsAsync(id, true); @@ -57,7 +57,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Roles.ManageOrganizationUnits)] - public virtual async Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) + public async virtual Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) { await OrganizationUnitManager.RemoveRoleFromOrganizationUnitAsync(id, ouId); @@ -68,7 +68,7 @@ namespace LINGYUN.Abp.Identity #region ClaimType - public virtual async Task> GetClaimsAsync(Guid id) + public async virtual Task> GetClaimsAsync(Guid id) { var role = await IdentityRoleRepository.GetAsync(id); @@ -76,7 +76,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Roles.ManageClaims)] - public virtual async Task AddClaimAsync(Guid id, IdentityRoleClaimCreateDto input) + public async virtual Task AddClaimAsync(Guid id, IdentityRoleClaimCreateDto input) { var role = await IdentityRoleRepository.GetAsync(id); var claim = new Claim(input.ClaimType, input.ClaimValue); @@ -92,7 +92,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Roles.ManageClaims)] - public virtual async Task UpdateClaimAsync(Guid id, IdentityRoleClaimUpdateDto input) + public async virtual Task UpdateClaimAsync(Guid id, IdentityRoleClaimUpdateDto input) { var role = await IdentityRoleRepository.GetAsync(id); var oldClaim = role.FindClaim(new Claim(input.ClaimType, input.ClaimValue)); @@ -108,7 +108,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Roles.ManageClaims)] - public virtual async Task DeleteClaimAsync(Guid id, IdentityRoleClaimDeleteDto input) + public async virtual Task DeleteClaimAsync(Guid id, IdentityRoleClaimDeleteDto input) { var role = await IdentityRoleRepository.GetAsync(id); role.RemoveClaim(new Claim(input.ClaimType, input.ClaimValue)); diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityUserAppService.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityUserAppService.cs index 4ad3cefe3..34bd5ec03 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityUserAppService.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/IdentityUserAppService.cs @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.Identity [Authorize(IdentityPermissions.Users.ManageOrganizationUnits)] - public virtual async Task> GetOrganizationUnitsAsync(Guid id) + public async virtual Task> GetOrganizationUnitsAsync(Guid id) { var user = await UserManager.GetByIdAsync(id); @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Users.ManageOrganizationUnits)] - public virtual async Task SetOrganizationUnitsAsync(Guid id, IdentityUserOrganizationUnitUpdateDto input) + public async virtual Task SetOrganizationUnitsAsync(Guid id, IdentityUserOrganizationUnitUpdateDto input) { var user = await UserManager.GetByIdAsync(id); @@ -49,7 +49,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Users.ManageOrganizationUnits)] - public virtual async Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) + public async virtual Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) { await UserManager.RemoveFromOrganizationUnitAsync(id, ouId); @@ -60,7 +60,7 @@ namespace LINGYUN.Abp.Identity #region Claim - public virtual async Task> GetClaimsAsync(Guid id) + public async virtual Task> GetClaimsAsync(Guid id) { var user = await UserManager.GetByIdAsync(id); @@ -68,7 +68,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Users.ManageClaims)] - public virtual async Task AddClaimAsync(Guid id, IdentityUserClaimCreateDto input) + public async virtual Task AddClaimAsync(Guid id, IdentityUserClaimCreateDto input) { var user = await UserManager.GetByIdAsync(id); var claim = new Claim(input.ClaimType, input.ClaimValue); @@ -83,7 +83,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Users.ManageClaims)] - public virtual async Task UpdateClaimAsync(Guid id, IdentityUserClaimUpdateDto input) + public async virtual Task UpdateClaimAsync(Guid id, IdentityUserClaimUpdateDto input) { var user = await UserManager.GetByIdAsync(id); var oldClaim = new Claim(input.ClaimType, input.ClaimValue); @@ -95,7 +95,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.Users.ManageClaims)] - public virtual async Task DeleteClaimAsync(Guid id, IdentityUserClaimDeleteDto input) + public async virtual Task DeleteClaimAsync(Guid id, IdentityUserClaimDeleteDto input) { var user = await UserManager.GetByIdAsync(id); user.RemoveClaim(new Claim(input.ClaimType, input.ClaimValue)); @@ -131,7 +131,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(Volo.Abp.Identity.IdentityPermissions.Users.Update)] - public virtual async Task ChangeTwoFactorEnabledAsync(Guid id, TwoFactorEnabledDto input) + public async virtual Task ChangeTwoFactorEnabledAsync(Guid id, TwoFactorEnabledDto input) { var user = await GetUserAsync(id); @@ -141,7 +141,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(Volo.Abp.Identity.IdentityPermissions.Users.Update)] - public virtual async Task LockAsync(Guid id, int seconds) + public async virtual Task LockAsync(Guid id, int seconds) { var user = await GetUserAsync(id); //if (!UserManager.SupportsUserLockout) @@ -155,7 +155,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(Volo.Abp.Identity.IdentityPermissions.Users.Update)] - public virtual async Task UnLockAsync(Guid id) + public async virtual Task UnLockAsync(Guid id) { var user = await GetUserAsync(id); (await UserManager.SetLockoutEndDateAsync(user, null)).CheckErrors(); @@ -163,7 +163,7 @@ namespace LINGYUN.Abp.Identity await CurrentUnitOfWork.SaveChangesAsync(); } - protected virtual async Task GetUserAsync(Guid id) + protected async virtual Task GetUserAsync(Guid id) { await IdentityOptions.SetAsync(); var user = await UserManager.GetByIdAsync(id); diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/OrganizationUnitAppService.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/OrganizationUnitAppService.cs index 55ac0102e..3581a8a6a 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/OrganizationUnitAppService.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/OrganizationUnitAppService.cs @@ -36,7 +36,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.Create)] - public virtual async Task CreateAsync(OrganizationUnitCreateDto input) + public async virtual Task CreateAsync(OrganizationUnitCreateDto input) { var origanizationUnit = new OrganizationUnit( GuidGenerator.Create(), input.DisplayName, input.ParentId, CurrentTenant.Id) @@ -52,7 +52,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var origanizationUnit = await OrganizationUnitRepository.FindAsync(id); if (origanizationUnit == null) @@ -62,7 +62,7 @@ namespace LINGYUN.Abp.Identity await OrganizationUnitManager.DeleteAsync(id); } - public virtual async Task> GetRootAsync() + public async virtual Task> GetRootAsync() { var rootOriganizationUnits = await OrganizationUnitManager.FindChildrenAsync(null, recursive: false); @@ -70,7 +70,7 @@ namespace LINGYUN.Abp.Identity ObjectMapper.Map, List>(rootOriganizationUnits)); } - public virtual async Task> FindChildrenAsync(OrganizationUnitGetChildrenDto input) + public async virtual Task> FindChildrenAsync(OrganizationUnitGetChildrenDto input) { var origanizationUnitChildren = await OrganizationUnitManager.FindChildrenAsync(input.Id, input.Recursive); @@ -78,21 +78,21 @@ namespace LINGYUN.Abp.Identity ObjectMapper.Map, List>(origanizationUnitChildren)); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var origanizationUnit = await OrganizationUnitRepository.FindAsync(id); return ObjectMapper.Map(origanizationUnit); } - public virtual async Task GetLastChildOrNullAsync(Guid? parentId) + public async virtual Task GetLastChildOrNullAsync(Guid? parentId) { var origanizationUnitLastChildren = await OrganizationUnitManager.GetLastChildOrNullAsync(parentId); return ObjectMapper.Map(origanizationUnitLastChildren); } - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { var origanizationUnits = await OrganizationUnitRepository.GetListAsync(false); @@ -100,7 +100,7 @@ namespace LINGYUN.Abp.Identity ObjectMapper.Map, List>(origanizationUnits)); } - public virtual async Task> GetListAsync(OrganizationUnitGetByPagedDto input) + public async virtual Task> GetListAsync(OrganizationUnitGetByPagedDto input) { var origanizationUnitCount = await OrganizationUnitRepository.GetCountAsync(); var origanizationUnits = await OrganizationUnitRepository @@ -111,14 +111,14 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.ManageRoles)] - public virtual async Task> GetRoleNamesAsync(Guid id) + public async virtual Task> GetRoleNamesAsync(Guid id) { var inOrignizationUnitRoleNames = await UserRepository.GetRoleNamesInOrganizationUnitAsync(id); return new ListResultDto(inOrignizationUnitRoleNames); } [Authorize(IdentityPermissions.OrganizationUnits.ManageRoles)] - public virtual async Task> GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input) + public async virtual Task> GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); @@ -135,7 +135,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.ManageRoles)] - public virtual async Task> GetRolesAsync(Guid id, PagedAndSortedResultRequestDto input) + public async virtual Task> GetRolesAsync(Guid id, PagedAndSortedResultRequestDto input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); @@ -153,7 +153,7 @@ namespace LINGYUN.Abp.Identity [Authorize(IdentityPermissions.OrganizationUnits.ManageUsers)] - public virtual async Task> GetUnaddedUsersAsync(Guid id, OrganizationUnitGetUnaddedUserByPagedDto input) + public async virtual Task> GetUnaddedUsersAsync(Guid id, OrganizationUnitGetUnaddedUserByPagedDto input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); @@ -169,7 +169,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.ManageUsers)] - public virtual async Task> GetUsersAsync(Guid id, GetIdentityUsersInput input) + public async virtual Task> GetUsersAsync(Guid id, GetIdentityUsersInput input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); @@ -185,13 +185,13 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.Update)] - public virtual async Task MoveAsync(Guid id, OrganizationUnitMoveDto input) + public async virtual Task MoveAsync(Guid id, OrganizationUnitMoveDto input) { await OrganizationUnitManager.MoveAsync(id, input.ParentId); } [Authorize(IdentityPermissions.OrganizationUnits.Update)] - public virtual async Task UpdateAsync(Guid id, OrganizationUnitUpdateDto input) + public async virtual Task UpdateAsync(Guid id, OrganizationUnitUpdateDto input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); origanizationUnit.DisplayName = input.DisplayName; @@ -204,7 +204,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.ManageUsers)] - public virtual async Task AddUsersAsync(Guid id, OrganizationUnitAddUserDto input) + public async virtual Task AddUsersAsync(Guid id, OrganizationUnitAddUserDto input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); var users = await UserRepository.GetListByIdListAsync(input.UserIds, includeDetails: true); @@ -219,7 +219,7 @@ namespace LINGYUN.Abp.Identity } [Authorize(IdentityPermissions.OrganizationUnits.ManageRoles)] - public virtual async Task AddRolesAsync(Guid id, OrganizationUnitAddRoleDto input) + public async virtual Task AddRolesAsync(Guid id, OrganizationUnitAddRoleDto input) { var origanizationUnit = await OrganizationUnitRepository.GetAsync(id); diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs index 823d4c828..96c3b7852 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs @@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Identity : await base.ValidateAsync(manager, user); } - protected virtual async Task ValidatePhoneNumberAsync(UserManager manager, IdentityUser user, ICollection errors) + protected async virtual Task ValidatePhoneNumberAsync(UserManager manager, IdentityUser user, ICollection errors) { var phoneNumber = await manager.GetPhoneNumberAsync(user); if (phoneNumber.IsNullOrWhiteSpace()) diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs index dbcc14ac7..f34d036d0 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore { } - public virtual async Task> GetListByIdListAsync( + public async virtual Task> GetListByIdListAsync( List roleIds, bool includeDetails = false, CancellationToken cancellationToken = default @@ -30,7 +30,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetOrganizationUnitsAsync( + public async virtual Task> GetOrganizationUnitsAsync( Guid id, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -44,7 +44,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore return await query.ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetOrganizationUnitsAsync( + public async virtual Task> GetOrganizationUnitsAsync( IEnumerable roleNames, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -59,7 +59,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore return await query.ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetRolesInOrganizationsListAsync( + public async virtual Task> GetRolesInOrganizationsListAsync( List organizationUnitIds, CancellationToken cancellationToken = default) { @@ -70,7 +70,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore return await query.ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetRolesInOrganizationUnitAsync( + public async virtual Task> GetRolesInOrganizationUnitAsync( Guid organizationUnitId, CancellationToken cancellationToken = default) { @@ -81,7 +81,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore return await query.ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetRolesInOrganizationUnitWithChildrenAsync( + public async virtual Task> GetRolesInOrganizationUnitWithChildrenAsync( string code, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs index 9ebd9515d..a033f55ac 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.EntityFrameworkCore/LINGYUN/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore { } - public virtual async Task IsPhoneNumberUedAsync( + public async virtual Task IsPhoneNumberUedAsync( string phoneNumber, CancellationToken cancellationToken = default) { @@ -29,7 +29,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore GetCancellationToken(cancellationToken)); } - public virtual async Task IsPhoneNumberConfirmedAsync( + public async virtual Task IsPhoneNumberConfirmedAsync( string phoneNumber, CancellationToken cancellationToken = default) { @@ -38,7 +38,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore GetCancellationToken(cancellationToken)); } - public virtual async Task IsNormalizedEmailConfirmedAsync( + public async virtual Task IsNormalizedEmailConfirmedAsync( string normalizedEmail, CancellationToken cancellationToken = default) { @@ -47,7 +47,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore GetCancellationToken(cancellationToken)); } - public virtual async Task FindByPhoneNumberAsync( + public async virtual Task FindByPhoneNumberAsync( string phoneNumber, bool isConfirmed = true, bool includeDetails = false, @@ -58,7 +58,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListByIdListAsync( + public async virtual Task> GetListByIdListAsync( List userIds, bool includeDetails = false, CancellationToken cancellationToken = default @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetOrganizationUnitsAsync( + public async virtual Task> GetOrganizationUnitsAsync( Guid id, string filter = null, bool includeDetails = false, @@ -111,7 +111,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetUsersInOrganizationUnitCountAsync( + public async virtual Task GetUsersInOrganizationUnitCountAsync( Guid organizationUnitId, string filter = null, CancellationToken cancellationToken = default @@ -130,7 +130,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetUsersInOrganizationUnitAsync( + public async virtual Task> GetUsersInOrganizationUnitAsync( Guid organizationUnitId, string filter = null, int skipCount = 1, @@ -152,7 +152,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetUsersInOrganizationsListCountAsync( + public async virtual Task GetUsersInOrganizationsListCountAsync( List organizationUnitIds, string filter = null, CancellationToken cancellationToken = default @@ -171,7 +171,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetUsersInOrganizationsListAsync( + public async virtual Task> GetUsersInOrganizationsListAsync( List organizationUnitIds, string filter = null, int skipCount = 1, @@ -193,7 +193,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetUsersInOrganizationUnitWithChildrenCountAsync( + public async virtual Task GetUsersInOrganizationUnitWithChildrenCountAsync( string code, string filter = null, CancellationToken cancellationToken = default @@ -213,7 +213,7 @@ namespace LINGYUN.Abp.Identity.EntityFrameworkCore .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetUsersInOrganizationUnitWithChildrenAsync( + public async virtual Task> GetUsersInOrganizationUnitWithChildrenAsync( string code, string filter = null, int skipCount = 1, diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs index 465922140..6bcaa0c07 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs @@ -21,41 +21,41 @@ namespace LINGYUN.Abp.Identity } [HttpPost] - public virtual async Task CreateAsync(IdentityClaimTypeCreateDto input) + public async virtual Task CreateAsync(IdentityClaimTypeCreateDto input) { return await IdentityClaimTypeAppService.CreateAsync(input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await IdentityClaimTypeAppService.DeleteAsync(id); } [HttpGet] [Route("actived-list")] - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { return await IdentityClaimTypeAppService.GetAllListAsync(); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await IdentityClaimTypeAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(IdentityClaimTypeGetByPagedDto input) + public async virtual Task> GetListAsync(IdentityClaimTypeGetByPagedDto input) { return await IdentityClaimTypeAppService.GetListAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, IdentityClaimTypeUpdateDto input) + public async virtual Task UpdateAsync(Guid id, IdentityClaimTypeUpdateDto input) { return await IdentityClaimTypeAppService.UpdateAsync(id, input); } diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs index cf0a66cf7..9096f7563 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs @@ -25,21 +25,21 @@ namespace LINGYUN.Abp.Identity [HttpGet] [Route("{id}/organization-units")] - public virtual async Task> GetOrganizationUnitsAsync(Guid id) + public async virtual Task> GetOrganizationUnitsAsync(Guid id) { return await RoleAppService.GetOrganizationUnitsAsync(id); } [HttpPut] [Route("{id}/organization-units")] - public virtual async Task SetOrganizationUnitsAsync(Guid id, IdentityRoleAddOrRemoveOrganizationUnitDto input) + public async virtual Task SetOrganizationUnitsAsync(Guid id, IdentityRoleAddOrRemoveOrganizationUnitDto input) { await RoleAppService.SetOrganizationUnitsAsync(id, input); } [HttpDelete] [Route("{id}/organization-units/{ouId}")] - public virtual async Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) + public async virtual Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) { await RoleAppService.RemoveOrganizationUnitsAsync(id, ouId); } @@ -50,28 +50,28 @@ namespace LINGYUN.Abp.Identity [HttpGet] [Route("{id}/claims")] - public virtual async Task> GetClaimsAsync(Guid id) + public async virtual Task> GetClaimsAsync(Guid id) { return await RoleAppService.GetClaimsAsync(id); } [HttpPost] [Route("{id}/claims")] - public virtual async Task AddClaimAsync(Guid id, IdentityRoleClaimCreateDto input) + public async virtual Task AddClaimAsync(Guid id, IdentityRoleClaimCreateDto input) { await RoleAppService.AddClaimAsync(id, input); } [HttpPut] [Route("{id}/claims")] - public virtual async Task UpdateClaimAsync(Guid id, IdentityRoleClaimUpdateDto input) + public async virtual Task UpdateClaimAsync(Guid id, IdentityRoleClaimUpdateDto input) { await RoleAppService.UpdateClaimAsync(id, input); } [HttpDelete] [Route("{id}/claims")] - public virtual async Task DeleteClaimAsync(Guid id, IdentityRoleClaimDeleteDto input) + public async virtual Task DeleteClaimAsync(Guid id, IdentityRoleClaimDeleteDto input) { await RoleAppService.DeleteClaimAsync(id, input); } diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs index a69425434..5aa5b5953 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs @@ -25,21 +25,21 @@ namespace LINGYUN.Abp.Identity [HttpGet] [Route("{id}/organization-units")] - public virtual async Task> GetOrganizationUnitsAsync(Guid id) + public async virtual Task> GetOrganizationUnitsAsync(Guid id) { return await UserAppService.GetOrganizationUnitsAsync(id); } [HttpPut] [Route("{id}/organization-units")] - public virtual async Task SetOrganizationUnitsAsync(Guid id, IdentityUserOrganizationUnitUpdateDto input) + public async virtual Task SetOrganizationUnitsAsync(Guid id, IdentityUserOrganizationUnitUpdateDto input) { await UserAppService.SetOrganizationUnitsAsync(id, input); } [HttpDelete] [Route("{id}/organization-units/{ouId}")] - public virtual async Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) + public async virtual Task RemoveOrganizationUnitsAsync(Guid id, Guid ouId) { await UserAppService.RemoveOrganizationUnitsAsync(id, ouId); } @@ -50,28 +50,28 @@ namespace LINGYUN.Abp.Identity [HttpGet] [Route("{id}/claims")] - public virtual async Task> GetClaimsAsync(Guid id) + public async virtual Task> GetClaimsAsync(Guid id) { return await UserAppService.GetClaimsAsync(id); } [HttpPost] [Route("{id}/claims")] - public virtual async Task AddClaimAsync(Guid id, IdentityUserClaimCreateDto input) + public async virtual Task AddClaimAsync(Guid id, IdentityUserClaimCreateDto input) { await UserAppService.AddClaimAsync(id, input); } [HttpPut] [Route("{id}/claims")] - public virtual async Task UpdateClaimAsync(Guid id, IdentityUserClaimUpdateDto input) + public async virtual Task UpdateClaimAsync(Guid id, IdentityUserClaimUpdateDto input) { await UserAppService.UpdateClaimAsync(id, input); } [HttpDelete] [Route("{id}/claims")] - public virtual async Task DeleteClaimAsync(Guid id, IdentityUserClaimDeleteDto input) + public async virtual Task DeleteClaimAsync(Guid id, IdentityUserClaimDeleteDto input) { await UserAppService.DeleteClaimAsync(id, input); } @@ -87,21 +87,21 @@ namespace LINGYUN.Abp.Identity [HttpPut] [Route("change-two-factor")] - public virtual async Task ChangeTwoFactorEnabledAsync(Guid id, TwoFactorEnabledDto input) + public async virtual Task ChangeTwoFactorEnabledAsync(Guid id, TwoFactorEnabledDto input) { await UserAppService.ChangeTwoFactorEnabledAsync(id, input); } [HttpPut] [Route("{id}/lock/{seconds}")] - public virtual async Task LockAsync(Guid id, int seconds) + public async virtual Task LockAsync(Guid id, int seconds) { await UserAppService.LockAsync(id, seconds); } [HttpPut] [Route("{id}/unlock")] - public virtual async Task UnLockAsync(Guid id) + public async virtual Task UnLockAsync(Guid id) { await UserAppService.UnLockAsync(id); } diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs index 6a077ff97..2b37172f3 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs @@ -23,118 +23,118 @@ namespace LINGYUN.Abp.Identity } [HttpPost] - public virtual async Task CreateAsync(OrganizationUnitCreateDto input) + public async virtual Task CreateAsync(OrganizationUnitCreateDto input) { return await OrganizationUnitAppService.CreateAsync(input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await OrganizationUnitAppService.DeleteAsync(id); } [HttpGet] [Route("find-children")] - public virtual async Task> FindChildrenAsync(OrganizationUnitGetChildrenDto input) + public async virtual Task> FindChildrenAsync(OrganizationUnitGetChildrenDto input) { return await OrganizationUnitAppService.FindChildrenAsync(input); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await OrganizationUnitAppService.GetAsync(id); } [HttpGet] [Route("root-node")] - public virtual async Task> GetRootAsync() + public async virtual Task> GetRootAsync() { return await OrganizationUnitAppService.GetRootAsync(); } [HttpGet] [Route("last-children")] - public virtual async Task GetLastChildOrNullAsync(Guid? parentId) + public async virtual Task GetLastChildOrNullAsync(Guid? parentId) { return await OrganizationUnitAppService.GetLastChildOrNullAsync(parentId); } [HttpGet] [Route("all")] - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { return await OrganizationUnitAppService.GetAllListAsync(); } [HttpGet] - public virtual async Task> GetListAsync(OrganizationUnitGetByPagedDto input) + public async virtual Task> GetListAsync(OrganizationUnitGetByPagedDto input) { return await OrganizationUnitAppService.GetListAsync(input); } [HttpGet] [Route("{id}/role-names")] - public virtual async Task> GetRoleNamesAsync(Guid id) + public async virtual Task> GetRoleNamesAsync(Guid id) { return await OrganizationUnitAppService.GetRoleNamesAsync(id); } [HttpGet] [Route("{id}/unadded-roles")] - public virtual async Task> GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input) + public async virtual Task> GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input) { return await OrganizationUnitAppService.GetUnaddedRolesAsync(id, input); } [HttpGet] [Route("{id}/roles")] - public virtual async Task> GetRolesAsync(Guid id, PagedAndSortedResultRequestDto input) + public async virtual Task> GetRolesAsync(Guid id, PagedAndSortedResultRequestDto input) { return await OrganizationUnitAppService.GetRolesAsync(id, input); } [HttpGet] [Route("{id}/unadded-users")] - public virtual async Task> GetUnaddedUsersAsync(Guid id, OrganizationUnitGetUnaddedUserByPagedDto input) + public async virtual Task> GetUnaddedUsersAsync(Guid id, OrganizationUnitGetUnaddedUserByPagedDto input) { return await OrganizationUnitAppService.GetUnaddedUsersAsync(id, input); } [HttpGet] [Route("{id}/users")] - public virtual async Task> GetUsersAsync(Guid id, GetIdentityUsersInput input) + public async virtual Task> GetUsersAsync(Guid id, GetIdentityUsersInput input) { return await OrganizationUnitAppService.GetUsersAsync(id, input); } [HttpPost] [Route("{id}/users")] - public virtual async Task AddUsersAsync(Guid id, OrganizationUnitAddUserDto input) + public async virtual Task AddUsersAsync(Guid id, OrganizationUnitAddUserDto input) { await OrganizationUnitAppService.AddUsersAsync(id, input); } [HttpPost] [Route("{id}/roles")] - public virtual async Task AddRolesAsync(Guid id, OrganizationUnitAddRoleDto input) + public async virtual Task AddRolesAsync(Guid id, OrganizationUnitAddRoleDto input) { await OrganizationUnitAppService.AddRolesAsync(id, input); } [HttpPut] [Route("{id}/move")] - public virtual async Task MoveAsync(Guid id, OrganizationUnitMoveDto input) + public async virtual Task MoveAsync(Guid id, OrganizationUnitMoveDto input) { await OrganizationUnitAppService.MoveAsync(id, input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, OrganizationUnitUpdateDto input) + public async virtual Task UpdateAsync(Guid id, OrganizationUnitUpdateDto input) { return await OrganizationUnitAppService.UpdateAsync(id, input); } diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.PermissionManagement.Domain.Identity/LINGYUN/Abp/PermissionManagement/Identity/IdentityPermissionManager.cs b/aspnet-core/modules/identity/LINGYUN.Abp.PermissionManagement.Domain.Identity/LINGYUN/Abp/PermissionManagement/Identity/IdentityPermissionManager.cs index fb12e591f..63dbc0f48 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.PermissionManagement.Domain.Identity/LINGYUN/Abp/PermissionManagement/Identity/IdentityPermissionManager.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.PermissionManagement.Domain.Identity/LINGYUN/Abp/PermissionManagement/Identity/IdentityPermissionManager.cs @@ -71,7 +71,7 @@ namespace LINGYUN.Abp.PermissionManagement.Identity return await base.IsGrantedAsync(permissionName, providerName, providerKey); } - protected virtual async Task GetUserRolesAsync(Guid userId) + protected async virtual Task GetUserRolesAsync(Guid userId) { // 通过工作单元来缓存用户角色,防止多次查询 if (CurrentUnitOfWork != null) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAppServiceBase.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAppServiceBase.cs index 212ca6f99..5a88310e1 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAppServiceBase.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAppServiceBase.cs @@ -13,7 +13,7 @@ namespace LINGYUN.Abp.IdentityServer LocalizationResource = typeof(AbpIdentityServerResource); } - protected virtual async Task IsGrantAsync(string policy) + protected async virtual Task IsGrantAsync(string policy) { return await PermissionChecker.IsGrantedAsync(policy); } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceAppService.cs index a161b0908..5297b3348 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceAppService.cs @@ -22,14 +22,14 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources ApiResourceRepository = apiResourceRepository; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var apiResource = await ApiResourceRepository.GetAsync(id); return ObjectMapper.Map(apiResource); } - public virtual async Task> GetListAsync(ApiResourceGetByPagedInputDto input) + public async virtual Task> GetListAsync(ApiResourceGetByPagedInputDto input) { var apiResources = await ApiResourceRepository.GetListAsync(input.Sorting, input.SkipCount, input.MaxResultCount, @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources } [Authorize(AbpIdentityServerPermissions.ApiResources.Create)] - public virtual async Task CreateAsync(ApiResourceCreateDto input) + public async virtual Task CreateAsync(ApiResourceCreateDto input) { var apiResourceExists = await ApiResourceRepository.CheckNameExistAsync(input.Name); if (apiResourceExists) @@ -65,7 +65,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources } [Authorize(AbpIdentityServerPermissions.ApiResources.Update)] - public virtual async Task UpdateAsync(Guid id, ApiResourceUpdateDto input) + public async virtual Task UpdateAsync(Guid id, ApiResourceUpdateDto input) { var apiResource = await ApiResourceRepository.GetAsync(id); @@ -79,7 +79,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources } [Authorize(AbpIdentityServerPermissions.ApiResources.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var apiResource = await ApiResourceRepository.GetAsync(id); await ApiResourceRepository.DeleteAsync(apiResource); @@ -87,7 +87,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources await CurrentUnitOfWork.SaveChangesAsync(); } - protected virtual async Task UpdateApiResourceByInputAsync(ApiResource apiResource, ApiResourceCreateOrUpdateDto input) + protected async virtual Task UpdateApiResourceByInputAsync(ApiResource apiResource, ApiResourceCreateOrUpdateDto input) { apiResource.ShowInDiscoveryDocument = input.ShowInDiscoveryDocument; apiResource.Enabled = input.Enabled; diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeAppService.cs index e2890570d..ef5ef56e6 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeAppService.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes } [Authorize(AbpIdentityServerPermissions.ApiScopes.Create)] - public virtual async Task CreateAsync(ApiScopeCreateDto input) + public async virtual Task CreateAsync(ApiScopeCreateDto input) { if (await ApiScopeRepository.CheckNameExistAsync(input.Name)) { @@ -47,7 +47,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes } [Authorize(AbpIdentityServerPermissions.ApiScopes.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var apiScope = await ApiScopeRepository.GetAsync(id); @@ -56,14 +56,14 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var apiScope = await ApiScopeRepository.GetAsync(id); return ObjectMapper.Map(apiScope); } - public virtual async Task> GetListAsync(GetApiScopeInput input) + public async virtual Task> GetListAsync(GetApiScopeInput input) { var totalCount = await ApiScopeRepository .GetCountAsync(input.Filter); @@ -79,7 +79,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes } [Authorize(AbpIdentityServerPermissions.ApiScopes.Update)] - public virtual async Task UpdateAsync(Guid id, ApiScopeUpdateDto input) + public async virtual Task UpdateAsync(Guid id, ApiScopeUpdateDto input) { var apiScope = await ApiScopeRepository.GetAsync(id); @@ -91,7 +91,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes return ObjectMapper.Map(apiScope); } - protected virtual async Task UpdateApiScopeByInputAsync(ApiScope apiScope, ApiScopeCreateOrUpdateDto input) + protected async virtual Task UpdateApiScopeByInputAsync(ApiScope apiScope, ApiScopeCreateOrUpdateDto input) { if (!string.Equals(apiScope.Description, input.Description, StringComparison.InvariantCultureIgnoreCase)) { diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs index 3a724ce01..9cd5d344a 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs @@ -32,7 +32,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients } [Authorize(AbpIdentityServerPermissions.Clients.Create)] - public virtual async Task CreateAsync(ClientCreateDto clientCreate) + public async virtual Task CreateAsync(ClientCreateDto clientCreate) { var clientIdExists = await ClientRepository.CheckClientIdExistAsync(clientCreate.ClientId); if(clientIdExists) @@ -57,7 +57,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients } [Authorize(AbpIdentityServerPermissions.Clients.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var client = await ClientRepository.GetAsync(id); await ClientRepository.DeleteAsync(client); @@ -65,14 +65,14 @@ namespace LINGYUN.Abp.IdentityServer.Clients await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var client = await ClientRepository.GetAsync(id); return ObjectMapper.Map(client); } - public virtual async Task> GetListAsync(ClientGetByPagedDto input) + public async virtual Task> GetListAsync(ClientGetByPagedDto input) { var clients = await ClientRepository.GetListAsync(input.Sorting, input.SkipCount, input.MaxResultCount, @@ -85,7 +85,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients } [Authorize(AbpIdentityServerPermissions.Clients.Update)] - public virtual async Task UpdateAsync(Guid id, ClientUpdateDto input) + public async virtual Task UpdateAsync(Guid id, ClientUpdateDto input) { var client = await ClientRepository.GetAsync(id); @@ -333,7 +333,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients /// /// [Authorize(AbpIdentityServerPermissions.Clients.Clone)] - public virtual async Task CloneAsync(Guid id, ClientCloneDto input) + public async virtual Task CloneAsync(Guid id, ClientCloneDto input) { var clientIdExists = await ClientRepository.CheckClientIdExistAsync(input.ClientId); if (clientIdExists) @@ -458,7 +458,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients /// 查询可用的Api资源 /// /// - public virtual async Task> GetAssignableApiResourcesAsync() + public async virtual Task> GetAssignableApiResourcesAsync() { var resourceNames = await ApiResourceRepository.GetNamesAsync(); @@ -468,7 +468,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients /// 查询可用的身份资源 /// /// - public virtual async Task> GetAssignableIdentityResourcesAsync() + public async virtual Task> GetAssignableIdentityResourcesAsync() { var resourceNames = await IdentityResourceRepository.GetNamesAsync(); @@ -478,7 +478,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients /// 查询所有不重复的跨域地址 /// /// - public virtual async Task> GetAllDistinctAllowedCorsOriginsAsync() + public async virtual Task> GetAllDistinctAllowedCorsOriginsAsync() { var corsOrigins = await ClientRepository.GetAllDistinctAllowedCorsOriginsAsync(); diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantAppService.cs index 824726498..d6d91f2d5 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantAppService.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.IdentityServer.Grants } [Authorize(AbpIdentityServerPermissions.Grants.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var persistedGrant = await PersistentGrantRepository.GetAsync(id); @@ -27,14 +27,14 @@ namespace LINGYUN.Abp.IdentityServer.Grants await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var persistedGrant = await PersistentGrantRepository.GetAsync(id); return ObjectMapper.Map(persistedGrant); } - public virtual async Task> GetListAsync(GetPersistedGrantInput input) + public async virtual Task> GetListAsync(GetPersistedGrantInput input) { var persistenGrantCount = await PersistentGrantRepository .GetCountAsync( diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs index 46b3499c0..e7ab7d806 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs @@ -20,14 +20,14 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources IdentityResourceRepository = identityResourceRepository; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var identityResource = await IdentityResourceRepository.GetAsync(id); return ObjectMapper.Map(identityResource); } - public virtual async Task> GetListAsync(IdentityResourceGetByPagedDto input) + public async virtual Task> GetListAsync(IdentityResourceGetByPagedDto input) { var identityResources = await IdentityResourceRepository.GetListAsync(input.Sorting, input.SkipCount, input.MaxResultCount, @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources } [Authorize(AbpIdentityServerPermissions.IdentityResources.Create)] - public virtual async Task CreateAsync(IdentityResourceCreateOrUpdateDto input) + public async virtual Task CreateAsync(IdentityResourceCreateOrUpdateDto input) { var identityResourceExists = await IdentityResourceRepository.CheckNameExistAsync(input.Name); if (identityResourceExists) @@ -59,7 +59,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources } [Authorize(AbpIdentityServerPermissions.IdentityResources.Update)] - public virtual async Task UpdateAsync(Guid id, IdentityResourceCreateOrUpdateDto input) + public async virtual Task UpdateAsync(Guid id, IdentityResourceCreateOrUpdateDto input) { var identityResource = await IdentityResourceRepository.GetAsync(id); await UpdateApiResourceByInputAsync(identityResource, input); @@ -71,12 +71,12 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources } [Authorize(AbpIdentityServerPermissions.IdentityResources.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await IdentityResourceRepository.DeleteAsync(id); } - protected virtual async Task UpdateApiResourceByInputAsync(IdentityResource identityResource, IdentityResourceCreateOrUpdateDto input) + protected async virtual Task UpdateApiResourceByInputAsync(IdentityResource identityResource, IdentityResourceCreateOrUpdateDto input) { if (!string.Equals(identityResource.Name, input.Name, StringComparison.InvariantCultureIgnoreCase)) { diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Domain/LINGYUN/Abp/IdentityServer/IdentityResources/CustomIdentityResourceDataSeeder.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Domain/LINGYUN/Abp/IdentityServer/IdentityResources/CustomIdentityResourceDataSeeder.cs index 72c4e7376..ab75bdf54 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Domain/LINGYUN/Abp/IdentityServer/IdentityResources/CustomIdentityResourceDataSeeder.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Domain/LINGYUN/Abp/IdentityServer/IdentityResources/CustomIdentityResourceDataSeeder.cs @@ -26,7 +26,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources Options = options.Value; } - public virtual async Task CreateCustomResourcesAsync() + public async virtual Task CreateCustomResourcesAsync() { foreach (var resource in Options.Resources) { @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources } } - protected virtual async Task AddIdentityResourceIfNotExistsAsync(IdentityServer4.Models.IdentityResource resource) + protected async virtual Task AddIdentityResourceIfNotExistsAsync(IdentityServer4.Models.IdentityResource resource) { if (await IdentityResourceRepository.CheckNameExistAsync(resource.Name)) { @@ -54,7 +54,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources ); } - protected virtual async Task AddClaimTypeIfNotExistsAsync(string claimType) + protected async virtual Task AddClaimTypeIfNotExistsAsync(string claimType) { if (await ClaimTypeRepository.AnyAsync(claimType)) { diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/ApiResources/EfCoreApiResourceRepository.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/ApiResources/EfCoreApiResourceRepository.cs index 536323d76..473813a62 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/ApiResources/EfCoreApiResourceRepository.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/ApiResources/EfCoreApiResourceRepository.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources { } - public virtual async Task> GetNamesAsync(CancellationToken cancellationToken = default) + public async virtual Task> GetNamesAsync(CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Select(x => x.Name) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs index ac64cb3a4..50dbcfbc9 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.IdentityServer.Grants { } - public virtual async Task GetCountAsync(string subjectId = null, string filter = null, CancellationToken cancellation = default) + public async virtual Task GetCountAsync(string subjectId = null, string filter = null, CancellationToken cancellation = default) { return await (await GetDbSetAsync()) .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId.Equals(subjectId)) @@ -34,7 +34,7 @@ namespace LINGYUN.Abp.IdentityServer.Grants .LongCountAsync(GetCancellationToken(cancellation)); } - public virtual async Task> GetListAsync(string subjectId = null, string filter = null, string sorting = "CreationTime", int skipCount = 1, int maxResultCount = 10, CancellationToken cancellation = default) + public async virtual Task> GetListAsync(string subjectId = null, string filter = null, string sorting = "CreationTime", int skipCount = 1, int maxResultCount = 10, CancellationToken cancellation = default) { return await (await GetDbSetAsync()) .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId.Equals(subjectId)) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/IdentityResources/EfCoreIdentityResourceRepository.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/IdentityResources/EfCoreIdentityResourceRepository.cs index 1046ffa37..7e4816803 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/IdentityResources/EfCoreIdentityResourceRepository.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/IdentityResources/EfCoreIdentityResourceRepository.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources { } - public virtual async Task> GetNamesAsync(CancellationToken cancellationToken = default) + public async virtual Task> GetNamesAsync(CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Select(x => x.Name) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs index ef493df32..4ed063cd4 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs @@ -21,33 +21,33 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await ApiResourceAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(ApiResourceGetByPagedInputDto input) + public async virtual Task> GetListAsync(ApiResourceGetByPagedInputDto input) { return await ApiResourceAppService.GetListAsync(input); } [HttpPost] - public virtual async Task CreateAsync(ApiResourceCreateDto input) + public async virtual Task CreateAsync(ApiResourceCreateDto input) { return await ApiResourceAppService.CreateAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, ApiResourceUpdateDto input) + public async virtual Task UpdateAsync(Guid id, ApiResourceUpdateDto input) { return await ApiResourceAppService.UpdateAsync(id, input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await ApiResourceAppService.DeleteAsync(id); } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs index 9452601bf..2c1681002 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs @@ -21,34 +21,34 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes } [HttpPost] - public virtual async Task CreateAsync(ApiScopeCreateDto input) + public async virtual Task CreateAsync(ApiScopeCreateDto input) { return await ApiScopeAppService.CreateAsync(input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await ApiScopeAppService.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await ApiScopeAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(GetApiScopeInput input) + public async virtual Task> GetListAsync(GetApiScopeInput input) { return await ApiScopeAppService.GetListAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, ApiScopeUpdateDto input) + public async virtual Task UpdateAsync(Guid id, ApiScopeUpdateDto input) { return await ApiScopeAppService.UpdateAsync(id, input); } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs index 9fd243372..fc4e1336e 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs @@ -19,62 +19,62 @@ namespace LINGYUN.Abp.IdentityServer.Clients } [HttpPost] - public virtual async Task CreateAsync(ClientCreateDto input) + public async virtual Task CreateAsync(ClientCreateDto input) { return await ClientAppService.CreateAsync(input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await ClientAppService.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await ClientAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(ClientGetByPagedDto input) + public async virtual Task> GetListAsync(ClientGetByPagedDto input) { return await ClientAppService.GetListAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, ClientUpdateDto input) + public async virtual Task UpdateAsync(Guid id, ClientUpdateDto input) { return await ClientAppService.UpdateAsync(id, input); } [HttpPost] [Route("{id}/clone")] - public virtual async Task CloneAsync(Guid id, ClientCloneDto input) + public async virtual Task CloneAsync(Guid id, ClientCloneDto input) { return await ClientAppService.CloneAsync(id, input); } [HttpGet] [Route("assignable-api-resources")] - public virtual async Task> GetAssignableApiResourcesAsync() + public async virtual Task> GetAssignableApiResourcesAsync() { return await ClientAppService.GetAssignableApiResourcesAsync(); } [HttpGet] [Route("assignable-identity-resources")] - public virtual async Task> GetAssignableIdentityResourcesAsync() + public async virtual Task> GetAssignableIdentityResourcesAsync() { return await ClientAppService.GetAssignableIdentityResourcesAsync(); } [HttpGet] [Route("distinct-cors-origins")] - public virtual async Task> GetAllDistinctAllowedCorsOriginsAsync() + public async virtual Task> GetAllDistinctAllowedCorsOriginsAsync() { return await ClientAppService.GetAllDistinctAllowedCorsOriginsAsync(); } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs index 7469ec49e..3a7626966 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs @@ -22,20 +22,20 @@ namespace LINGYUN.Abp.IdentityServer.Grants [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await PersistedGrantAppService.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await PersistedGrantAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(GetPersistedGrantInput input) + public async virtual Task> GetListAsync(GetPersistedGrantInput input) { return await PersistedGrantAppService.GetListAsync(input); } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs index 71837568d..3840d0a7f 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs @@ -21,33 +21,33 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await IdentityResourceAppService.GetAsync(id); } [HttpGet] - public virtual async Task> GetListAsync(IdentityResourceGetByPagedDto input) + public async virtual Task> GetListAsync(IdentityResourceGetByPagedDto input) { return await IdentityResourceAppService.GetListAsync(input); } [HttpPost] - public virtual async Task CreateAsync(IdentityResourceCreateOrUpdateDto input) + public async virtual Task CreateAsync(IdentityResourceCreateOrUpdateDto input) { return await IdentityResourceAppService.CreateAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, IdentityResourceCreateOrUpdateDto input) + public async virtual Task UpdateAsync(Guid id, IdentityResourceCreateOrUpdateDto input) { return await IdentityResourceAppService.UpdateAsync(id, input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await IdentityResourceAppService.DeleteAsync(id); } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.LinkUser/LINGYUN/Abp/IdentityServer/LinkUser/LinkUserGrantValidator.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.LinkUser/LINGYUN/Abp/IdentityServer/LinkUser/LinkUserGrantValidator.cs index 00c990601..5a5796652 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.LinkUser/LINGYUN/Abp/IdentityServer/LinkUser/LinkUserGrantValidator.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.LinkUser/LINGYUN/Abp/IdentityServer/LinkUser/LinkUserGrantValidator.cs @@ -53,7 +53,7 @@ public class LinkUserGrantValidator : IExtensionGrantValidator } [UnitOfWork] - public virtual async Task ValidateAsync(ExtensionGrantValidationContext context) + public async virtual Task ValidateAsync(ExtensionGrantValidationContext context) { var accessToken = context.Request.Raw["access_token"]; if (accessToken.IsNullOrWhiteSpace()) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs index 3f6f0b35d..cae5f1edd 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs @@ -10,15 +10,15 @@ using System; using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; -using Volo.Abp.Identity; -using Volo.Abp.IdentityServer; +using Volo.Abp.Identity; +using Volo.Abp.IdentityServer; using Volo.Abp.IdentityServer.Localization; using Volo.Abp.Security.Claims; using Volo.Abp.Uow; using IdentityResource = Volo.Abp.Identity.Localization.IdentityResource; using IdentityUser = Volo.Abp.Identity.IdentityUser; -using IIdentityUserRepository = LINGYUN.Abp.Identity.IIdentityUserRepository; - +using IIdentityUserRepository = LINGYUN.Abp.Identity.IIdentityUserRepository; + namespace LINGYUN.Abp.IdentityServer.SmsValidator { public class SmsTokenGrantValidator : IExtensionGrantValidator @@ -120,66 +120,66 @@ namespace LINGYUN.Abp.IdentityServer.SmsValidator await SetSuccessResultAsync(context, currentUser); } - protected virtual async Task SetSuccessResultAsync(ExtensionGrantValidationContext context, IdentityUser user) - { - var sub = await UserManager.GetUserIdAsync(user); - - Logger.LogInformation("Credentials validated for username: {username}", user.UserName); - - var additionalClaims = new List(); - - await AddCustomClaimsAsync(additionalClaims, user, context); - - context.Result = new GrantValidationResult( - sub, - OidcConstants.AuthenticationMethods.ConfirmationBySms, - additionalClaims.ToArray() - ); - - await SaveSecurityLogAsync( - context, - user, - IdentityServerSecurityLogActionConsts.LoginSucceeded); - } - - protected virtual async Task SaveSecurityLogAsync( - ExtensionGrantValidationContext context, - IdentityUser user, - string action) - { - var logContext = new IdentitySecurityLogContext - { - Identity = IdentityServerSecurityLogIdentityConsts.IdentityServer, - Action = action, - UserName = user.UserName, - ClientId = await FindClientIdAsync(context) - }; - logContext.WithProperty("GrantType", GrantType); - - await IdentitySecurityLogManager.SaveAsync(logContext); - } - - protected virtual Task FindClientIdAsync(ExtensionGrantValidationContext context) - { - return Task.FromResult(context.Request?.Client?.ClientId); - } - - protected virtual Task AddCustomClaimsAsync( - List customClaims, - IdentityUser user, - ExtensionGrantValidationContext context) - { - if (user.TenantId.HasValue) - { - customClaims.Add( - new Claim( - AbpClaimTypes.TenantId, - user.TenantId?.ToString() - ) - ); - } - - return Task.CompletedTask; + protected async virtual Task SetSuccessResultAsync(ExtensionGrantValidationContext context, IdentityUser user) + { + var sub = await UserManager.GetUserIdAsync(user); + + Logger.LogInformation("Credentials validated for username: {username}", user.UserName); + + var additionalClaims = new List(); + + await AddCustomClaimsAsync(additionalClaims, user, context); + + context.Result = new GrantValidationResult( + sub, + OidcConstants.AuthenticationMethods.ConfirmationBySms, + additionalClaims.ToArray() + ); + + await SaveSecurityLogAsync( + context, + user, + IdentityServerSecurityLogActionConsts.LoginSucceeded); + } + + protected async virtual Task SaveSecurityLogAsync( + ExtensionGrantValidationContext context, + IdentityUser user, + string action) + { + var logContext = new IdentitySecurityLogContext + { + Identity = IdentityServerSecurityLogIdentityConsts.IdentityServer, + Action = action, + UserName = user.UserName, + ClientId = await FindClientIdAsync(context) + }; + logContext.WithProperty("GrantType", GrantType); + + await IdentitySecurityLogManager.SaveAsync(logContext); + } + + protected virtual Task FindClientIdAsync(ExtensionGrantValidationContext context) + { + return Task.FromResult(context.Request?.Client?.ClientId); + } + + protected virtual Task AddCustomClaimsAsync( + List customClaims, + IdentityUser user, + ExtensionGrantValidationContext context) + { + if (user.TenantId.HasValue) + { + customClaims.Add( + new Claim( + AbpClaimTypes.TenantId, + user.TenantId?.ToString() + ) + ); + } + + return Task.CompletedTask; } } } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatGrantValidator.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatGrantValidator.cs index f821865de..e596164bf 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatGrantValidator.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatGrantValidator.cs @@ -159,7 +159,7 @@ namespace LINGYUN.Abp.IdentityServer.WeChat return Task.FromResult(true); } - protected virtual async Task SetSuccessResultAsync(ExtensionGrantValidationContext context, IdentityUser user, WeChatOpenId wechatOpenId) + protected async virtual Task SetSuccessResultAsync(ExtensionGrantValidationContext context, IdentityUser user, WeChatOpenId wechatOpenId) { var sub = await UserManager.GetUserIdAsync(user); @@ -182,7 +182,7 @@ namespace LINGYUN.Abp.IdentityServer.WeChat IdentityServerSecurityLogActionConsts.LoginSucceeded); } - protected virtual async Task SaveSecurityLogAsync( + protected async virtual Task SaveSecurityLogAsync( ExtensionGrantValidationContext context, IdentityUser user, WeChatOpenId wechatOpenId, diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatResourceDataSeeder.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatResourceDataSeeder.cs index b5e8b7a55..7088941ad 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatResourceDataSeeder.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat/LINGYUN/Abp/IdentityServer/WeChat/WeChatResourceDataSeeder.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.IdentityServer ClaimTypeRepository = claimTypeRepository; } - public virtual async Task CreateStandardResourcesAsync() + public async virtual Task CreateStandardResourcesAsync() { var wechatClaimTypes = new string[] { @@ -52,7 +52,7 @@ namespace LINGYUN.Abp.IdentityServer await AddIdentityResourceIfNotExistsAsync(wechatResource); } - protected virtual async Task AddIdentityResourceIfNotExistsAsync(IdentityServer4.Models.IdentityResource resource) + protected async virtual Task AddIdentityResourceIfNotExistsAsync(IdentityServer4.Models.IdentityResource resource) { if (await IdentityResourceRepository.CheckNameExistAsync(resource.Name)) { @@ -67,7 +67,7 @@ namespace LINGYUN.Abp.IdentityServer ); } - protected virtual async Task AddClaimTypeIfNotExistsAsync(string claimType) + protected async virtual Task AddClaimTypeIfNotExistsAsync(string claimType) { if (await ClaimTypeRepository.AnyAsync(claimType)) { diff --git a/aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageAppService.cs b/aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageAppService.cs index 17f723d81..fe8a277ef 100644 --- a/aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageAppService.cs +++ b/aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageAppService.cs @@ -16,7 +16,7 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization _languageProvider = languageProvider; } - public virtual async Task> GetListAsync() + public async virtual Task> GetListAsync() { var languages = await _languageProvider.GetLanguagesAsync(); diff --git a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs index c68636d28..f9e744c5c 100644 --- a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs +++ b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs @@ -49,7 +49,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch /// 时间类型或者转换为timestamp都可以查询 /// /// - public virtual async Task GetAsync( + public async virtual Task GetAsync( string id, CancellationToken cancellationToken = default(CancellationToken)) { @@ -126,7 +126,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch return _objectMapper.Map(response.Documents.FirstOrDefault()); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( DateTime? startTime = null, DateTime? endTime = null, Microsoft.Extensions.Logging.LogLevel? level = null, @@ -189,7 +189,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch /// /// /// - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string sorting = null, int maxResultCount = 50, int skipCount = 0, diff --git a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationSynchronizer.cs b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationSynchronizer.cs index 7e1a21f85..833616167 100644 --- a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationSynchronizer.cs +++ b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationSynchronizer.cs @@ -21,17 +21,17 @@ namespace LINGYUN.Abp.LocalizationManagement _eventBus = eventBus; } - public virtual async Task HandleEventAsync(EntityCreatedEventData eventData) + public async virtual Task HandleEventAsync(EntityCreatedEventData eventData) { await HandleEventAsync(BuildResetEventData(eventData.Entity)); } - public virtual async Task HandleEventAsync(EntityUpdatedEventData eventData) + public async virtual Task HandleEventAsync(EntityUpdatedEventData eventData) { await HandleEventAsync(BuildResetEventData(eventData.Entity)); } - public virtual async Task HandleEventAsync(EntityDeletedEventData eventData) + public async virtual Task HandleEventAsync(EntityDeletedEventData eventData) { var data = BuildResetEventData(eventData.Entity); data.IsDeleted = true; diff --git a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreLanguageRepository.cs b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreLanguageRepository.cs index 61ec2b47c..0c5a175e4 100644 --- a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreLanguageRepository.cs +++ b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreLanguageRepository.cs @@ -17,7 +17,7 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore { } - public virtual async Task FindByCultureNameAsync( + public async virtual Task FindByCultureNameAsync( string cultureName, CancellationToken cancellationToken = default) { @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetActivedListAsync(CancellationToken cancellationToken = default) + public async virtual Task> GetActivedListAsync(CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()).Where(x => x.Enable) .ToListAsync(GetCancellationToken(cancellationToken)); diff --git a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreResourceRepository.cs b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreResourceRepository.cs index b389849b2..3cf7e0738 100644 --- a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreResourceRepository.cs +++ b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreResourceRepository.cs @@ -16,14 +16,14 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore { } - public virtual async Task ExistsAsync( + public async virtual Task ExistsAsync( string name, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()).AnyAsync(x => x.Name.Equals(name)); } - public virtual async Task FindByNameAsync( + public async virtual Task FindByNameAsync( string name, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreTextRepository.cs b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreTextRepository.cs index 638de25cc..331bc0fce 100644 --- a/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreTextRepository.cs +++ b/aspnet-core/modules/lt/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreTextRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore { } - public virtual async Task GetByCultureKeyAsync( + public async virtual Task GetByCultureKeyAsync( string resourceName, string cultureName, string key, @@ -30,7 +30,7 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetDifferenceCountAsync( + public async virtual Task GetDifferenceCountAsync( string cultureName, string targetCultureName, string resourceName = null, @@ -47,16 +47,16 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( - string resourceName = null, + public async virtual Task> GetListAsync( + string resourceName = null, string cultureName = null, CancellationToken cancellationToken = default) { //var languages = (await GetDbContextAsync()).Set(); //var resources = (IQueryable)(await GetDbContextAsync()).Set(); - //if (!resourceName.IsNullOrWhiteSpace()) - //{ - // resources = resources.Where(x => x.Name.Equals(resourceName)); + //if (!resourceName.IsNullOrWhiteSpace()) + //{ + // resources = resources.Where(x => x.Name.Equals(resourceName)); //} //var texts = await GetDbSetAsync(); @@ -76,7 +76,7 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetDifferencePagedListAsync( + public async virtual Task> GetDifferencePagedListAsync( string cultureName, string targetCultureName, string resourceName = null, @@ -98,7 +98,7 @@ namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - protected virtual async Task> BuildTextDifferenceQueryAsync( + protected async virtual Task> BuildTextDifferenceQueryAsync( string cultureName, string targetCultureName, string resourceName = null, diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/ChatAppService.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/ChatAppService.cs index ec84089b3..0b4b6216c 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/ChatAppService.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/ChatAppService.cs @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.MessageService.Chat _userGroupStore = userGroupStore; } - public virtual async Task> GetMyChatMessageAsync(UserMessageGetByPagedDto input) + public async virtual Task> GetMyChatMessageAsync(UserMessageGetByPagedDto input) { var chatMessageCount = await _messageStore .GetChatMessageCountAsync( @@ -49,7 +49,7 @@ namespace LINGYUN.Abp.MessageService.Chat return new PagedResultDto(chatMessageCount, chatMessages); } - public virtual async Task> GetMyLastChatMessageAsync(GetUserLastMessageDto input) + public async virtual Task> GetMyLastChatMessageAsync(GetUserLastMessageDto input) { var chatMessages = await _messageStore .GetLastChatMessagesAsync( @@ -62,7 +62,7 @@ namespace LINGYUN.Abp.MessageService.Chat return new ListResultDto(chatMessages); } - public virtual async Task> GetMyGroupMessageAsync(GroupMessageGetByPagedDto input) + public async virtual Task> GetMyGroupMessageAsync(GroupMessageGetByPagedDto input) { if (!await _userGroupStore.MemberHasInGroupAsync(CurrentTenant.Id, input.GroupId, CurrentUser.GetId())) { @@ -90,7 +90,7 @@ namespace LINGYUN.Abp.MessageService.Chat } - public virtual async Task SendMessageAsync(ChatMessage input) + public async virtual Task SendMessageAsync(ChatMessage input) { // TODO:向其他租户发送消息? input.TenantId ??= CurrentTenant.Id; diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/MyFriendAppService.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/MyFriendAppService.cs index f7744406c..3cd6479ca 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/MyFriendAppService.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/MyFriendAppService.cs @@ -26,12 +26,12 @@ namespace LINGYUN.Abp.MessageService.Chat LocalizationResource = typeof(MessageServiceResource); } - public virtual async Task GetAsync(Guid friendId) + public async virtual Task GetAsync(Guid friendId) { return await FriendStore.GetMemberAsync(CurrentTenant.Id, CurrentUser.GetId(), friendId); } - public virtual async Task CreateAsync(MyFriendCreateDto input) + public async virtual Task CreateAsync(MyFriendCreateDto input) { var friendCard = await UserChatCardRepository.GetMemberAsync(input.FriendId); @@ -41,17 +41,17 @@ namespace LINGYUN.Abp.MessageService.Chat input.FriendId, friendCard?.NickName ?? friendCard?.UserName ?? input.FriendId.ToString()); } - public virtual async Task AddRequestAsync(MyFriendAddRequestDto input) + public async virtual Task AddRequestAsync(MyFriendAddRequestDto input) { await FriendStore.AddRequestAsync(CurrentTenant.Id, CurrentUser.GetId(), input.FriendId, input.RemarkName, L["AddNewFriendBySearchId"]); } - public virtual async Task DeleteAsync(MyFriendOperationDto input) + public async virtual Task DeleteAsync(MyFriendOperationDto input) { await FriendStore.RemoveMemberAsync(CurrentTenant.Id, CurrentUser.GetId(), input.FriendId); } - public virtual async Task> GetAllListAsync(GetMyFriendsDto input) + public async virtual Task> GetAllListAsync(GetMyFriendsDto input) { var myFriends = await FriendStore .GetListAsync( @@ -62,7 +62,7 @@ namespace LINGYUN.Abp.MessageService.Chat return new ListResultDto(myFriends); } - public virtual async Task> GetListAsync(MyFriendGetByPagedDto input) + public async virtual Task> GetListAsync(MyFriendGetByPagedDto input) { var myFrientCount = await FriendStore.GetCountAsync(CurrentTenant.Id, CurrentUser.GetId()); diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/GroupAppService.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/GroupAppService.cs index a06e295f4..80af59ab7 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/GroupAppService.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/GroupAppService.cs @@ -16,12 +16,12 @@ namespace LINGYUN.Abp.MessageService.Groups _groupStore = groupStore; } - public virtual async Task GetAsync(string groupId) + public async virtual Task GetAsync(string groupId) { return await _groupStore.GetAsync(CurrentTenant.Id, groupId); } - public virtual async Task> SearchAsync(GroupSearchInput input) + public async virtual Task> SearchAsync(GroupSearchInput input) { var count = await _groupStore.GetCountAsync( CurrentTenant.Id, diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/UserGroupAppService.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/UserGroupAppService.cs index cd7353697..b6acc423f 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/UserGroupAppService.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Groups/UserGroupAppService.cs @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.MessageService.Groups throw new NotImplementedException(); } - public virtual async Task> GetGroupUsersAsync(GroupUserGetByPagedDto input) + public async virtual Task> GetGroupUsersAsync(GroupUserGetByPagedDto input) { var groupUserCardCount = await _userGroupStore .GetMembersCountAsync(CurrentTenant.Id, input.GroupId); @@ -40,14 +40,14 @@ namespace LINGYUN.Abp.MessageService.Groups return new PagedResultDto(groupUserCardCount, groupUserCards); } - public virtual async Task> GetMyGroupsAsync() + public async virtual Task> GetMyGroupsAsync() { var myGroups = await _userGroupStore.GetUserGroupsAsync(CurrentTenant.Id, CurrentUser.GetId()); return new ListResultDto(myGroups.ToImmutableList()); } - public virtual async Task GroupAcceptUserAsync(GroupAcceptUserDto input) + public async virtual Task GroupAcceptUserAsync(GroupAcceptUserDto input) { var myGroupCard = await _userGroupStore .GetUserGroupCardAsync(CurrentTenant.Id, input.GroupId, CurrentUser.GetId()); @@ -65,7 +65,7 @@ namespace LINGYUN.Abp.MessageService.Groups .AddUserToGroupAsync(CurrentTenant.Id, input.UserId, input.GroupId, CurrentUser.GetId()); } - public virtual async Task GroupRemoveUserAsync(GroupRemoveUserDto input) + public async virtual Task GroupRemoveUserAsync(GroupRemoveUserDto input) { var myGroupCard = await _userGroupStore .GetUserGroupCardAsync(CurrentTenant.Id, input.GroupId, CurrentUser.GetId()); diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionAppService.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionAppService.cs index 77f3db9fc..49b920ec0 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionAppService.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionAppService.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions NotificationSubscriptionManager = notificationSubscriptionManager; } - public virtual async Task> GetListAsync(SubscriptionsGetByPagedDto input) + public async virtual Task> GetListAsync(SubscriptionsGetByPagedDto input) { var userSubscribedCount = await UserSubscribeRepository.GetCountAsync(CurrentUser.GetId()); @@ -34,7 +34,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions userSubscribes.Select(us => new UserSubscreNotificationDto { Name = us.NotificationName }).ToList()); } - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { var userSubscribes = await NotificationSubscriptionManager .GetUserSubscriptionsAsync( @@ -45,7 +45,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions userSubscribes.Select(msn => new UserSubscreNotificationDto { Name = msn.NotificationName }).ToList()); } - public virtual async Task IsSubscribedAsync(SubscriptionsGetByNameDto input) + public async virtual Task IsSubscribedAsync(SubscriptionsGetByNameDto input) { var isSubscribed = await NotificationSubscriptionManager .IsSubscribedAsync(CurrentTenant.Id, CurrentUser.GetId(), input.Name); @@ -55,7 +55,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions : UserSubscriptionsResult.UnSubscribed(); } - public virtual async Task SubscribeAsync(SubscriptionsGetByNameDto input) + public async virtual Task SubscribeAsync(SubscriptionsGetByNameDto input) { await NotificationSubscriptionManager .SubscribeAsync( @@ -64,7 +64,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions input.Name); } - public virtual async Task UnSubscribeAsync(SubscriptionsGetByNameDto input) + public async virtual Task UnSubscribeAsync(SubscriptionsGetByNameDto input) { await NotificationSubscriptionManager .UnsubscribeAsync( diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/ChatDataSeeder.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/ChatDataSeeder.cs index 9a0532e55..bcef93498 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/ChatDataSeeder.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/ChatDataSeeder.cs @@ -29,7 +29,7 @@ namespace LINGYUN.Abp.MessageService.Chat } [UnitOfWork] - public virtual async Task SeedAsync(IUserData user) + public async virtual Task SeedAsync(IUserData user) { using (CurrentTenant.Change(user.TenantId)) { diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/FriendStore.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/FriendStore.cs index c45373870..5d5653073 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/FriendStore.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/FriendStore.cs @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.MessageService.Chat _userChatSettingRepository = userChatSettingRepository; } - public virtual async Task IsFriendAsync( + public async virtual Task IsFriendAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -53,7 +53,7 @@ namespace LINGYUN.Abp.MessageService.Chat } [UnitOfWork] - public virtual async Task AddMemberAsync( + public async virtual Task AddMemberAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -82,7 +82,7 @@ namespace LINGYUN.Abp.MessageService.Chat } [UnitOfWork] - public virtual async Task AddRequestAsync( + public async virtual Task AddRequestAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -125,7 +125,7 @@ namespace LINGYUN.Abp.MessageService.Chat } [UnitOfWork] - public virtual async Task AddShieldMemberAsync( + public async virtual Task AddShieldMemberAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -134,7 +134,7 @@ namespace LINGYUN.Abp.MessageService.Chat await ChangeFriendShieldAsync(tenantId, userId, friendId, true, cancellationToken); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( Guid? tenantId, Guid userId, string sorting = nameof(UserFriend.UserId), @@ -147,7 +147,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( Guid? tenantId, Guid userId, string filter = "", @@ -160,7 +160,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task> GetPagedListAsync( + public async virtual Task> GetPagedListAsync( Guid? tenantId, Guid userId, string filter = "", @@ -177,7 +177,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task> GetLastContactListAsync( + public async virtual Task> GetLastContactListAsync( Guid? tenantId, Guid userId, int skipCount = 0, @@ -192,7 +192,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task GetMemberAsync( + public async virtual Task GetMemberAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -206,7 +206,7 @@ namespace LINGYUN.Abp.MessageService.Chat } [UnitOfWork] - public virtual async Task RemoveMemberAsync( + public async virtual Task RemoveMemberAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -223,7 +223,7 @@ namespace LINGYUN.Abp.MessageService.Chat } [UnitOfWork] - public virtual async Task RemoveShieldMemberAsync( + public async virtual Task RemoveShieldMemberAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -233,7 +233,7 @@ namespace LINGYUN.Abp.MessageService.Chat } - protected virtual async Task ChangeFriendShieldAsync( + protected async virtual Task ChangeFriendShieldAsync( Guid? tenantId, Guid userId, Guid friendId, @@ -251,7 +251,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - protected virtual async Task> GetAllFriendByCacheItemAsync( + protected async virtual Task> GetAllFriendByCacheItemAsync( Guid userId, string sorting = nameof(UserFriend.UserId), CancellationToken cancellationToken = default diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageProcessor.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageProcessor.cs index 584ea9d06..25f9ac4d2 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageProcessor.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageProcessor.cs @@ -26,7 +26,7 @@ namespace LINGYUN.Abp.MessageService.Chat _settingProvider = settingProvider; } - public virtual async Task ReadAsync(ChatMessage message) + public async virtual Task ReadAsync(ChatMessage message) { if (!message.GroupId.IsNullOrWhiteSpace()) { @@ -46,7 +46,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task ReCallAsync(ChatMessage message) + public async virtual Task ReCallAsync(ChatMessage message) { var expiration = await _settingProvider.GetAsync( MessageServiceSettingNames.Messages.RecallExpirationTime, 2d); diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageStore.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageStore.cs index ae4b114b8..3e7b4fd8f 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageStore.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageStore.cs @@ -47,7 +47,7 @@ namespace LINGYUN.Abp.MessageService.Chat _userChatSettingRepository = userChatSettingRepository; } - public virtual async Task StoreMessageAsync( + public async virtual Task StoreMessageAsync( ChatMessage chatMessage, CancellationToken cancellationToken = default) { @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task> GetGroupMessageAsync( + public async virtual Task> GetGroupMessageAsync( Guid? tenantId, long groupId, MessageType? type = null, @@ -97,7 +97,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task> GetChatMessageAsync( + public async virtual Task> GetChatMessageAsync( Guid? tenantId, Guid sendUserId, Guid receiveUserId, @@ -127,7 +127,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task> GetLastChatMessagesAsync( + public async virtual Task> GetLastChatMessagesAsync( Guid? tenantId, Guid userId, MessageState? state = null, @@ -148,7 +148,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task GetGroupMessageCountAsync( + public async virtual Task GetGroupMessageCountAsync( Guid? tenantId, long groupId, MessageType? type = null, @@ -161,7 +161,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task GetChatMessageCountAsync( + public async virtual Task GetChatMessageCountAsync( Guid? tenantId, Guid sendUserId, Guid receiveUserId, @@ -175,7 +175,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - protected virtual async Task StoreUserMessageAsync( + protected async virtual Task StoreUserMessageAsync( ChatMessage chatMessage, CancellationToken cancellationToken = default) { @@ -236,7 +236,7 @@ namespace LINGYUN.Abp.MessageService.Chat await _messageRepository.InsertUserMessageAsync(message, cancellationToken); } - protected virtual async Task StoreGroupMessageAsync( + protected async virtual Task StoreGroupMessageAsync( ChatMessage chatMessage, long groupId, CancellationToken cancellationToken = default) diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserCardFinder.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserCardFinder.cs index 6e8f5184d..2bf36f740 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserCardFinder.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserCardFinder.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Abp.MessageService.Chat _userChatCardRepository = userChatCardRepository; } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( Guid? tenantId, string findUserName = "", int? startAge = null, @@ -34,7 +34,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( Guid? tenantId, string findUserName = "", int? startAge = null, @@ -52,7 +52,7 @@ namespace LINGYUN.Abp.MessageService.Chat } } - public virtual async Task GetMemberAsync(Guid? tenantId, Guid findUserId) + public async virtual Task GetMemberAsync(Guid? tenantId, Guid findUserId) { using (_currentTenant.Change(tenantId)) { diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserOnlineChanger.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserOnlineChanger.cs index 2ad2b2b74..86471203f 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserOnlineChanger.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/UserOnlineChanger.cs @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.MessageService.Chat _userChatCardRepository = userChatCardRepository; } - public virtual async Task ChangeAsync( + public async virtual Task ChangeAsync( Guid? tenantId, Guid userId, UserOnlineState state, diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserChatFriendEventHandler.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserChatFriendEventHandler.cs index d4317843f..bc511044e 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserChatFriendEventHandler.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserChatFriendEventHandler.cs @@ -44,7 +44,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Local _notificationSender = notificationSender; } - public virtual async Task HandleEventAsync(EntityCreatedEventData eventData) + public async virtual Task HandleEventAsync(EntityCreatedEventData eventData) { switch (eventData.Entity.Status) { @@ -55,17 +55,17 @@ namespace LINGYUN.Abp.MessageService.EventBus.Local await RemoveUserFriendCacheItemAsync(eventData.Entity.UserId); } - public virtual async Task HandleEventAsync(EntityDeletedEventData eventData) + public async virtual Task HandleEventAsync(EntityDeletedEventData eventData) { await RemoveUserFriendCacheItemAsync(eventData.Entity.UserId); } - public virtual async Task HandleEventAsync(EntityUpdatedEventData eventData) + public async virtual Task HandleEventAsync(EntityUpdatedEventData eventData) { await RemoveUserFriendCacheItemAsync(eventData.Entity.UserId); } - public virtual async Task HandleEventAsync(UserChatFriendEto eventData) + public async virtual Task HandleEventAsync(UserChatFriendEto eventData) { if (eventData.Status == IM.Contract.UserFriendStatus.Added) { @@ -73,7 +73,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Local } } - protected virtual async Task SendFriendAddedMessageAsync(Guid userId, Guid friendId, Guid? tenantId = null) + protected async virtual Task SendFriendAddedMessageAsync(Guid userId, Guid friendId, Guid? tenantId = null) { // 发送添加好友的第一条消息 @@ -91,7 +91,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Local await _messageSender.SendMessageAsync(addNewFirendMessage); } - protected virtual async Task SendFriendValidationNotifierAsync(UserChatFriend userChatFriend) + protected async virtual Task SendFriendValidationNotifierAsync(UserChatFriend userChatFriend) { // 发送好友验证通知 var userIdentifer = new UserIdentifier(userChatFriend.FrientId, userChatFriend.RemarkName); @@ -123,7 +123,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Local userChatFriend.TenantId); } - protected virtual async Task RemoveUserFriendCacheItemAsync(Guid userId) + protected async virtual Task RemoveUserFriendCacheItemAsync(Guid userId) { // 移除好友缓存 await _cache.RemoveAsync(UserFriendCacheItem.CalculateCacheKey(userId.ToString())); diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/GroupStore.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/GroupStore.cs index 1c4d99f07..5085de4b2 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/GroupStore.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/GroupStore.cs @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.MessageService.Groups _groupRepository = groupRepository; } - public virtual async Task GetAsync( + public async virtual Task GetAsync( Guid? tenantId, string groupId, CancellationToken cancellationToken = default) @@ -37,7 +37,7 @@ namespace LINGYUN.Abp.MessageService.Groups } } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( Guid? tenantId, string filter = null, CancellationToken cancellationToken = default) @@ -48,7 +48,7 @@ namespace LINGYUN.Abp.MessageService.Groups } } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( Guid? tenantId, string filter = null, string sorting = nameof(Group.Name), diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/UserGroupStore.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/UserGroupStore.cs index e424caa9e..2727a91d3 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/UserGroupStore.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/UserGroupStore.cs @@ -25,7 +25,7 @@ namespace LINGYUN.Abp.MessageService.Groups _userChatGroupRepository = userChatGroupRepository; } - public virtual async Task MemberHasInGroupAsync( + public async virtual Task MemberHasInGroupAsync( Guid? tenantId, long groupId, Guid userId, @@ -37,7 +37,7 @@ namespace LINGYUN.Abp.MessageService.Groups } } - public virtual async Task AddUserToGroupAsync( + public async virtual Task AddUserToGroupAsync( Guid? tenantId, Guid userId, long groupId, diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs index 3273505b2..6569071d7 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs @@ -57,7 +57,7 @@ namespace LINGYUN.Abp.MessageService.Notifications _options = options.Value; } - public virtual async Task ChangeUserNotificationReadStateAsync( + public async virtual Task ChangeUserNotificationReadStateAsync( Guid? tenantId, Guid userId, long notificationId, @@ -90,7 +90,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task DeleteNotificationAsync( + public async virtual Task DeleteNotificationAsync( NotificationInfo notification, CancellationToken cancellationToken = default) { @@ -104,7 +104,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task DeleteNotificationAsync( + public async virtual Task DeleteNotificationAsync( int batchCount, CancellationToken cancellationToken = default) { @@ -118,7 +118,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task DeleteUserNotificationAsync( + public async virtual Task DeleteUserNotificationAsync( Guid? tenantId, Guid userId, long notificationId, @@ -136,7 +136,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task DeleteAllUserSubscriptionAsync( + public async virtual Task DeleteAllUserSubscriptionAsync( Guid? tenantId, string notificationName, CancellationToken cancellationToken = default) @@ -151,7 +151,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task DeleteUserSubscriptionAsync( + public async virtual Task DeleteUserSubscriptionAsync( Guid? tenantId, Guid userId, string notificationName, @@ -169,7 +169,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task DeleteUserSubscriptionAsync( + public async virtual Task DeleteUserSubscriptionAsync( Guid? tenantId, IEnumerable identifiers, string notificationName, @@ -185,7 +185,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task GetNotificationOrNullAsync( + public async virtual Task GetNotificationOrNullAsync( Guid? tenantId, long notificationId, CancellationToken cancellationToken = default) @@ -199,7 +199,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task> GetUserSubscriptionsAsync( + public async virtual Task> GetUserSubscriptionsAsync( Guid? tenantId, string notificationName, IEnumerable identifiers = null, @@ -215,7 +215,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task> GetUserNotificationsAsync( + public async virtual Task> GetUserNotificationsAsync( Guid? tenantId, Guid userId, NotificationReadState? readState = null, @@ -231,7 +231,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task GetUserNotificationsCountAsync( + public async virtual Task GetUserNotificationsCountAsync( Guid? tenantId, Guid userId, string filter = "", @@ -245,7 +245,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task> GetUserNotificationsAsync( + public async virtual Task> GetUserNotificationsAsync( Guid? tenantId, Guid userId, string filter = "", @@ -264,7 +264,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task> GetUserSubscriptionsAsync( + public async virtual Task> GetUserSubscriptionsAsync( Guid? tenantId, Guid userId, CancellationToken cancellationToken = default) @@ -288,7 +288,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task> GetUserSubscriptionsAsync( + public async virtual Task> GetUserSubscriptionsAsync( Guid? tenantId, string userName, CancellationToken cancellationToken = default) @@ -312,7 +312,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task InsertNotificationAsync( + public async virtual Task InsertNotificationAsync( NotificationInfo notification, CancellationToken cancellationToken = default) { @@ -341,7 +341,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task InsertUserNotificationAsync( + public async virtual Task InsertUserNotificationAsync( NotificationInfo notification, Guid userId, CancellationToken cancellationToken = default) @@ -357,7 +357,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task InsertUserSubscriptionAsync( + public async virtual Task InsertUserSubscriptionAsync( Guid? tenantId, UserIdentifier identifier, string notificationName, @@ -379,7 +379,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task InsertUserSubscriptionAsync( + public async virtual Task InsertUserSubscriptionAsync( Guid? tenantId, IEnumerable identifiers, string notificationName, @@ -402,7 +402,7 @@ namespace LINGYUN.Abp.MessageService.Notifications } } - public virtual async Task IsSubscribedAsync( + public async virtual Task IsSubscribedAsync( Guid? tenantId, Guid userId, string notificationName, @@ -413,7 +413,7 @@ namespace LINGYUN.Abp.MessageService.Notifications .UserSubscribeExistsAysnc(notificationName, userId, cancellationToken); } - public virtual async Task InsertUserNotificationsAsync( + public async virtual Task InsertUserNotificationsAsync( NotificationInfo notification, IEnumerable userIds, CancellationToken cancellationToken = default) diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreMessageRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreMessageRepository.cs index 65d78e375..614466f08 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreMessageRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreMessageRepository.cs @@ -30,7 +30,7 @@ namespace LINGYUN.Abp.MessageService.Chat { } - public virtual async Task GetGroupMessageAsync( + public async virtual Task GetGroupMessageAsync( long id, CancellationToken cancellationToken = default) { @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.MessageService.Chat .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetGroupMessagesAsync( + public async virtual Task> GetGroupMessagesAsync( long groupId, MessageType? type = null, string filter = "", @@ -63,7 +63,7 @@ namespace LINGYUN.Abp.MessageService.Chat return groupMessages; } - public virtual async Task GetGroupMessagesCountAsync( + public async virtual Task GetGroupMessagesCountAsync( long groupId, MessageType? type = null, string filter = "", @@ -79,7 +79,7 @@ namespace LINGYUN.Abp.MessageService.Chat return groupMessagesCount; } - public virtual async Task> GetUserGroupMessagesAsync( + public async virtual Task> GetUserGroupMessagesAsync( Guid sendUserId, long groupId, MessageType? type = null, @@ -102,7 +102,7 @@ namespace LINGYUN.Abp.MessageService.Chat return groupMessages; } - public virtual async Task GetUserGroupMessagesCountAsync( + public async virtual Task GetUserGroupMessagesCountAsync( Guid sendUserId, long groupId, MessageType? type = null, @@ -117,7 +117,7 @@ namespace LINGYUN.Abp.MessageService.Chat return groupMessagesCount; } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( long groupId, MessageType? type = null, string filter = "", @@ -130,7 +130,7 @@ namespace LINGYUN.Abp.MessageService.Chat .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( Guid sendUserId, Guid receiveUserId, MessageType? type = null, @@ -145,7 +145,7 @@ namespace LINGYUN.Abp.MessageService.Chat .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetUserMessageAsync( + public async virtual Task GetUserMessageAsync( long id, CancellationToken cancellationToken = default) { @@ -155,7 +155,7 @@ namespace LINGYUN.Abp.MessageService.Chat .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetLastMessagesAsync( + public async virtual Task> GetLastMessagesAsync( Guid userId, MessageState? state = null, string sorting = nameof(LastChatMessage.SendTime), @@ -429,7 +429,7 @@ namespace LINGYUN.Abp.MessageService.Chat } - public virtual async Task> GetUserMessagesAsync( + public async virtual Task> GetUserMessagesAsync( Guid sendUserId, Guid receiveUserId, MessageType? type = null, @@ -453,7 +453,7 @@ namespace LINGYUN.Abp.MessageService.Chat return userMessages; } - public virtual async Task GetUserMessagesCountAsync( + public async virtual Task GetUserMessagesCountAsync( Guid sendUserId, Guid receiveUserId, MessageType? type = null, @@ -471,7 +471,7 @@ namespace LINGYUN.Abp.MessageService.Chat return userMessagesCount; } - public virtual async Task InsertGroupMessageAsync( + public async virtual Task InsertGroupMessageAsync( GroupMessage groupMessage, CancellationToken cancellationToken = default) { @@ -479,14 +479,14 @@ namespace LINGYUN.Abp.MessageService.Chat .AddAsync(groupMessage, GetCancellationToken(cancellationToken)); } - public virtual async Task UpdateGroupMessageAsync( + public async virtual Task UpdateGroupMessageAsync( GroupMessage groupMessage, CancellationToken cancellationToken = default) { (await GetDbContextAsync()).Set().Update(groupMessage); } - public virtual async Task InsertUserMessageAsync( + public async virtual Task InsertUserMessageAsync( UserMessage userMessage, CancellationToken cancellationToken = default) { @@ -494,7 +494,7 @@ namespace LINGYUN.Abp.MessageService.Chat .AddAsync(userMessage, GetCancellationToken(cancellationToken)); } - public virtual async Task UpdateUserMessageAsync( + public async virtual Task UpdateUserMessageAsync( UserMessage userMessage, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatCardRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatCardRepository.cs index 02dbc5869..ff2268fee 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatCardRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatCardRepository.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Abp.MessageService.Chat { } - public virtual async Task FindByUserIdAsync( + public async virtual Task FindByUserIdAsync( Guid userId, CancellationToken cancellationToken = default) { @@ -29,14 +29,14 @@ namespace LINGYUN.Abp.MessageService.Chat .FirstAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task CheckUserIdExistsAsync(Guid userId, CancellationToken cancellationToken = default) + public async virtual Task CheckUserIdExistsAsync(Guid userId, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .AnyAsync(ucc => ucc.UserId == userId, GetCancellationToken(cancellationToken)); } - public virtual async Task GetMemberAsync(Guid findUserId, CancellationToken cancellationToken = default) + public async virtual Task GetMemberAsync(Guid findUserId, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Where(ucc => ucc.UserId == findUserId) @@ -44,7 +44,7 @@ namespace LINGYUN.Abp.MessageService.Chat .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetMemberCountAsync( + public async virtual Task GetMemberCountAsync( string findUserName = "", int? startAge = null, int? endAge = null, @@ -59,7 +59,7 @@ namespace LINGYUN.Abp.MessageService.Chat .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetMembersAsync( + public async virtual Task> GetMembersAsync( string findUserName = "", int? startAge = null, int? endAge = null, diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatFriendRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatFriendRepository.cs index ce9d4b7af..804336a16 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatFriendRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Chat/EfCoreUserChatFriendRepository.cs @@ -21,14 +21,14 @@ namespace LINGYUN.Abp.MessageService.Chat { } - public virtual async Task FindByUserFriendIdAsync(Guid userId, Guid friendId, CancellationToken cancellationToken = default) + public async virtual Task FindByUserFriendIdAsync(Guid userId, Guid friendId, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Where(ucf => ucf.UserId == userId && ucf.FrientId == friendId) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetAllMembersAsync( + public async virtual Task> GetAllMembersAsync( Guid userId, string sorting = nameof(UserChatFriend.RemarkName), CancellationToken cancellationToken = default) @@ -64,7 +64,7 @@ namespace LINGYUN.Abp.MessageService.Chat .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetMemberAsync(Guid userId, Guid friendId, CancellationToken cancellationToken = default) + public async virtual Task GetMemberAsync(Guid userId, Guid friendId, CancellationToken cancellationToken = default) { var dbContext = await GetDbContextAsync(); var userFriendQuery = from ucf in dbContext.Set() @@ -95,7 +95,7 @@ namespace LINGYUN.Abp.MessageService.Chat .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetMembersAsync( + public async virtual Task> GetMembersAsync( Guid userId, string filter = "", string sorting = nameof(UserChatFriend.UserId), @@ -144,7 +144,7 @@ namespace LINGYUN.Abp.MessageService.Chat .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetLastContactMembersAsync( + public async virtual Task> GetLastContactMembersAsync( Guid userId, int skipCount = 0, int maxResultCount = 10, @@ -186,7 +186,7 @@ namespace LINGYUN.Abp.MessageService.Chat .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetMembersCountAsync(Guid userId, string filter = "", CancellationToken cancellationToken = default) + public async virtual Task GetMembersCountAsync(Guid userId, string filter = "", CancellationToken cancellationToken = default) { var dbContext = await GetDbContextAsync(); var userChatCardQuery = dbContext.Set() @@ -206,7 +206,7 @@ namespace LINGYUN.Abp.MessageService.Chat .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task IsFriendAsync( + public async virtual Task IsFriendAsync( Guid userId, Guid frientId, CancellationToken cancellationToken = default) @@ -216,7 +216,7 @@ namespace LINGYUN.Abp.MessageService.Chat GetCancellationToken(cancellationToken)); } - public virtual async Task IsAddedAsync(Guid userId, Guid frientId, CancellationToken cancellationToken = default) + public async virtual Task IsAddedAsync(Guid userId, Guid frientId, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .AnyAsync(ucf => ucf.UserId == userId && ucf.FrientId == frientId, diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreGroupRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreGroupRepository.cs index 5e288274b..79ec4ac88 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreGroupRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreGroupRepository.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.MessageService.Groups { } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default) { @@ -31,7 +31,7 @@ namespace LINGYUN.Abp.MessageService.Groups .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string filter = null, string sorting = nameof(ChatGroup.Name), int skipCount = 0, @@ -46,7 +46,7 @@ namespace LINGYUN.Abp.MessageService.Groups .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task FindByIdAsync( + public async virtual Task FindByIdAsync( long id, CancellationToken cancellationToken = default) { @@ -55,7 +55,7 @@ namespace LINGYUN.Abp.MessageService.Groups .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetGroupAdminAsync( + public async virtual Task> GetGroupAdminAsync( long id, CancellationToken cancellationToken = default) { @@ -71,7 +71,7 @@ namespace LINGYUN.Abp.MessageService.Groups return groupAdmins; } - public virtual async Task UserHasBlackedAsync( + public async virtual Task UserHasBlackedAsync( long id, Guid formUserId, CancellationToken cancellationToken = default) diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreUserChatGroupRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreUserChatGroupRepository.cs index d47a5a8b0..ed4cdc8a8 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreUserChatGroupRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Groups/EfCoreUserChatGroupRepository.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.MessageService.Groups { } - public virtual async Task GetMemberAsync( + public async virtual Task GetMemberAsync( long groupId, Guid userId, CancellationToken cancellationToken = default) @@ -57,7 +57,7 @@ namespace LINGYUN.Abp.MessageService.Groups .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetMembersAsync( + public async virtual Task> GetMembersAsync( long groupId, string sorting = nameof(UserChatCard.UserId), int skipCount = 0, @@ -96,7 +96,7 @@ namespace LINGYUN.Abp.MessageService.Groups .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetMembersCountAsync( + public async virtual Task GetMembersCountAsync( long groupId, CancellationToken cancellationToken = default) { @@ -115,7 +115,7 @@ namespace LINGYUN.Abp.MessageService.Groups .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task MemberHasInGroupAsync( + public async virtual Task MemberHasInGroupAsync( long groupId, Guid userId, CancellationToken cancellationToken = default) @@ -125,7 +125,7 @@ namespace LINGYUN.Abp.MessageService.Groups GetCancellationToken(cancellationToken)); } - public virtual async Task> GetMemberGroupsAsync( + public async virtual Task> GetMemberGroupsAsync( Guid userId, CancellationToken cancellationToken = default) { @@ -159,7 +159,7 @@ namespace LINGYUN.Abp.MessageService.Groups .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task RemoveMemberFormGroupAsync( + public async virtual Task RemoveMemberFormGroupAsync( long groupId, Guid userId, CancellationToken cancellationToken = default) diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Notifications/EfCoreUserNotificationRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Notifications/EfCoreUserNotificationRepository.cs index de724f3aa..e0198d497 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Notifications/EfCoreUserNotificationRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Notifications/EfCoreUserNotificationRepository.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.MessageService.Notifications { } - public virtual async Task AnyAsync( + public async virtual Task AnyAsync( Guid userId, long notificationId, CancellationToken cancellationToken = default) @@ -32,7 +32,7 @@ namespace LINGYUN.Abp.MessageService.Notifications GetCancellationToken(cancellationToken)); } - public virtual async Task GetByIdAsync( + public async virtual Task GetByIdAsync( Guid userId, long notificationId, CancellationToken cancellationToken = default) @@ -74,7 +74,7 @@ namespace LINGYUN.Abp.MessageService.Notifications .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetNotificationsAsync( + public async virtual Task> GetNotificationsAsync( Guid userId, NotificationReadState? readState = null, int maxResultCount = 10, @@ -108,7 +108,7 @@ namespace LINGYUN.Abp.MessageService.Notifications .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( Guid userId, string filter = "", NotificationReadState? readState = null, @@ -133,7 +133,7 @@ namespace LINGYUN.Abp.MessageService.Notifications .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( Guid userId, string filter = "", string sorting = nameof(Notification.CreationTime), diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Subscriptions/EfCoreUserSubscribeRepository.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Subscriptions/EfCoreUserSubscribeRepository.cs index 4ed47147c..828803cd4 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Subscriptions/EfCoreUserSubscribeRepository.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Subscriptions/EfCoreUserSubscribeRepository.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions { } - public virtual async Task> GetUserSubscribesAsync( + public async virtual Task> GetUserSubscribesAsync( string notificationName, IEnumerable userIds = null, CancellationToken cancellationToken = default) @@ -36,7 +36,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions return userSubscribes; } - public virtual async Task GetUserSubscribeAsync( + public async virtual Task GetUserSubscribeAsync( string notificationName, Guid userId, CancellationToken cancellationToken = default) @@ -49,7 +49,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions return userSubscribe; } - public virtual async Task> GetUserSubscribesAsync( + public async virtual Task> GetUserSubscribesAsync( Guid userId, CancellationToken cancellationToken = default) { @@ -62,7 +62,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions return userSubscribeNames; } - public virtual async Task> GetUserSubscribesByNameAsync( + public async virtual Task> GetUserSubscribesByNameAsync( string userName, CancellationToken cancellationToken = default) { @@ -75,7 +75,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions return userSubscribeNames; } - public virtual async Task> GetUserSubscribesAsync( + public async virtual Task> GetUserSubscribesAsync( string notificationName, CancellationToken cancellationToken = default) { @@ -88,14 +88,14 @@ namespace LINGYUN.Abp.MessageService.Subscriptions return subscribeUsers; } - public virtual async Task InsertUserSubscriptionAsync( + public async virtual Task InsertUserSubscriptionAsync( IEnumerable userSubscribes, CancellationToken cancellationToken = default) { await (await GetDbSetAsync()).AddRangeAsync(userSubscribes, GetCancellationToken(cancellationToken)); } - public virtual async Task DeleteUserSubscriptionAsync( + public async virtual Task DeleteUserSubscriptionAsync( string notificationName, CancellationToken cancellationToken = default) { @@ -104,14 +104,14 @@ namespace LINGYUN.Abp.MessageService.Subscriptions (await GetDbSetAsync()).RemoveRange(userSubscribes); } - public virtual async Task DeleteUserSubscriptionAsync( + public async virtual Task DeleteUserSubscriptionAsync( IEnumerable userSubscribes, CancellationToken cancellationToken = default) { await DeleteManyAsync(userSubscribes); } - public virtual async Task DeleteUserSubscriptionAsync( + public async virtual Task DeleteUserSubscriptionAsync( string notificationName, IEnumerable userIds, CancellationToken cancellationToken = default) @@ -121,7 +121,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions GetCancellationToken(cancellationToken)); } - public virtual async Task UserSubscribeExistsAysnc( + public async virtual Task UserSubscribeExistsAysnc( string notificationName, Guid userId, CancellationToken cancellationToken = default) @@ -131,7 +131,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions GetCancellationToken(cancellationToken)); } - public virtual async Task> GetUserSubscribesAsync( + public async virtual Task> GetUserSubscribesAsync( Guid userId, string sorting = "Id", int skipCount = 1, @@ -149,7 +149,7 @@ namespace LINGYUN.Abp.MessageService.Subscriptions return userSubscribes; } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( Guid userId, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs index 48bb31206..fd9ff0e67 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs @@ -20,28 +20,28 @@ namespace LINGYUN.Abp.MessageService.Chat [HttpGet] [Route("group/messages")] - public virtual async Task> GetMyGroupMessageAsync(GroupMessageGetByPagedDto input) + public async virtual Task> GetMyGroupMessageAsync(GroupMessageGetByPagedDto input) { return await _chatAppService.GetMyGroupMessageAsync(input); } [HttpGet] [Route("my-messages")] - public virtual async Task> GetMyChatMessageAsync(UserMessageGetByPagedDto input) + public async virtual Task> GetMyChatMessageAsync(UserMessageGetByPagedDto input) { return await _chatAppService.GetMyChatMessageAsync(input); } [HttpGet] [Route("my-last-messages")] - public virtual async Task> GetMyLastChatMessageAsync(GetUserLastMessageDto input) + public async virtual Task> GetMyLastChatMessageAsync(GetUserLastMessageDto input) { return await _chatAppService.GetMyLastChatMessageAsync(input); } [HttpPost] [Route("send-message")] - public virtual async Task SendMessageAsync(ChatMessage input) + public async virtual Task SendMessageAsync(ChatMessage input) { return await _chatAppService.SendMessageAsync(input); } diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs index dcc0585e8..99a01cbe6 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs @@ -20,40 +20,40 @@ namespace LINGYUN.Abp.MessageService.Chat } [HttpPost] - public virtual async Task CreateAsync(MyFriendCreateDto input) + public async virtual Task CreateAsync(MyFriendCreateDto input) { await MyFriendAppService.CreateAsync(input); } [HttpPost] [Route("add-request")] - public virtual async Task AddRequestAsync(MyFriendAddRequestDto input) + public async virtual Task AddRequestAsync(MyFriendAddRequestDto input) { await MyFriendAppService.AddRequestAsync(input); } [HttpDelete] - public virtual async Task DeleteAsync(MyFriendOperationDto input) + public async virtual Task DeleteAsync(MyFriendOperationDto input) { await MyFriendAppService.DeleteAsync(input); } [HttpGet] [Route("{friendId}")] - public virtual async Task GetAsync(Guid friendId) + public async virtual Task GetAsync(Guid friendId) { return await MyFriendAppService.GetAsync(friendId); } [HttpGet] [Route("all")] - public virtual async Task> GetAllListAsync(GetMyFriendsDto input) + public async virtual Task> GetAllListAsync(GetMyFriendsDto input) { return await MyFriendAppService.GetAllListAsync(input); } [HttpGet] - public virtual async Task> GetListAsync(MyFriendGetByPagedDto input) + public async virtual Task> GetListAsync(MyFriendGetByPagedDto input) { return await MyFriendAppService.GetListAsync(input); } diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs index 5fa785abc..d07ca3299 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs @@ -20,14 +20,14 @@ namespace LINGYUN.Abp.MessageService.Groups [HttpGet] [Route("{groupId}")] - public virtual async Task GetAsync(string groupId) + public async virtual Task GetAsync(string groupId) { return await _service.GetAsync(groupId); } [HttpGet] [Route("search")] - public virtual async Task> SearchAsync(GroupSearchInput input) + public async virtual Task> SearchAsync(GroupSearchInput input) { return await _service.SearchAsync(input); } diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs index 0d3b71f1d..7b0152e0f 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs @@ -20,34 +20,34 @@ namespace LINGYUN.Abp.MessageService.Groups [HttpPost] [Route("join")] - public virtual async Task ApplyJoinGroupAsync(UserJoinGroupDto input) + public async virtual Task ApplyJoinGroupAsync(UserJoinGroupDto input) { await _service.ApplyJoinGroupAsync(input); } [HttpGet] - public virtual async Task> GetGroupUsersAsync(GroupUserGetByPagedDto input) + public async virtual Task> GetGroupUsersAsync(GroupUserGetByPagedDto input) { return await _service.GetGroupUsersAsync(input); } [HttpGet] [Route("me")] - public virtual async Task> GetMyGroupsAsync() + public async virtual Task> GetMyGroupsAsync() { return await _service.GetMyGroupsAsync(); } [HttpPut] [Route("accept")] - public virtual async Task GroupAcceptUserAsync(GroupAcceptUserDto input) + public async virtual Task GroupAcceptUserAsync(GroupAcceptUserDto input) { await _service.GroupAcceptUserAsync(input); } [HttpPut] [Route("remove")] - public virtual async Task GroupRemoveUserAsync(GroupRemoveUserDto input) + public async virtual Task GroupRemoveUserAsync(GroupRemoveUserDto input) { await _service.GroupRemoveUserAsync(input); } diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionController.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionController.cs index 26e767b5d..855477648 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionController.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Subscriptions/MySubscriptionController.cs @@ -20,32 +20,32 @@ namespace LINGYUN.Abp.MessageService.Subscriptions [HttpGet] [Route("all")] - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { return await _subscriptionAppService.GetAllListAsync(); } [HttpGet] - public virtual async Task> GetListAsync(SubscriptionsGetByPagedDto input) + public async virtual Task> GetListAsync(SubscriptionsGetByPagedDto input) { return await _subscriptionAppService.GetListAsync(input); } [HttpGet] [Route("is-subscribed/{Name}")] - public virtual async Task IsSubscribedAsync(SubscriptionsGetByNameDto input) + public async virtual Task IsSubscribedAsync(SubscriptionsGetByNameDto input) { return await _subscriptionAppService.IsSubscribedAsync(input); } [HttpPost] - public virtual async Task SubscribeAsync(SubscriptionsGetByNameDto input) + public async virtual Task SubscribeAsync(SubscriptionsGetByNameDto input) { await _subscriptionAppService.SubscribeAsync(input); } [HttpDelete] - public virtual async Task UnSubscribeAsync(SubscriptionsGetByNameDto input) + public async virtual Task UnSubscribeAsync(SubscriptionsGetByNameDto input) { await _subscriptionAppService.UnSubscribeAsync(input); } diff --git a/aspnet-core/modules/navigation/LINGYUN.Abp.UI.Navigation/LINGYUN/Abp/UI/Navigation/NavigationDataSeedContributor.cs b/aspnet-core/modules/navigation/LINGYUN.Abp.UI.Navigation/LINGYUN/Abp/UI/Navigation/NavigationDataSeedContributor.cs index bbf48d6a7..37261fd98 100644 --- a/aspnet-core/modules/navigation/LINGYUN.Abp.UI.Navigation/LINGYUN/Abp/UI/Navigation/NavigationDataSeedContributor.cs +++ b/aspnet-core/modules/navigation/LINGYUN.Abp.UI.Navigation/LINGYUN/Abp/UI/Navigation/NavigationDataSeedContributor.cs @@ -35,7 +35,7 @@ namespace LINGYUN.Abp.UI.Navigation _lazyContributors = new Lazy>(CreateContributors); } - public virtual async Task SeedAsync(DataSeedContext context) + public async virtual Task SeedAsync(DataSeedContext context) { using (_currentTenant.Change(context.TenantId)) { diff --git a/aspnet-core/modules/open-api/LINGYUN.Abp.OpenApi.Authorization/LINGYUN/Abp/OpenApi/Authorization/OpenApiAuthorizationService.cs b/aspnet-core/modules/open-api/LINGYUN.Abp.OpenApi.Authorization/LINGYUN/Abp/OpenApi/Authorization/OpenApiAuthorizationService.cs index 9350ca483..5f4e760cc 100644 --- a/aspnet-core/modules/open-api/LINGYUN.Abp.OpenApi.Authorization/LINGYUN/Abp/OpenApi/Authorization/OpenApiAuthorizationService.cs +++ b/aspnet-core/modules/open-api/LINGYUN.Abp.OpenApi.Authorization/LINGYUN/Abp/OpenApi/Authorization/OpenApiAuthorizationService.cs @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.OpenApi.Authorization _openApiOptions = options.CurrentValue; } - public virtual async Task AuthorizeAsync(HttpContext httpContext) + public async virtual Task AuthorizeAsync(HttpContext httpContext) { if (!_openApiOptions.IsEnabled) { @@ -172,7 +172,7 @@ namespace LINGYUN.Abp.OpenApi.Authorization return true; } - protected virtual async Task Unauthorized(HttpContext context, BusinessException exception) + protected async virtual Task Unauthorized(HttpContext context, BusinessException exception) { var errorInfoConverter = context.RequestServices.GetRequiredService(); var errorInfo = errorInfoConverter.Convert(exception, options => diff --git a/aspnet-core/modules/open-api/OpenApi.Sdk/OpenApi/ClientProxy.cs b/aspnet-core/modules/open-api/OpenApi.Sdk/OpenApi/ClientProxy.cs index beff7aba8..e15cf9da7 100644 --- a/aspnet-core/modules/open-api/OpenApi.Sdk/OpenApi/ClientProxy.cs +++ b/aspnet-core/modules/open-api/OpenApi.Sdk/OpenApi/ClientProxy.cs @@ -20,32 +20,32 @@ namespace OpenApi _httpClientFactory = httpClientFactory; } - public virtual async Task> DeleteAsync(string url, string appKey, string appSecret) + public async virtual Task> DeleteAsync(string url, string appKey, string appSecret) { return await RequestAsync(url, appKey, appSecret, HttpMethod.Delete); } - public virtual async Task> GetAsync(string url, string appKey, string appSecret) + public async virtual Task> GetAsync(string url, string appKey, string appSecret) { return await RequestAsync(url, appKey, appSecret, HttpMethod.Get); } - public virtual async Task> PostAsync(string url, string appKey, string appSecret, TRequest request) + public async virtual Task> PostAsync(string url, string appKey, string appSecret, TRequest request) { return await RequestAsync(url, appKey, appSecret, request, HttpMethod.Post); } - public virtual async Task> PutAsync(string url, string appKey, string appSecret, TRequest request) + public async virtual Task> PutAsync(string url, string appKey, string appSecret, TRequest request) { return await RequestAsync(url, appKey, appSecret, request, HttpMethod.Put); } - public virtual async Task> RequestAsync(string url, string appKey, string appSecret, HttpMethod httpMethod) + public async virtual Task> RequestAsync(string url, string appKey, string appSecret, HttpMethod httpMethod) { return await RequestAsync(url, appKey, appSecret, null, httpMethod); } - public virtual async Task> RequestAsync(string url, string appKey, string appSecret, TRequest request, HttpMethod httpMethod) + public async virtual Task> RequestAsync(string url, string appKey, string appSecret, TRequest request, HttpMethod httpMethod) { // 构建请求客户端 var client = _httpClientFactory.CreateClient("opensdk"); @@ -53,7 +53,7 @@ namespace OpenApi return await RequestAsync(client, url, appKey, appSecret, request, httpMethod); } - public virtual async Task> RequestAsync(HttpClient client, string url, string appKey, string appSecret, TRequest request, HttpMethod httpMethod) + public async virtual Task> RequestAsync(HttpClient client, string url, string appKey, string appSecret, TRequest request, HttpMethod httpMethod) { // UTC时间戳 var timeStamp = GetUtcTimeStampString(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Aliyun/LINGYUN/Abp/OssManagement/Aliyun/AliyunOssContainer.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Aliyun/LINGYUN/Abp/OssManagement/Aliyun/AliyunOssContainer.cs index 3e539a90b..399b4b549 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Aliyun/LINGYUN/Abp/OssManagement/Aliyun/AliyunOssContainer.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Aliyun/LINGYUN/Abp/OssManagement/Aliyun/AliyunOssContainer.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun CurrentTenant = currentTenant; OssClientFactory = ossClientFactory; } - public virtual async Task BulkDeleteObjectsAsync(BulkDeleteObjectRequest request) + public async virtual Task BulkDeleteObjectsAsync(BulkDeleteObjectRequest request) { var ossClient = await CreateClientAsync(); @@ -34,7 +34,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun ossClient.DeleteObjects(aliyunRequest); } - public virtual async Task CreateAsync(string name) + public async virtual Task CreateAsync(string name) { var ossClient = await CreateClientAsync(); @@ -57,7 +57,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun }); } - public virtual async Task CreateObjectAsync(CreateOssObjectRequest request) + public async virtual Task CreateObjectAsync(CreateOssObjectRequest request) { var ossClient = await CreateClientAsync(); @@ -125,7 +125,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun return ossObject; } - public virtual async Task DeleteAsync(string name) + public async virtual Task DeleteAsync(string name) { // 阿里云oss在控制台设置即可,无需改变 var ossClient = await CreateClientAsync(); @@ -136,7 +136,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun } } - public virtual async Task DeleteObjectAsync(GetOssObjectRequest request) + public async virtual Task DeleteObjectAsync(GetOssObjectRequest request) { var ossClient = await CreateClientAsync(); @@ -160,14 +160,14 @@ namespace LINGYUN.Abp.OssManagement.Aliyun } } - public virtual async Task ExistsAsync(string name) + public async virtual Task ExistsAsync(string name) { var ossClient = await CreateClientAsync(); return BucketExists(ossClient, name); } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var ossClient = await CreateClientAsync(); if (!BucketExists(ossClient, name)) @@ -189,7 +189,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun }); } - public virtual async Task GetObjectAsync(GetOssObjectRequest request) + public async virtual Task GetObjectAsync(GetOssObjectRequest request) { var ossClient = await CreateClientAsync(); if (!BucketExists(ossClient, request.Bucket)) @@ -234,7 +234,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun return ossObject; } - public virtual async Task GetListAsync(GetOssContainersRequest request) + public async virtual Task GetListAsync(GetOssContainersRequest request) { var ossClient = await CreateClientAsync(); @@ -266,7 +266,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun .ToList()); } - public virtual async Task GetObjectsAsync(GetOssObjectsRequest request) + public async virtual Task GetObjectsAsync(GetOssObjectsRequest request) { var ossClient = await CreateClientAsync(); @@ -366,7 +366,7 @@ namespace LINGYUN.Abp.OssManagement.Aliyun return client.DoesObjectExist(bucketName, objectName); } - protected virtual async Task CreateClientAsync() + protected async virtual Task CreateClientAsync() { return await OssClientFactory.CreateAsync(); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileAppServiceBase.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileAppServiceBase.cs index d77d95e09..98ea4747e 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileAppServiceBase.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileAppServiceBase.cs @@ -30,7 +30,7 @@ namespace LINGYUN.Abp.OssManagement } [RequiresFeature(AbpOssManagementFeatureNames.OssObject.UploadFile)] - public virtual async Task UploadAsync(UploadFileChunkInput input) + public async virtual Task UploadAsync(UploadFileChunkInput input) { input.Bucket = GetCurrentBucket(); input.Path = GetCurrentPath(HttpUtility.UrlDecode(input.Path)); @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.OssManagement AbpOssManagementFeatureNames.OssObject.UploadLimit, AbpOssManagementFeatureNames.OssObject.UploadInterval, LimitPolicy.Month)] - public virtual async Task UploadAsync(UploadFileInput input) + public async virtual Task UploadAsync(UploadFileInput input) { if (input.File == null || !input.File.ContentLength.HasValue) { @@ -71,7 +71,7 @@ namespace LINGYUN.Abp.OssManagement return ObjectMapper.Map(ossObject); } - public virtual async Task> GetListAsync(GetFilesInput input) + public async virtual Task> GetListAsync(GetFilesInput input) { var ossContainer = OssContainerFactory.Create(); var response = await ossContainer.GetObjectsAsync( @@ -89,7 +89,7 @@ namespace LINGYUN.Abp.OssManagement AbpOssManagementFeatureNames.OssObject.DownloadLimit, AbpOssManagementFeatureNames.OssObject.DownloadInterval, LimitPolicy.Month)] - public virtual async Task GetAsync(GetPublicFileInput input) + public async virtual Task GetAsync(GetPublicFileInput input) { var ossObjectRequest = new GetOssObjectRequest( GetCurrentBucket(), @@ -107,7 +107,7 @@ namespace LINGYUN.Abp.OssManagement return new RemoteStreamContent(ossObject.Content); } - public virtual async Task DeleteAsync(GetPublicFileInput input) + public async virtual Task DeleteAsync(GetPublicFileInput input) { var ossContainer = OssContainerFactory.Create(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploadMerger.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploadMerger.cs index 6811e0eca..dc55102d8 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploadMerger.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploadMerger.cs @@ -38,7 +38,7 @@ namespace LINGYUN.Abp.OssManagement AbpOssManagementFeatureNames.OssObject.UploadLimit, AbpOssManagementFeatureNames.OssObject.UploadInterval, LimitPolicy.Month)] - public virtual async Task MergeAsync(CreateOssObjectInput input) + public async virtual Task MergeAsync(CreateOssObjectInput input) { if (input.File == null || !input.File.ContentLength.HasValue) { diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploader.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploader.cs index 28ec1b75a..fb1f0e728 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploader.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploader.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.OssManagement _fileUploadMerger = fileUploadMerger; } - public virtual async Task UploadAsync(UploadFileChunkInput input, CancellationToken cancellationToken = default) + public async virtual Task UploadAsync(UploadFileChunkInput input, CancellationToken cancellationToken = default) { await _fileValidater.ValidationAsync(input); // 以上传的文件名创建一个临时目录 diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileValidater.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileValidater.cs index dd28e42f6..10c56857e 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileValidater.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileValidater.cs @@ -31,7 +31,7 @@ namespace LINGYUN.Abp.OssManagement _stringLocalizer = stringLocalizer; } - public virtual async Task ValidationAsync(UploadFile input) + public async virtual Task ValidationAsync(UploadFile input) { var validation = await GetByCacheItemAsync(); if (validation.SizeLimit * 1024 * 1024 < input.TotalSize) @@ -46,7 +46,7 @@ namespace LINGYUN.Abp.OssManagement } } - protected virtual async Task GetByCacheItemAsync() + protected async virtual Task GetByCacheItemAsync() { var fileValidation = _cache.Get(FileValidation.CacheKey); if (fileValidation == null) @@ -62,7 +62,7 @@ namespace LINGYUN.Abp.OssManagement return fileValidation; } - protected virtual async Task GetBySettingAsync() + protected async virtual Task GetBySettingAsync() { var fileSizeLimited = await _settingProvider .GetAsync( diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssContainerAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssContainerAppService.cs index 024a78951..76dee98bc 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssContainerAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssContainerAppService.cs @@ -16,7 +16,7 @@ namespace LINGYUN.Abp.OssManagement } [Authorize(AbpOssManagementPermissions.Container.Create)] - public virtual async Task CreateAsync(string name) + public async virtual Task CreateAsync(string name) { var oss = CreateOssContainer(); var container = await oss.CreateAsync(name); @@ -25,14 +25,14 @@ namespace LINGYUN.Abp.OssManagement } [Authorize(AbpOssManagementPermissions.Container.Delete)] - public virtual async Task DeleteAsync(string name) + public async virtual Task DeleteAsync(string name) { var oss = CreateOssContainer(); await oss.DeleteAsync(name); } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var oss = CreateOssContainer(); var container = await oss.GetAsync(name); @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.OssManagement return ObjectMapper.Map(container); } - public virtual async Task GetListAsync(GetOssContainersInput input) + public async virtual Task GetListAsync(GetOssContainersInput input) { var oss = CreateOssContainer(); @@ -50,7 +50,7 @@ namespace LINGYUN.Abp.OssManagement return ObjectMapper.Map(containerResponse); } - public virtual async Task GetObjectListAsync(GetOssObjectsInput input) + public async virtual Task GetObjectListAsync(GetOssObjectsInput input) { var oss = CreateOssContainer(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssObjectAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssObjectAppService.cs index c59f45854..490d15de6 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssObjectAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssObjectAppService.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.OssManagement } [Authorize(AbpOssManagementPermissions.OssObject.Create)] - public virtual async Task CreateAsync(CreateOssObjectInput input) + public async virtual Task CreateAsync(CreateOssObjectInput input) { // 内容为空时建立目录 if (input.File == null || !input.File.ContentLength.HasValue) @@ -46,7 +46,7 @@ namespace LINGYUN.Abp.OssManagement } [Authorize(AbpOssManagementPermissions.OssObject.Delete)] - public virtual async Task BulkDeleteAsync(BulkDeleteOssObjectInput input) + public async virtual Task BulkDeleteAsync(BulkDeleteOssObjectInput input) { var oss = CreateOssContainer(); @@ -54,14 +54,14 @@ namespace LINGYUN.Abp.OssManagement } [Authorize(AbpOssManagementPermissions.OssObject.Delete)] - public virtual async Task DeleteAsync(GetOssObjectInput input) + public async virtual Task DeleteAsync(GetOssObjectInput input) { var oss = CreateOssContainer(); await oss.DeleteObjectAsync(input.Bucket, input.Object, input.Path); } - public virtual async Task GetAsync(GetOssObjectInput input) + public async virtual Task GetAsync(GetOssObjectInput input) { var oss = CreateOssContainer(); @@ -70,7 +70,7 @@ namespace LINGYUN.Abp.OssManagement return ObjectMapper.Map(ossObject); } - public virtual async Task GetContentAsync(GetOssObjectInput input) + public async virtual Task GetContentAsync(GetOssObjectInput input) { var oss = CreateOssContainer(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PrivateFileAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PrivateFileAppService.cs index 59b2afee4..4dda9e16b 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PrivateFileAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PrivateFileAppService.cs @@ -93,7 +93,7 @@ namespace LINGYUN.Abp.OssManagement } [Authorize] - public virtual async Task> GetShareListAsync() + public async virtual Task> GetShareListAsync() { var cacheKey = MyFileShareCacheItem.CalculateCacheKey(CurrentUser.GetId()); var cacheItem = await _myShareCache.GetAsync(cacheKey); @@ -124,7 +124,7 @@ namespace LINGYUN.Abp.OssManagement } [Authorize] - public virtual async Task ShareAsync(FileShareInput input) + public async virtual Task ShareAsync(FileShareInput input) { var ossObjectRequest = new GetOssObjectRequest( GetCurrentBucket(), diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PublicFileAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PublicFileAppService.cs index 8105cc000..65799c345 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PublicFileAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/PublicFileAppService.cs @@ -77,7 +77,7 @@ namespace LINGYUN.Abp.OssManagement return "public"; } - protected virtual async Task CheckPublicAccessAsync() + protected async virtual Task CheckPublicAccessAsync() { if (!CurrentUser.IsAuthenticated) { diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/ShareFileAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/ShareFileAppService.cs index 5939ed0f9..a576e9a91 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/ShareFileAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/ShareFileAppService.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.OssManagement _ossContainerFactory = ossContainerFactory; } - public virtual async Task GetAsync(string url) + public async virtual Task GetAsync(string url) { var cacheKey = FileShareCacheItem.CalculateCacheKey(url); var cacheItem = await _shareCache.GetAsync(cacheKey); @@ -88,7 +88,7 @@ namespace LINGYUN.Abp.OssManagement return new GetFileShareDto(ossObject.Name, ossObject.Content); } - protected virtual async Task RefreshUserShareAsync(FileShareCacheItem shareCacheItem) + protected async virtual Task RefreshUserShareAsync(FileShareCacheItem shareCacheItem) { // 清除当前用户共享缓存 var myShareCacheKey = MyFileShareCacheItem.CalculateCacheKey(shareCacheItem.UserId); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/StaticFilesAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/StaticFilesAppService.cs index 6944babd3..ca1b72353 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/StaticFilesAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/StaticFilesAppService.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.OssManagement AbpOssManagementFeatureNames.OssObject.DownloadLimit, AbpOssManagementFeatureNames.OssObject.DownloadInterval, LimitPolicy.Month)] - public virtual async Task GetAsync(GetStaticFileInput input) + public async virtual Task GetAsync(GetStaticFileInput input) { var ossObjectRequest = new GetOssObjectRequest( HttpUtility.UrlDecode(input.Bucket), // 需要处理特殊字符 diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs index 0303b87a1..202d312b6 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs @@ -17,7 +17,7 @@ namespace LINGYUN.Abp.OssManagement _ossContainerFactory = ossContainerFactory; } - public virtual async Task SeedAsync(DataSeedContext context) + public async virtual Task SeedAsync(DataSeedContext context) { var ossContainer = _ossContainerFactory.Create(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem.ImageSharp/LINGYUN/Abp/OssManagement/FileSystem/ImageSharp/ImageSharpFileSystemOssObjectProcesser.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem.ImageSharp/LINGYUN/Abp/OssManagement/FileSystem/ImageSharp/ImageSharpFileSystemOssObjectProcesser.cs index a3d988eaf..5a9695d33 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem.ImageSharp/LINGYUN/Abp/OssManagement/FileSystem/ImageSharp/ImageSharpFileSystemOssObjectProcesser.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem.ImageSharp/LINGYUN/Abp/OssManagement/FileSystem/ImageSharp/ImageSharpFileSystemOssObjectProcesser.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.OssManagement.FileSystem.ImageSharp "255216"// jpg }; - public virtual async Task ProcessAsync(FileSystemOssObjectContext context) + public async virtual Task ProcessAsync(FileSystemOssObjectContext context) { var copyStream = context.OssObject.Content; var bytes = await copyStream.GetAllBytesAsync(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs index d12aa2624..a5c9fe3bd 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs @@ -95,7 +95,7 @@ namespace LINGYUN.Abp.OssManagement.FileSystem return Task.FromResult(container); } - public virtual async Task CreateObjectAsync(CreateOssObjectRequest request) + public async virtual Task CreateObjectAsync(CreateOssObjectRequest request) { var objectPath = !request.Path.IsNullOrWhiteSpace() ? request.Path.EnsureEndsWith('/') @@ -252,7 +252,7 @@ namespace LINGYUN.Abp.OssManagement.FileSystem return Task.FromResult(container); } - public virtual async Task GetObjectAsync(GetOssObjectRequest request) + public async virtual Task GetObjectAsync(GetOssObjectRequest request) { var objectPath = !request.Path.IsNullOrWhiteSpace() ? request.Path.EnsureEndsWith('/') diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs index 8bfe4092c..f586bd6a1 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs @@ -20,34 +20,34 @@ namespace LINGYUN.Abp.OssManagement [HttpPost] [Route("{name}")] - public virtual async Task CreateAsync(string name) + public async virtual Task CreateAsync(string name) { return await OssContainerAppService.CreateAsync(name); } [HttpDelete] [Route("{name}")] - public virtual async Task DeleteAsync(string name) + public async virtual Task DeleteAsync(string name) { await OssContainerAppService.DeleteAsync(name); } [HttpGet] [Route("{name}")] - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { return await OssContainerAppService.GetAsync(name); } [HttpGet] - public virtual async Task GetListAsync(GetOssContainersInput input) + public async virtual Task GetListAsync(GetOssContainersInput input) { return await OssContainerAppService.GetListAsync(input); } [HttpGet] [Route("objects")] - public virtual async Task GetObjectListAsync(GetOssObjectsInput input) + public async virtual Task GetObjectListAsync(GetOssObjectsInput input) { return await OssContainerAppService.GetObjectListAsync(input); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs index 729845af1..c20bbd609 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs @@ -26,7 +26,7 @@ namespace LINGYUN.Abp.OssManagement } [HttpPost] - public virtual async Task CreateAsync([FromForm] CreateOssObjectInput input) + public async virtual Task CreateAsync([FromForm] CreateOssObjectInput input) { return await OssObjectAppService.CreateAsync(input); } @@ -35,33 +35,33 @@ namespace LINGYUN.Abp.OssManagement [Route("upload")] [DisableAuditing] [Authorize(AbpOssManagementPermissions.OssObject.Create)] - public virtual async Task UploadAsync([FromForm] UploadFileChunkInput input) + public async virtual Task UploadAsync([FromForm] UploadFileChunkInput input) { await FileUploader.UploadAsync(input); } [HttpPost] [Route("bulk-delete")] - public virtual async Task BulkDeleteAsync(BulkDeleteOssObjectInput input) + public async virtual Task BulkDeleteAsync(BulkDeleteOssObjectInput input) { await OssObjectAppService.BulkDeleteAsync(input); } [HttpDelete] - public virtual async Task DeleteAsync(GetOssObjectInput input) + public async virtual Task DeleteAsync(GetOssObjectInput input) { await OssObjectAppService.DeleteAsync(input); } [HttpGet] - public virtual async Task GetAsync(GetOssObjectInput input) + public async virtual Task GetAsync(GetOssObjectInput input) { return await OssObjectAppService.GetAsync(input); } [HttpGet] [Route("download")] - public virtual async Task GetContentAsync(GetOssObjectInput input) + public async virtual Task GetContentAsync(GetOssObjectInput input) { return await OssObjectAppService.GetContentAsync(input); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs index ebe0d1e7f..3d5cfd67e 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs @@ -27,21 +27,21 @@ namespace LINGYUN.Abp.OssManagement } [HttpPost] - public virtual async Task UploadAsync([FromForm] UploadFileInput input) + public async virtual Task UploadAsync([FromForm] UploadFileInput input) { return await _service.UploadAsync(input); } [HttpPost] [Route("upload")] - public virtual async Task UploadAsync([FromForm] UploadFileChunkInput input) + public async virtual Task UploadAsync([FromForm] UploadFileChunkInput input) { await _service.UploadAsync(input); } [HttpGet] [Route("search")] - public virtual async Task> GetListAsync(GetFilesInput input) + public async virtual Task> GetListAsync(GetFilesInput input) { return await _service.GetListAsync(input); } @@ -51,27 +51,27 @@ namespace LINGYUN.Abp.OssManagement [Route("{Name}/{Process}")] [Route("p/{Path}/{Name}")] [Route("p/{Path}/{Name}/{Process}")] - public virtual async Task GetAsync([FromRoute] GetPublicFileInput input) + public async virtual Task GetAsync([FromRoute] GetPublicFileInput input) { return await _service.GetAsync(input); } [HttpDelete] - public virtual async Task DeleteAsync(GetPublicFileInput input) + public async virtual Task DeleteAsync(GetPublicFileInput input) { await _service.DeleteAsync(input); } [HttpGet] [Route("share")] - public virtual async Task> GetShareListAsync() + public async virtual Task> GetShareListAsync() { return await _service.GetShareListAsync(); } [HttpPost] [Route("share")] - public virtual async Task ShareAsync(FileShareInput input) + public async virtual Task ShareAsync(FileShareInput input) { return await _service.ShareAsync(input); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs index 37cc58ec7..ab7b769e4 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs @@ -25,21 +25,21 @@ namespace LINGYUN.Abp.OssManagement [HttpPost] - public virtual async Task UploadAsync([FromForm] UploadFileInput input) + public async virtual Task UploadAsync([FromForm] UploadFileInput input) { return await _publicFileAppService.UploadAsync(input); } [HttpPost] [Route("upload")] - public virtual async Task UploadAsync([FromForm] UploadFileChunkInput input) + public async virtual Task UploadAsync([FromForm] UploadFileChunkInput input) { await _publicFileAppService.UploadAsync(input); } [HttpGet] [Route("search")] - public virtual async Task> GetListAsync(GetFilesInput input) + public async virtual Task> GetListAsync(GetFilesInput input) { return await _publicFileAppService.GetListAsync(input); } @@ -50,13 +50,13 @@ namespace LINGYUN.Abp.OssManagement [Route("{Name}/{Process}")] [Route("p/{Path}/{Name}")] [Route("p/{Path}/{Name}/{Process}")] - public virtual async Task GetAsync([FromRoute] GetPublicFileInput input) + public async virtual Task GetAsync([FromRoute] GetPublicFileInput input) { return await _publicFileAppService.GetAsync(input); } [HttpDelete] - public virtual async Task DeleteAsync(GetPublicFileInput input) + public async virtual Task DeleteAsync(GetPublicFileInput input) { await _publicFileAppService.DeleteAsync(input); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs index a69e8506a..281125523 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.OssManagement [HttpGet] [Route("{url}")] - public virtual async Task GetAsync(string url) + public async virtual Task GetAsync(string url) { var ossObject = await _service.GetAsync(url); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs index a5c736504..348cbc13f 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs @@ -29,7 +29,7 @@ namespace LINGYUN.Abp.OssManagement [HttpPost] [Authorize(AbpOssManagementPermissions.OssObject.Create)] - public virtual async Task UploadAsync([FromForm] CreateOssObjectInput input) + public async virtual Task UploadAsync([FromForm] CreateOssObjectInput input) { return await _ossObjectAppService.CreateAsync(input); } @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.OssManagement [Route("{Bucket}/{Name}/{Process}")] [Route("{Bucket}/p/{Path}/{Name}")] [Route("{Bucket}/p/{Path}/{Name}/{Process}")] - public virtual async Task GetAsync([FromRoute] GetStaticFileInput input) + public async virtual Task GetAsync([FromRoute] GetStaticFileInput input) { return await _staticFilesAppServic.GetAsync(input); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingAppService.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingAppService.cs index 53e2decb8..76a37c4b8 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingAppService.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingAppService.cs @@ -29,17 +29,17 @@ namespace LINGYUN.Abp.OssManagement.SettingManagement LocalizationResource = typeof(AbpOssManagementResource); } - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await GetAllForProviderAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString()); } - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await GetAllForProviderAsync(GlobalSettingValueProvider.ProviderName, null); } - protected virtual async Task GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task GetAllForProviderAsync(string providerName, string providerKey) { var settingGroups = new SettingGroupResult(); diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs index 93d151b9b..d17994308 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs @@ -21,14 +21,14 @@ namespace LINGYUN.Abp.OssManagement.SettingManagement [HttpGet] [Route("by-current-tenant")] - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await WeChatSettingAppService.GetAllForCurrentTenantAsync(); } [HttpGet] [Route("by-global")] - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await WeChatSettingAppService.GetAllForGlobalAsync(); } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainer.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainer.cs index aa1505ada..f471665e2 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainer.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainer.cs @@ -31,7 +31,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent CurrentTenant = currentTenant; CosClientFactory = cosClientFactory; } - public virtual async Task BulkDeleteObjectsAsync(BulkDeleteObjectRequest request) + public async virtual Task BulkDeleteObjectsAsync(BulkDeleteObjectRequest request) { var ossClient = await CreateClientAsync(); @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent ossClient.DeleteMultiObjects(deleteRequest); } - public virtual async Task CreateAsync(string name) + public async virtual Task CreateAsync(string name) { var ossClient = await CreateClientAsync(); @@ -66,7 +66,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent }); } - public virtual async Task CreateObjectAsync(CreateOssObjectRequest request) + public async virtual Task CreateObjectAsync(CreateOssObjectRequest request) { var ossClient = await CreateClientAsync(); @@ -146,7 +146,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent return ossObject; } - public virtual async Task DeleteAsync(string name) + public async virtual Task DeleteAsync(string name) { // 阿里云oss在控制台设置即可,无需改变 var ossClient = await CreateClientAsync(); @@ -158,7 +158,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent } } - public virtual async Task DeleteObjectAsync(GetOssObjectRequest request) + public async virtual Task DeleteObjectAsync(GetOssObjectRequest request) { var ossClient = await CreateClientAsync(); @@ -184,14 +184,14 @@ namespace LINGYUN.Abp.OssManagement.Tencent } } - public virtual async Task ExistsAsync(string name) + public async virtual Task ExistsAsync(string name) { var ossClient = await CreateClientAsync(); return BucketExists(ossClient, name); } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var ossClient = await CreateClientAsync(); if (!BucketExists(ossClient, name)) @@ -214,7 +214,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent }); } - public virtual async Task GetObjectAsync(GetOssObjectRequest request) + public async virtual Task GetObjectAsync(GetOssObjectRequest request) { var ossClient = await CreateClientAsync(); if (!BucketExists(ossClient, request.Bucket)) @@ -266,7 +266,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent return ossObject; } - public virtual async Task GetListAsync(GetOssContainersRequest request) + public async virtual Task GetListAsync(GetOssContainersRequest request) { var ossClient = await CreateClientAsync(); @@ -293,7 +293,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent .ToList()); } - public virtual async Task GetObjectsAsync(GetOssObjectsRequest request) + public async virtual Task GetObjectsAsync(GetOssObjectsRequest request) { var ossClient = await CreateClientAsync(); @@ -395,7 +395,7 @@ namespace LINGYUN.Abp.OssManagement.Tencent return cos.DoesObjectExist(request); } - protected virtual async Task CreateClientAsync() + protected async virtual Task CreateClientAsync() { return await CosClientFactory.CreateAsync(); } diff --git a/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain/LINGYUN/Abp/PermissionManagement/DefaultPermissionManager.cs b/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain/LINGYUN/Abp/PermissionManagement/DefaultPermissionManager.cs index 4bd1d979b..106a677b7 100644 --- a/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain/LINGYUN/Abp/PermissionManagement/DefaultPermissionManager.cs +++ b/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain/LINGYUN/Abp/PermissionManagement/DefaultPermissionManager.cs @@ -110,7 +110,7 @@ namespace LINGYUN.Abp.PermissionManagement return result; } - protected virtual async Task IsGrantedAsync(string permissionName, string providerName, string providerKey) + protected async virtual Task IsGrantedAsync(string permissionName, string providerName, string providerKey) { return await PermissionStore.IsGrantedAsync(permissionName, providerName, providerKey); } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/Dto/DataMoveDto.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/Dto/DataMoveDto.cs new file mode 100644 index 000000000..45801cf33 --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/Dto/DataMoveDto.cs @@ -0,0 +1,8 @@ +using System; + +namespace LINGYUN.Platform.Datas; + +public class DataMoveDto +{ + public Guid? ParentId { get; set; } +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs index c47f2e34d..fe223d185 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs @@ -17,6 +17,8 @@ namespace LINGYUN.Platform.Datas Task> GetAllAsync(); + Task MoveAsync(Guid id, DataMoveDto input); + Task CreateItemAsync(Guid id, DataItemCreateDto input); Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input); diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/en.json b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/en.json index f52f54364..8e03de109 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/en.json +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/en.json @@ -23,6 +23,7 @@ "Permission:Menu": "Menu", "Permission:Create": "Create", "Permission:Update": "Update", + "Permission:Move": "Move", "Permission:Delete": "Delete", "Permission:ManageItems": "Manage Items", "Permission:ManageRoleMenus": "Manage Role Menus", diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json index a7f03d54a..e2b685748 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json @@ -23,6 +23,7 @@ "Permission:Menu": "菜单管理", "Permission:Create": "新增", "Permission:Update": "编辑", + "Permission:Move": "移动", "Permission:Delete": "删除", "Permission:ManageItems": "管理项目", "Permission:ManageRoleMenus": "管理角色菜单", diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissionDefinitionProvider.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissionDefinitionProvider.cs index b7ffa6944..acb000fe9 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissionDefinitionProvider.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissionDefinitionProvider.cs @@ -22,6 +22,7 @@ namespace LINGYUN.Platform.Permissions var dataDictionary = platform.AddPermission(PlatformPermissions.DataDictionary.Default, L("Permission:DataDictionary")); dataDictionary.AddChild(PlatformPermissions.DataDictionary.Create, L("Permission:Create")); dataDictionary.AddChild(PlatformPermissions.DataDictionary.Update, L("Permission:Update")); + dataDictionary.AddChild(PlatformPermissions.DataDictionary.Move, L("Permission:Move")); dataDictionary.AddChild(PlatformPermissions.DataDictionary.Delete, L("Permission:Delete")); dataDictionary.AddChild(PlatformPermissions.DataDictionary.ManageItems, L("Permission:ManageItems")); diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissions.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissions.cs index 899a3301f..f978b1829 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissions.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissions.cs @@ -14,6 +14,8 @@ namespace LINGYUN.Platform.Permissions public const string Update = Default + ".Update"; + public const string Move = Default + ".Move"; + public const string Delete = Default + ".Delete"; public const string ManageItems = Default + ".ManageItems"; diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/DataAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/DataAppService.cs index e839bbb87..46dc23403 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/DataAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/DataAppService.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Platform.Datas } [Authorize(PlatformPermissions.DataDictionary.Create)] - public virtual async Task CreateAsync(DataCreateDto input) + public async virtual Task CreateAsync(DataCreateDto input) { var data = await DataRepository.FindByNameAsync(input.Name); if (data != null) @@ -63,7 +63,7 @@ namespace LINGYUN.Platform.Datas } [Authorize(PlatformPermissions.DataDictionary.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var data = await DataRepository.GetAsync(id); @@ -76,21 +76,21 @@ namespace LINGYUN.Platform.Datas await DataRepository.DeleteAsync(data); } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var data = await DataRepository.FindByNameAsync(name); return ObjectMapper.Map(data); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var data = await DataRepository.GetAsync(id); return ObjectMapper.Map(data); } - public virtual async Task> GetAllAsync() + public async virtual Task> GetAllAsync() { var datas = await DataRepository.GetListAsync(includeDetails: false); @@ -98,7 +98,7 @@ namespace LINGYUN.Platform.Datas ObjectMapper.Map, List>(datas)); } - public virtual async Task> GetListAsync(GetDataListInput input) + public async virtual Task> GetListAsync(GetDataListInput input) { var count = await DataRepository.GetCountAsync(input.Filter); @@ -110,8 +110,21 @@ namespace LINGYUN.Platform.Datas ObjectMapper.Map, List>(datas)); } + [Authorize(PlatformPermissions.DataDictionary.Move)] + public async virtual Task MoveAsync(Guid id, DataMoveDto input) + { + var data = await DataRepository.GetAsync(id); + + data.ParentId = input.ParentId; + + data = await DataRepository.UpdateAsync(data); + await CurrentUnitOfWork.SaveChangesAsync(); + + return ObjectMapper.Map(data); + } + [Authorize(PlatformPermissions.DataDictionary.Update)] - public virtual async Task UpdateAsync(Guid id, DataUpdateDto input) + public async virtual Task UpdateAsync(Guid id, DataUpdateDto input) { var data = await DataRepository.GetAsync(id); @@ -135,7 +148,7 @@ namespace LINGYUN.Platform.Datas } [Authorize(PlatformPermissions.DataDictionary.ManageItems)] - public virtual async Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input) + public async virtual Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input) { var data = await DataRepository.GetAsync(id); var dataItem = data.FindItem(name); @@ -163,7 +176,7 @@ namespace LINGYUN.Platform.Datas } [Authorize(PlatformPermissions.DataDictionary.ManageItems)] - public virtual async Task CreateItemAsync(Guid id, DataItemCreateDto input) + public async virtual Task CreateItemAsync(Guid id, DataItemCreateDto input) { var data = await DataRepository.GetAsync(id); var dataItem = data.FindItem(input.Name); @@ -186,7 +199,7 @@ namespace LINGYUN.Platform.Datas } [Authorize(PlatformPermissions.DataDictionary.ManageItems)] - public virtual async Task DeleteItemAsync(Guid id, string name) + public async virtual Task DeleteItemAsync(Guid id, string name) { var data = await DataRepository.GetAsync(id); data.RemoveItem(name); diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Layouts/LayoutAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Layouts/LayoutAppService.cs index cd60dd2c8..cd071e320 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Layouts/LayoutAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Layouts/LayoutAppService.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Platform.Layouts } [Authorize(PlatformPermissions.Layout.Create)] - public virtual async Task CreateAsync(LayoutCreateDto input) + public async virtual Task CreateAsync(LayoutCreateDto input) { var layout = await LayoutRepository.FindByNameAsync(input.Name); if (layout != null) @@ -46,7 +46,7 @@ namespace LINGYUN.Platform.Layouts } [Authorize(PlatformPermissions.Layout.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var layout = await LayoutRepository.GetAsync(id); @@ -59,14 +59,14 @@ namespace LINGYUN.Platform.Layouts await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var layout = await LayoutRepository.GetAsync(id); return ObjectMapper.Map(layout); } - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { var layouts = await LayoutRepository.GetListAsync(); @@ -74,7 +74,7 @@ namespace LINGYUN.Platform.Layouts ObjectMapper.Map, List>(layouts)); } - public virtual async Task> GetListAsync(GetLayoutListInput input) + public async virtual Task> GetListAsync(GetLayoutListInput input) { var count = await LayoutRepository.GetCountAsync(input.Framework, input.Filter); @@ -88,7 +88,7 @@ namespace LINGYUN.Platform.Layouts } [Authorize(PlatformPermissions.Layout.Update)] - public virtual async Task UpdateAsync(Guid id, LayoutUpdateDto input) + public async virtual Task UpdateAsync(Guid id, LayoutUpdateDto input) { var layout = await LayoutRepository.GetAsync(id); diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/MenuAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/MenuAppService.cs index 8b0b6c896..4db785ea5 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/MenuAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/MenuAppService.cs @@ -43,7 +43,7 @@ namespace LINGYUN.Platform.Menus DataItemMapping = options.Value; } - public virtual async Task> GetCurrentUserMenuListAsync(GetMenuInput input) + public async virtual Task> GetCurrentUserMenuListAsync(GetMenuInput input) { var myMenus = await MenuRepository.GetUserMenusAsync( CurrentUser.GetId(), @@ -75,7 +75,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.Default)] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var menu = await MenuRepository.GetAsync(id); @@ -83,7 +83,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.Default)] - public virtual async Task> GetAllAsync(MenuGetAllInput input) + public async virtual Task> GetAllAsync(MenuGetAllInput input) { var menus = await MenuRepository.GetAllAsync( input.Filter, input.Sorting, input.Reverse, @@ -94,7 +94,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.Default)] - public virtual async Task> GetListAsync(MenuGetListInput input) + public async virtual Task> GetListAsync(MenuGetListInput input) { var count = await MenuRepository.GetCountAsync(input.Filter, input.Framework, input.ParentId, input.LayoutId); @@ -108,7 +108,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.Create)] - public virtual async Task CreateAsync(MenuCreateDto input) + public async virtual Task CreateAsync(MenuCreateDto input) { var layout = await LayoutRepository.GetAsync(input.LayoutId); var data = await DataRepository.GetAsync(layout.DataId); @@ -153,7 +153,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.Update)] - public virtual async Task UpdateAsync(Guid id, MenuUpdateDto input) + public async virtual Task UpdateAsync(Guid id, MenuUpdateDto input) { var menu = await MenuRepository.GetAsync(id); @@ -221,7 +221,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var childrens = await MenuRepository.GetChildrenAsync(id); if (childrens.Any()) @@ -234,7 +234,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.ManageUsers)] - public virtual async Task> GetUserMenuListAsync(MenuGetByUserInput input) + public async virtual Task> GetUserMenuListAsync(MenuGetByUserInput input) { var menus = await MenuRepository.GetUserMenusAsync(input.UserId, input.Roles, input.Framework); @@ -261,7 +261,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.ManageUsers)] - public virtual async Task SetUserMenusAsync(UserMenuInput input) + public async virtual Task SetUserMenusAsync(UserMenuInput input) { await MenuManager.SetUserMenusAsync(input.UserId, input.MenuIds); } @@ -273,7 +273,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.ManageRoles)] - public virtual async Task SetRoleMenusAsync(RoleMenuInput input) + public async virtual Task SetRoleMenusAsync(RoleMenuInput input) { await MenuManager.SetRoleMenusAsync(input.RoleName, input.MenuIds); } @@ -285,7 +285,7 @@ namespace LINGYUN.Platform.Menus } [Authorize(PlatformPermissions.Menu.ManageRoles)] - public virtual async Task> GetRoleMenuListAsync(MenuGetByRoleInput input) + public async virtual Task> GetRoleMenuListAsync(MenuGetByRoleInput input) { var menus = await MenuRepository.GetRoleMenusAsync(new string[] { input.Role }, input.Framework); diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Versions/VersionAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Versions/VersionAppService.cs index 94736e324..46d77d447 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Versions/VersionAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Versions/VersionAppService.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Platform.Versions } [Authorize(PlatformPermissions.AppVersion.FileManager.Create)] - public virtual async Task AppendFileAsync(VersionFileCreateDto versionFileCreate) + public async virtual Task AppendFileAsync(VersionFileCreateDto versionFileCreate) { await _versionManager.AppendFileAsync(versionFileCreate.VersionId, versionFileCreate.SHA256, versionFileCreate.FileName, versionFileCreate.FileVersion, @@ -26,7 +26,7 @@ namespace LINGYUN.Platform.Versions } [Authorize(PlatformPermissions.AppVersion.Create)] - public virtual async Task CreateAsync(VersionCreateDto versionCreate) + public async virtual Task CreateAsync(VersionCreateDto versionCreate) { if (await _versionManager.ExistsAsync(versionCreate.PlatformType,versionCreate.Version)) { @@ -45,7 +45,7 @@ namespace LINGYUN.Platform.Versions } [Authorize(PlatformPermissions.AppVersion.Delete)] - public virtual async Task DeleteAsync(VersionDeleteDto versionDelete) + public async virtual Task DeleteAsync(VersionDeleteDto versionDelete) { var version = await _versionManager.GetByVersionAsync(versionDelete.PlatformType, versionDelete.Version); if (version != null) @@ -55,7 +55,7 @@ namespace LINGYUN.Platform.Versions } - public virtual async Task> GetAsync(VersionGetByPagedDto versionGetByPaged) + public async virtual Task> GetAsync(VersionGetByPagedDto versionGetByPaged) { var versionCount = await _versionManager.GetCountAsync(versionGetByPaged.PlatformType, versionGetByPaged.Filter); var versions = await _versionManager.GetPagedListAsync(versionGetByPaged.PlatformType, versionGetByPaged.Filter, @@ -67,14 +67,14 @@ namespace LINGYUN.Platform.Versions } - public virtual async Task GetAsync(VersionGetByIdDto versionGetById) + public async virtual Task GetAsync(VersionGetByIdDto versionGetById) { var version = await _versionManager.GetByIdAsync(versionGetById.Id); return ObjectMapper.Map(version); } - public virtual async Task GetLastestAsync(PlatformType platformType) + public async virtual Task GetLastestAsync(PlatformType platformType) { var version = await _versionManager.GetLatestAsync(platformType); @@ -82,13 +82,13 @@ namespace LINGYUN.Platform.Versions } [Authorize(PlatformPermissions.AppVersion.FileManager.Delete)] - public virtual async Task RemoveAllFileAsync(VersionGetByIdDto versionGetById) + public async virtual Task RemoveAllFileAsync(VersionGetByIdDto versionGetById) { await _versionManager.RemoveAllFileAsync(versionGetById.Id); } [Authorize(PlatformPermissions.AppVersion.FileManager.Delete)] - public virtual async Task RemoveFileAsync(VersionFileDeleteDto versionFileDelete) + public async virtual Task RemoveFileAsync(VersionFileDeleteDto versionFileDelete) { await _versionManager.RemoveFileAsync(versionFileDelete.VersionId, versionFileDelete.FileName); } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Datas/DataDictionaryDataSeeder.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Datas/DataDictionaryDataSeeder.cs index 3e7962bce..313370dd4 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Datas/DataDictionaryDataSeeder.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Datas/DataDictionaryDataSeeder.cs @@ -23,7 +23,7 @@ namespace LINGYUN.Platform.Datas DataRepository = dataRepository; } - public virtual async Task SeedAsync( + public async virtual Task SeedAsync( string name, string code, string displayName, diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Menus/MenuManager.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Menus/MenuManager.cs index ebe985c33..b9dd4be07 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Menus/MenuManager.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Menus/MenuManager.cs @@ -29,7 +29,7 @@ namespace LINGYUN.Platform.Menus } [UnitOfWork] - public virtual async Task CreateAsync( + public async virtual Task CreateAsync( Layout layout, Guid id, string path, @@ -71,14 +71,14 @@ namespace LINGYUN.Platform.Menus } [UnitOfWork] - public virtual async Task UpdateAsync(Menu menu) + public async virtual Task UpdateAsync(Menu menu) { await ValidateMenuAsync(menu); await MenuRepository.UpdateAsync(menu); } [UnitOfWork] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var children = await FindChildrenAsync(id, true); @@ -97,7 +97,7 @@ namespace LINGYUN.Platform.Menus } [UnitOfWork] - public virtual async Task MoveAsync(Guid id, Guid? parentId) + public async virtual Task MoveAsync(Guid id, Guid? parentId) { var menu = await MenuRepository.GetAsync(id); if (menu.ParentId == parentId) @@ -120,7 +120,7 @@ namespace LINGYUN.Platform.Menus } } - public virtual async Task UserHasInMenuAsync(Guid userId, string menuName) + public async virtual Task UserHasInMenuAsync(Guid userId, string menuName) { var menu = await MenuRepository.FindByNameAsync(menuName); return false; @@ -147,7 +147,7 @@ namespace LINGYUN.Platform.Menus } } - public virtual async Task SetUserMenusAsync(Guid userId, IEnumerable menuIds) + public async virtual Task SetUserMenusAsync(Guid userId, IEnumerable menuIds) { using (var unitOfWork = UnitOfWorkManager.Begin()) { @@ -194,7 +194,7 @@ namespace LINGYUN.Platform.Menus } } - public virtual async Task SetRoleMenusAsync(string roleName, IEnumerable menuIds) + public async virtual Task SetRoleMenusAsync(string roleName, IEnumerable menuIds) { using (var unitOfWork = UnitOfWorkManager.Begin()) { @@ -220,7 +220,7 @@ namespace LINGYUN.Platform.Menus } } - public virtual async Task GetNextChildCodeAsync(Guid? parentId) + public async virtual Task GetNextChildCodeAsync(Guid? parentId) { var lastChild = await GetLastChildOrNullAsync(parentId); if (lastChild != null) @@ -238,7 +238,7 @@ namespace LINGYUN.Platform.Menus ); } - public virtual async Task GetLastChildOrNullAsync(Guid? parentId) + public async virtual Task GetLastChildOrNullAsync(Guid? parentId) { var children = await MenuRepository.GetChildrenAsync(parentId); return children.OrderBy(c => c.Code).LastOrDefault(); @@ -261,13 +261,13 @@ namespace LINGYUN.Platform.Menus return await MenuRepository.GetAllChildrenWithParentCodeAsync(code, parentId); } - public virtual async Task GetCodeOrDefaultAsync(Guid id) + public async virtual Task GetCodeOrDefaultAsync(Guid id) { var menu = await MenuRepository.GetAsync(id); return menu?.Code; } - protected virtual async Task ValidateMenuAsync(Menu menu) + protected async virtual Task ValidateMenuAsync(Menu menu) { var siblings = (await FindChildrenAsync(menu.ParentId)) .Where(x => x.Id != menu.Id) diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Routes/RouteDataSeeder.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Routes/RouteDataSeeder.cs index 378349c9e..936b53bbe 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Routes/RouteDataSeeder.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Routes/RouteDataSeeder.cs @@ -31,7 +31,7 @@ namespace LINGYUN.Platform.Routes RoleMenuRepository = roleMenuRepository; } - public virtual async Task SeedLayoutAsync( + public async virtual Task SeedLayoutAsync( string name, string path, string displayName, @@ -60,7 +60,7 @@ namespace LINGYUN.Platform.Routes return layout; } - public virtual async Task SeedMenuAsync( + public async virtual Task SeedMenuAsync( Layout layout, string name, string path, @@ -109,7 +109,7 @@ namespace LINGYUN.Platform.Routes return menu; } - public virtual async Task SeedRoleMenuAsync( + public async virtual Task SeedRoleMenuAsync( string roleName, Menu menu, Guid? tenantId = null, @@ -128,7 +128,7 @@ namespace LINGYUN.Platform.Routes } } - public virtual async Task SeedUserMenuAsync( + public async virtual Task SeedUserMenuAsync( Guid userId, Menu menu, Guid? tenantId = null, diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Versions/VersionManager.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Versions/VersionManager.cs index f52f15fcc..104814e2a 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Versions/VersionManager.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Versions/VersionManager.cs @@ -26,57 +26,57 @@ namespace LINGYUN.Platform.Versions VersionRepository = versionRepository; } - public virtual async Task ExistsAsync(PlatformType platformType, string version) + public async virtual Task ExistsAsync(PlatformType platformType, string version) { return await VersionRepository.ExistsAsync(platformType, version); } - public virtual async Task GetByIdAsync(Guid id) + public async virtual Task GetByIdAsync(Guid id) { return await VersionRepository.GetAsync(id); } - public virtual async Task GetByVersionAsync(PlatformType platformType, string version) + public async virtual Task GetByVersionAsync(PlatformType platformType, string version) { return await VersionRepository.GetByVersionAsync(platformType, version); } - public virtual async Task GetCountAsync(PlatformType platformType, string filter) + public async virtual Task GetCountAsync(PlatformType platformType, string filter) { return await VersionRepository.GetCountAsync(platformType, filter); } - public virtual async Task> GetPagedListAsync(PlatformType platformType, string filter = "", string soring = nameof(AppVersion.CreationTime), bool includeDetails = true, int skipCount = 1, int maxResultCount = 10) + public async virtual Task> GetPagedListAsync(PlatformType platformType, string filter = "", string soring = nameof(AppVersion.CreationTime), bool includeDetails = true, int skipCount = 1, int maxResultCount = 10) { return await VersionRepository.GetPagedListAsync(platformType, filter, soring, includeDetails, skipCount, maxResultCount); } [UnitOfWork] - public virtual async Task CreateAsync(AppVersion version) + public async virtual Task CreateAsync(AppVersion version) { await VersionRepository.InsertAsync(version); } [UnitOfWork] - public virtual async Task UpdateAsync(AppVersion version) + public async virtual Task UpdateAsync(AppVersion version) { await VersionRepository.UpdateAsync(version); } [UnitOfWork] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await RemoveAllFileAsync(id); await VersionRepository.DeleteAsync(id); } - public virtual async Task GetLatestAsync(PlatformType platformType) + public async virtual Task GetLatestAsync(PlatformType platformType) { return await VersionRepository.GetLatestVersionAsync(platformType); } - public virtual async Task DownloadFileAsync(PlatformType platformType, string version, string filePath, string fileName, string fileVersion) + public async virtual Task DownloadFileAsync(PlatformType platformType, string version, string filePath, string fileName, string fileVersion) { var appVersion = await GetByVersionAsync(platformType, version); var versionFile = appVersion.FindFile(filePath, fileName, fileVersion); @@ -91,14 +91,14 @@ namespace LINGYUN.Platform.Versions VersionFile.NormalizeBlobName(version, versionFile.Name, versionFile.Version, versionFile.Path)); } - public virtual async Task GetFileAsync(VersionFile versionFile) + public async virtual Task GetFileAsync(VersionFile versionFile) { versionFile.Download(); return await VersionBlobContainer.GetAsync( VersionFile.NormalizeBlobName(versionFile.AppVersion.Version, versionFile.Name, versionFile.Version, versionFile.Path)); } - public virtual async Task SaveFileAsync(string version, string filePath, string fileName, string fileVersion, byte[] data) + public async virtual Task SaveFileAsync(string version, string filePath, string fileName, string fileVersion, byte[] data) { // 计算指纹 var sha256 = SHA256.Create(); @@ -112,7 +112,7 @@ namespace LINGYUN.Platform.Versions } [UnitOfWork] - public virtual async Task AppendFileAsync(Guid versionId, string fileSha256, + public async virtual Task AppendFileAsync(Guid versionId, string fileSha256, string fileName, string fileVersion, long fileSize, string filePath = "", FileType fileType = FileType.Stream) @@ -126,7 +126,7 @@ namespace LINGYUN.Platform.Versions } [UnitOfWork] - public virtual async Task RemoveFileAsync(Guid versionId, string fileName) + public async virtual Task RemoveFileAsync(Guid versionId, string fileName) { var appVersion = await VersionRepository.GetAsync(versionId); var versionFile = appVersion.FindFile(fileName); @@ -139,7 +139,7 @@ namespace LINGYUN.Platform.Versions } [UnitOfWork] - public virtual async Task RemoveAllFileAsync(Guid versionId) + public async virtual Task RemoveAllFileAsync(Guid versionId) { var appVersion = await VersionRepository.GetAsync(versionId); foreach (var versionFile in appVersion.Files) diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Datas/EfCoreDataRepository.cs b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Datas/EfCoreDataRepository.cs index b74bf6615..9ee61afac 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Datas/EfCoreDataRepository.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Datas/EfCoreDataRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Platform.Datas { } - public virtual async Task FindByNameAsync( + public async virtual Task FindByNameAsync( string name, bool includeDetails = true, CancellationToken cancellationToken = default) @@ -30,7 +30,7 @@ namespace LINGYUN.Platform.Datas .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetChildrenAsync( + public async virtual Task> GetChildrenAsync( Guid? parentId, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -42,7 +42,7 @@ namespace LINGYUN.Platform.Datas .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( string filter = "", CancellationToken cancellationToken = default) { @@ -54,7 +54,7 @@ namespace LINGYUN.Platform.Datas .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetPagedListAsync( + public async virtual Task> GetPagedListAsync( string filter = "", string sotring = "Code", bool includeDetails = false, diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Layouts/EfCoreLayoutRepository.cs b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Layouts/EfCoreLayoutRepository.cs index 7efb4d36c..916046e59 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Layouts/EfCoreLayoutRepository.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Layouts/EfCoreLayoutRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Platform.Layouts { } - public virtual async Task FindByNameAsync( + public async virtual Task FindByNameAsync( string name, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -29,7 +29,7 @@ namespace LINGYUN.Platform.Layouts .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( string framework = "", string filter = "", CancellationToken cancellationToken = default) @@ -42,7 +42,7 @@ namespace LINGYUN.Platform.Layouts .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetPagedListAsync( + public async virtual Task> GetPagedListAsync( string framework = "", string filter = "", string sorting = nameof(Layout.Name), diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreMenuRepository.cs b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreMenuRepository.cs index 039ec60a1..84315358f 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreMenuRepository.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreMenuRepository.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Platform.Menus { } - public virtual async Task GetLastMenuAsync( + public async virtual Task GetLastMenuAsync( Guid? parentId = null, CancellationToken cancellationToken = default) { @@ -29,7 +29,7 @@ namespace LINGYUN.Platform.Menus .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task UserHasInMenuAsync( + public async virtual Task UserHasInMenuAsync( Guid userId, string menuName, CancellationToken cancellationToken = default) @@ -43,7 +43,7 @@ namespace LINGYUN.Platform.Menus .AnyAsync(x => x.UserId == userId, GetCancellationToken(cancellationToken)); } - public virtual async Task RoleHasInMenuAsync( + public async virtual Task RoleHasInMenuAsync( string roleName, string menuName, CancellationToken cancellationToken = default) @@ -57,7 +57,7 @@ namespace LINGYUN.Platform.Menus .AnyAsync(x => x.RoleName == roleName, GetCancellationToken(cancellationToken)); } - public virtual async Task FindByNameAsync( + public async virtual Task FindByNameAsync( string menuName, CancellationToken cancellationToken = default) { @@ -66,7 +66,7 @@ namespace LINGYUN.Platform.Menus .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task FindMainAsync( + public async virtual Task FindMainAsync( string framework = "", CancellationToken cancellationToken = default) { @@ -75,7 +75,7 @@ namespace LINGYUN.Platform.Menus .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetRoleMenusAsync( + public async virtual Task> GetRoleMenusAsync( string[] roles, string framework = "", CancellationToken cancellationToken = default) @@ -95,7 +95,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetUserMenusAsync( + public async virtual Task> GetUserMenusAsync( Guid userId, string[] roles, string framework = "", @@ -132,7 +132,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetChildrenAsync( + public async virtual Task> GetChildrenAsync( Guid? parentId, CancellationToken cancellationToken = default ) @@ -142,7 +142,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetAllChildrenWithParentCodeAsync( + public async virtual Task> GetAllChildrenWithParentCodeAsync( string code, Guid? parentId, CancellationToken cancellationToken = default @@ -153,7 +153,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetAllAsync( + public async virtual Task> GetAllAsync( string filter = "", string sorting = nameof(Menu.Code), bool reverse = false, @@ -177,7 +177,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( string filter = "", string framework = "", Guid? parentId = null, @@ -195,7 +195,7 @@ namespace LINGYUN.Platform.Menus .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string filter = "", string sorting = nameof(Menu.Code), bool reverse = false, @@ -222,7 +222,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task RemoveAllRolesAsync( + public async virtual Task RemoveAllRolesAsync( Menu menu, CancellationToken cancellationToken = default ) @@ -235,7 +235,7 @@ namespace LINGYUN.Platform.Menus dbContext.Set().RemoveRange(rolesQuery); } - public virtual async Task RemoveAllMembersAsync( + public async virtual Task RemoveAllMembersAsync( Menu menu, CancellationToken cancellationToken = default ) diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreRoleMenuRepository.cs b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreRoleMenuRepository.cs index 0a8e6cf80..112a7cdf6 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreRoleMenuRepository.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreRoleMenuRepository.cs @@ -18,13 +18,13 @@ namespace LINGYUN.Platform.Menus { } - public virtual async Task> GetListByRoleNameAsync(string roleName, CancellationToken cancellationToken = default) + public async virtual Task> GetListByRoleNameAsync(string roleName, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()).Where(x => x.RoleName.Equals(roleName)) .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task RoleHasInMenuAsync( + public async virtual Task RoleHasInMenuAsync( string roleName, string menuName, CancellationToken cancellationToken = default) @@ -40,7 +40,7 @@ namespace LINGYUN.Platform.Menus GetCancellationToken(cancellationToken)); } - public virtual async Task GetStartupMenuAsync( + public async virtual Task GetStartupMenuAsync( IEnumerable roleNames, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreUserMenuRepository.cs b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreUserMenuRepository.cs index d5d7bed50..f22f74ab6 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreUserMenuRepository.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Menus/EfCoreUserMenuRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Platform.Menus { } - public virtual async Task UserHasInMenuAsync( + public async virtual Task UserHasInMenuAsync( Guid userId, string menuName, CancellationToken cancellationToken = default) @@ -35,7 +35,7 @@ namespace LINGYUN.Platform.Menus GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListByUserIdAsync( + public async virtual Task> GetListByUserIdAsync( Guid userId, CancellationToken cancellationToken = default) { @@ -44,7 +44,7 @@ namespace LINGYUN.Platform.Menus .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetStartupMenuAsync( + public async virtual Task GetStartupMenuAsync( Guid userId, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Versions/EfCoreVersionRepository.cs b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Versions/EfCoreVersionRepository.cs index 04c8d123d..29f0c52e6 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Versions/EfCoreVersionRepository.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Versions/EfCoreVersionRepository.cs @@ -20,7 +20,7 @@ namespace LINGYUN.Platform.Versions { } - public virtual async Task GetCountAsync(PlatformType platformType, string filter = "", CancellationToken cancellationToken = default) + public async virtual Task GetCountAsync(PlatformType platformType, string filter = "", CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Where(x => (platformType | x.PlatformType) == x.PlatformType) @@ -28,7 +28,7 @@ namespace LINGYUN.Platform.Versions .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetPagedListAsync(PlatformType platformType, string filter = "", string soring = nameof(AppVersion.CreationTime), bool includeDetails = true, int skipCount = 1, int maxResultCount = 10, CancellationToken cancellationToken = default) + public async virtual Task> GetPagedListAsync(PlatformType platformType, string filter = "", string soring = nameof(AppVersion.CreationTime), bool includeDetails = true, int skipCount = 1, int maxResultCount = 10, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .IncludeIf(includeDetails, x => x.Files) @@ -41,13 +41,13 @@ namespace LINGYUN.Platform.Versions } - public virtual async Task ExistsAsync(PlatformType platformType, string version, CancellationToken cancellationToken = default) + public async virtual Task ExistsAsync(PlatformType platformType, string version, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .AnyAsync(x => (platformType | x.PlatformType) == x.PlatformType && x.Version.Equals(version), GetCancellationToken(cancellationToken)); } - public virtual async Task GetByVersionAsync(PlatformType platformType, string version, CancellationToken cancellationToken = default) + public async virtual Task GetByVersionAsync(PlatformType platformType, string version, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Include(x => x.Files) @@ -55,7 +55,7 @@ namespace LINGYUN.Platform.Versions .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetLatestVersionAsync(PlatformType platformType, CancellationToken cancellationToken = default) + public async virtual Task GetLatestVersionAsync(PlatformType platformType, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Include(x => x.Files) diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs index 35c53d131..b6b506a3e 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs @@ -21,69 +21,76 @@ namespace LINGYUN.Platform.Datas } [HttpPost] - public virtual async Task CreateAsync(DataCreateDto input) + public async virtual Task CreateAsync(DataCreateDto input) { return await DataAppService.CreateAsync(input); } [HttpPost] [Route("{id}/items")] - public virtual async Task CreateItemAsync(Guid id, DataItemCreateDto input) + public async virtual Task CreateItemAsync(Guid id, DataItemCreateDto input) { await DataAppService.CreateItemAsync(id, input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await DataAppService.DeleteAsync(id); } [HttpDelete] [Route("{id}/items/{name}")] - public virtual async Task DeleteItemAsync(Guid id, string name) + public async virtual Task DeleteItemAsync(Guid id, string name) { await DataAppService.DeleteItemAsync(id, name); } [HttpGet] [Route("by-name/{name}")] - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { return await DataAppService.GetAsync(name); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await DataAppService.GetAsync(id); } [HttpGet] [Route("all")] - public virtual async Task> GetAllAsync() + public async virtual Task> GetAllAsync() { return await DataAppService.GetAllAsync(); } [HttpGet] - public virtual async Task> GetListAsync(GetDataListInput input) + public async virtual Task> GetListAsync(GetDataListInput input) { return await DataAppService.GetListAsync(input); } + [HttpPut] + [Route("{id}/move")] + public async virtual Task MoveAsync(Guid id, DataMoveDto input) + { + return await DataAppService.MoveAsync(id, input); + } + [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, DataUpdateDto input) + public async virtual Task UpdateAsync(Guid id, DataUpdateDto input) { return await DataAppService.UpdateAsync(id, input); } [HttpPut] [Route("{id}/items/{name}")] - public virtual async Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input) + public async virtual Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input) { await DataAppService.UpdateItemAsync(id, name, input); } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs index ac7e6bd33..94429c7fa 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs @@ -21,41 +21,41 @@ namespace LINGYUN.Platform.Layouts } [HttpPost] - public virtual async Task CreateAsync(LayoutCreateDto input) + public async virtual Task CreateAsync(LayoutCreateDto input) { return await LayoutAppService.CreateAsync(input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await LayoutAppService.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await LayoutAppService.GetAsync(id); } [HttpGet] [Route("all")] - public virtual async Task> GetAllListAsync() + public async virtual Task> GetAllListAsync() { return await LayoutAppService.GetAllListAsync(); } [HttpGet] - public virtual async Task> GetListAsync(GetLayoutListInput input) + public async virtual Task> GetListAsync(GetLayoutListInput input) { return await LayoutAppService.GetListAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, LayoutUpdateDto input) + public async virtual Task UpdateAsync(Guid id, LayoutUpdateDto input) { return await LayoutAppService.UpdateAsync(id, input); } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs index 989e0d254..ccceef28c 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs @@ -26,54 +26,54 @@ namespace LINGYUN.Platform.Menus [HttpGet] [Route("by-current-user")] - public virtual async Task> GetCurrentUserMenuListAsync(GetMenuInput input) + public async virtual Task> GetCurrentUserMenuListAsync(GetMenuInput input) { return await MenuAppService.GetCurrentUserMenuListAsync(input); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await MenuAppService.GetAsync(id); } [HttpGet] [Route("all")] - public virtual async Task> GetAllAsync(MenuGetAllInput input) + public async virtual Task> GetAllAsync(MenuGetAllInput input) { return await MenuAppService.GetAllAsync(input); } [HttpGet] - public virtual async Task> GetListAsync(MenuGetListInput input) + public async virtual Task> GetListAsync(MenuGetListInput input) { return await MenuAppService.GetListAsync(input); } [HttpPost] - public virtual async Task CreateAsync(MenuCreateDto input) + public async virtual Task CreateAsync(MenuCreateDto input) { return await MenuAppService.CreateAsync(input); } [HttpPut] [Route("{id}")] - public virtual async Task UpdateAsync(Guid id, MenuUpdateDto input) + public async virtual Task UpdateAsync(Guid id, MenuUpdateDto input) { return await MenuAppService.UpdateAsync(id, input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await MenuAppService.DeleteAsync(id); } [HttpPut] [Route("by-user")] - public virtual async Task SetUserMenusAsync(UserMenuInput input) + public async virtual Task SetUserMenusAsync(UserMenuInput input) { await MenuAppService.SetUserMenusAsync(input); } @@ -87,14 +87,14 @@ namespace LINGYUN.Platform.Menus [HttpGet] [Route("by-user")] - public virtual async Task> GetUserMenuListAsync(MenuGetByUserInput input) + public async virtual Task> GetUserMenuListAsync(MenuGetByUserInput input) { return await MenuAppService.GetUserMenuListAsync(input); } [HttpGet] [Route("by-user/{userId}/{framework}")] - public virtual async Task> GetUserMenuListAsync(Guid userId, string framework) + public async virtual Task> GetUserMenuListAsync(Guid userId, string framework) { var userRoles = await UserRoleFinder.GetRolesAsync(userId); @@ -109,7 +109,7 @@ namespace LINGYUN.Platform.Menus [HttpPut] [Route("by-role")] - public virtual async Task SetRoleMenusAsync(RoleMenuInput input) + public async virtual Task SetRoleMenusAsync(RoleMenuInput input) { await MenuAppService.SetRoleMenusAsync(input); } @@ -123,14 +123,14 @@ namespace LINGYUN.Platform.Menus [HttpGet] [Route("by-role")] - public virtual async Task> GetRoleMenuListAsync(MenuGetByRoleInput input) + public async virtual Task> GetRoleMenuListAsync(MenuGetByRoleInput input) { return await MenuAppService.GetRoleMenuListAsync(input); } [HttpGet] [Route("by-role/{role}/{framework}")] - public virtual async Task> GetRoleMenuListAsync(string role, string framework) + public async virtual Task> GetRoleMenuListAsync(string role, string framework) { return await MenuAppService.GetRoleMenuListAsync(new MenuGetByRoleInput { diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Versions/VersionController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Versions/VersionController.cs index 36c163456..cea6bcc5f 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Versions/VersionController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Versions/VersionController.cs @@ -35,7 +35,7 @@ namespace LINGYUN.Platform.Versions [HttpPost] [Route("file/append")] [RequestSizeLimit(200_000_000)] - public virtual async Task AppendFileAsync([FromQuery] VersionFileCreateDto versionFileCreate) + public async virtual Task AppendFileAsync([FromQuery] VersionFileCreateDto versionFileCreate) { // 检查文件大小 var fileSizeLimited = await SettingProvider @@ -125,47 +125,47 @@ namespace LINGYUN.Platform.Versions } [HttpPost] - public virtual async Task CreateAsync(VersionCreateDto versionCreate) + public async virtual Task CreateAsync(VersionCreateDto versionCreate) { return await _versionAppService.CreateAsync(versionCreate); } [HttpDelete] - public virtual async Task DeleteAsync(VersionDeleteDto versionDelete) + public async virtual Task DeleteAsync(VersionDeleteDto versionDelete) { await _versionAppService.DeleteAsync(versionDelete); } [HttpGet] - public virtual async Task> GetAsync(VersionGetByPagedDto versionGetByPaged) + public async virtual Task> GetAsync(VersionGetByPagedDto versionGetByPaged) { return await _versionAppService.GetAsync(versionGetByPaged); } [HttpGet] [Route("{Id}")] - public virtual async Task GetAsync(VersionGetByIdDto versionGetById) + public async virtual Task GetAsync(VersionGetByIdDto versionGetById) { return await _versionAppService.GetAsync(versionGetById); } [HttpGet] [Route("lastest")] - public virtual async Task GetLastestAsync([Required] PlatformType platformType) + public async virtual Task GetLastestAsync([Required] PlatformType platformType) { return await _versionAppService.GetLastestAsync(platformType); } [HttpDelete] [Route("file/clean")] - public virtual async Task RemoveAllFileAsync(VersionGetByIdDto versionGetById) + public async virtual Task RemoveAllFileAsync(VersionGetByIdDto versionGetById) { await _versionAppService.RemoveAllFileAsync(versionGetById); } [HttpDelete] [Route("file/remove")] - public virtual async Task RemoveFileAsync(VersionFileDeleteDto versionFileDelete) + public async virtual Task RemoveFileAsync(VersionFileDeleteDto versionFileDelete) { await _versionAppService.RemoveFileAsync(versionFileDelete); } @@ -173,7 +173,7 @@ namespace LINGYUN.Platform.Versions [HttpGet] [Route("file/download")] [Authorize(PlatformPermissions.AppVersion.FileManager.Download)] - public virtual async Task DownloadFileAsync(VersionFileGetDto versionFileGet) + public async virtual Task DownloadFileAsync(VersionFileGetDto versionFileGet) { // 分块模式下载文件 diff --git a/aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.Domain/LINGYUN/Abp/ProjectManagement/Projects/ProjectManager.cs b/aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.Domain/LINGYUN/Abp/ProjectManagement/Projects/ProjectManager.cs index 7dd0c5a24..dbb96ada1 100644 --- a/aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.Domain/LINGYUN/Abp/ProjectManagement/Projects/ProjectManager.cs +++ b/aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.Domain/LINGYUN/Abp/ProjectManagement/Projects/ProjectManager.cs @@ -29,7 +29,7 @@ namespace LINGYUN.Abp.ProjectManagement.Projects TemplateRepository = templateRepository; } - public virtual async Task CreateAsync(Project project) + public async virtual Task CreateAsync(Project project) { if (await ProjectRepository.CheckNameAsync(project.Name)) { @@ -40,19 +40,19 @@ namespace LINGYUN.Abp.ProjectManagement.Projects return project; } - public virtual async Task UpdateAsync(Project project) + public async virtual Task UpdateAsync(Project project) { project = await ProjectRepository.UpdateAsync(project); return project; } - public virtual async Task DeleteAsync(Project project) + public async virtual Task DeleteAsync(Project project) { await ProjectRepository.DeleteAsync(project); } - public virtual async Task BuildAsync(Project project) + public async virtual Task BuildAsync(Project project) { using var unitOfWork = UnitOfWorkManager.Begin(); try @@ -128,12 +128,12 @@ namespace LINGYUN.Abp.ProjectManagement.Projects return project.Status == BuildStatus.Successed; } - public virtual async Task AddPackagesAsync() + public async virtual Task AddPackagesAsync() { } - public virtual async Task DownloadAsync(Project project) + public async virtual Task DownloadAsync(Project project) { var projectDir = Path.Combine( Directory.GetCurrentDirectory(), diff --git a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleDataSeeder.cs b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleDataSeeder.cs index 99dbee17e..98548d60d 100644 --- a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleDataSeeder.cs +++ b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleDataSeeder.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.RulesManagement Repository = repository; } - public virtual async Task SeedAsync(EntityRuleInGroup group) + public async virtual Task SeedAsync(EntityRuleInGroup group) { var findGroup = await Repository.GetByNameAsync(group.Name); if (findGroup != null) diff --git a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleFinder.cs b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleFinder.cs index fc7364688..f69e7535a 100644 --- a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleFinder.cs +++ b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.Domain/LINGYUN/Abp/RulesManagement/EntityRuleFinder.cs @@ -23,7 +23,7 @@ namespace LINGYUN.Abp.RulesManagement private IEntityRuleRepository _rruleRepository; protected IEntityRuleRepository RuleRepository => LazyGetRequiredService(ref _rruleRepository); - public virtual async Task> GetRuleGroupsAsync(Type entityType) + public async virtual Task> GetRuleGroupsAsync(Type entityType) { var entityFullTypeName = entityType.FullName; if (entityType.IsGenericType) @@ -58,7 +58,7 @@ namespace LINGYUN.Abp.RulesManagement return ruleGroups; } - protected virtual async Task AddRuleAsync(RuleGroup ruleGroup, Guid ruleId) + protected async virtual Task AddRuleAsync(RuleGroup ruleGroup, Guid ruleId) { var entityRule = await RuleRepository.FindAsync(ruleId); if (entityRule == null) @@ -83,7 +83,7 @@ namespace LINGYUN.Abp.RulesManagement } } - protected virtual async Task AddSubRuleAsync(Rule rule, Guid subRuleId) + protected async virtual Task AddSubRuleAsync(Rule rule, Guid subRuleId) { var entityRule = await RuleRepository.FindAsync(subRuleId); if (entityRule == null) @@ -98,7 +98,7 @@ namespace LINGYUN.Abp.RulesManagement } } - protected virtual async Task AddToInjectRuleAsync(RuleGroup group, Guid ruleId) + protected async virtual Task AddToInjectRuleAsync(RuleGroup group, Guid ruleId) { var entityRule = await RuleRepository.FindAsync(ruleId); if (entityRule == null) @@ -112,7 +112,7 @@ namespace LINGYUN.Abp.RulesManagement } } - protected virtual async Task AddToInjectRuleAsync(Rule rule, Guid ruleId) + protected async virtual Task AddToInjectRuleAsync(Rule rule, Guid ruleId) { var entityRule = await RuleRepository.FindAsync(ruleId); if (entityRule == null) diff --git a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleGroupRepository.cs b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleGroupRepository.cs index bf3ea09a1..b9c640187 100644 --- a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleGroupRepository.cs +++ b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleGroupRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore { } - public virtual async Task GetByNameAsync( + public async virtual Task GetByNameAsync( string name, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetRulesAsync( + public async virtual Task> GetRulesAsync( Guid groupId, bool includeDetails = false, CancellationToken cancellationToken = default) @@ -41,7 +41,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore return await query.ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default) { @@ -55,7 +55,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListByTypeAsync( + public async virtual Task> GetListByTypeAsync( string entityFullTypeName, string sorting = null, bool includeDetails = false, @@ -68,7 +68,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string filter = null, string sorting = null, int skipCount = 1, diff --git a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleRepository.cs b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleRepository.cs index e06fb3352..131e19cd2 100644 --- a/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleRepository.cs +++ b/aspnet-core/modules/rules-management/LINGYUN.Abp.RulesManagement.EntityFrameworkCore/LINGYUN/Abp/RulesManagement/EntityFrameworkCore/EfCoreEntityRuleRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore { } - public virtual async Task> GetInjectRulesAsync( + public async virtual Task> GetInjectRulesAsync( Guid ruleId, bool includeDetails = false, CancellationToken cancellationToken = default @@ -32,7 +32,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore return await query.ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default) { @@ -47,7 +47,7 @@ namespace LINGYUN.Abp.RulesManagement.EntityFrameworkCore .LongCountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string filter = null, string sorting = null, int skipCount = 1, diff --git a/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/FileProviders/FileProviderWorkflowRulesResolveContributor.cs b/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/FileProviders/FileProviderWorkflowRulesResolveContributor.cs index 1702a0425..2145e93ef 100644 --- a/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/FileProviders/FileProviderWorkflowRulesResolveContributor.cs +++ b/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/FileProviders/FileProviderWorkflowRulesResolveContributor.cs @@ -72,7 +72,7 @@ namespace LINGYUN.Abp.Rules.RulesEngine.FileProviders protected abstract string GetRuleName(Type type); - protected virtual async Task GetFileSystemRulesAsync(Type type, CancellationToken cancellationToken = default) + protected async virtual Task GetFileSystemRulesAsync(Type type, CancellationToken cancellationToken = default) { var ruleId = GetRuleId(type); var ruleFile = GetRuleName(type); diff --git a/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/RulesEngineContributor.cs b/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/RulesEngineContributor.cs index f975e5794..75a99619e 100644 --- a/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/RulesEngineContributor.cs +++ b/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/RulesEngineContributor.cs @@ -53,7 +53,7 @@ namespace LINGYUN.Abp.Rules.RulesEngine return new Engine(Logger, _options.Settings); } - protected virtual async Task ExecuteRulesAsync(T input, WorkflowRules[] workflowRules, object[] @params = null) + protected async virtual Task ExecuteRulesAsync(T input, WorkflowRules[] workflowRules, object[] @params = null) { // TODO: 性能缺陷 规则文件每一次调用都会重复编译 _ruleEngine.AddOrUpdateWorkflow(workflowRules); diff --git a/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/WorkflowRulesResolver.cs b/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/WorkflowRulesResolver.cs index cb3a5add8..f092aab5f 100644 --- a/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/WorkflowRulesResolver.cs +++ b/aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN/Abp/Rules/RulesEngine/WorkflowRulesResolver.cs @@ -27,7 +27,7 @@ namespace LINGYUN.Abp.Rules.RulesEngine } } - public virtual async Task ResolveWorkflowRulesAsync(Type type) + public async virtual Task ResolveWorkflowRulesAsync(Type type) { var result = new WorkflowRulesResolveResult(); diff --git a/aspnet-core/modules/rules/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleProvider.cs b/aspnet-core/modules/rules/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleProvider.cs index d9d1afec6..f5f40da27 100644 --- a/aspnet-core/modules/rules/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleProvider.cs +++ b/aspnet-core/modules/rules/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleProvider.cs @@ -32,7 +32,7 @@ namespace LINGYUN.Abp.Rules _serviceProvider = serviceProvider; } - public virtual async Task ExecuteAsync(T input, object[] @params = null, CancellationToken cancellationToken = default) + public async virtual Task ExecuteAsync(T input, object[] @params = null, CancellationToken cancellationToken = default) { _logger.LogDebug("Starting all typed rules engine."); diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs index a6c91e59b..c96efc8e8 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs @@ -30,7 +30,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService TenantManager = tenantManager; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var tenant = await TenantRepository.FindAsync(id); if (tenant == null) @@ -41,7 +41,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService return ObjectMapper.Map(tenant); } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var tenant = await TenantRepository.FindByNameAsync(name); if (tenant == null) @@ -51,7 +51,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService return ObjectMapper.Map(tenant); } - public virtual async Task> GetListAsync(TenantGetListInput input) + public async virtual Task> GetListAsync(TenantGetListInput input) { var count = await TenantRepository.GetCountAsync(input.Filter); var list = await TenantRepository.GetListAsync( @@ -68,7 +68,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.Create)] - public virtual async Task CreateAsync(TenantCreateDto input) + public async virtual Task CreateAsync(TenantCreateDto input) { var tenant = await TenantManager.CreateAsync(input.Name); tenant.IsActive = input.IsActive; @@ -105,7 +105,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.Update)] - public virtual async Task UpdateAsync(Guid id, TenantUpdateDto input) + public async virtual Task UpdateAsync(Guid id, TenantUpdateDto input) { var tenant = await TenantRepository.GetAsync(id); @@ -128,7 +128,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var tenant = await TenantRepository.FindAsync(id); if (tenant == null) @@ -141,7 +141,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task GetConnectionStringAsync(Guid id, string name) + public async virtual Task GetConnectionStringAsync(Guid id, string name) { var tenant = await TenantRepository.GetAsync(id); @@ -155,7 +155,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task> GetConnectionStringAsync(Guid id) + public async virtual Task> GetConnectionStringAsync(Guid id) { var tenant = await TenantRepository.GetAsync(id); @@ -164,7 +164,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdate input) + public async virtual Task SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdate input) { var tenant = await TenantRepository.GetAsync(id); if (tenant.FindConnectionString(input.Name) == null) @@ -195,7 +195,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } [Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task DeleteConnectionStringAsync(Guid id, string name) + public async virtual Task DeleteConnectionStringAsync(Guid id, string name) { var tenant = await TenantRepository.GetAsync(id); diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Editions/EditionManager.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Editions/EditionManager.cs index afb853111..f771a63de 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Editions/EditionManager.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Editions/EditionManager.cs @@ -32,7 +32,7 @@ public class EditionManager : DomainService return new Edition(GuidGenerator.Create(), displayName); } - public virtual async Task ChangeDisplayNameAsync(Edition edition, string displayName) + public async virtual Task ChangeDisplayNameAsync(Edition edition, string displayName) { Check.NotNull(edition, nameof(edition)); Check.NotNull(displayName, nameof(displayName)); @@ -42,7 +42,7 @@ public class EditionManager : DomainService edition.SetDisplayName(displayName); } - protected virtual async Task ValidateDisplayNameAsync(string displayName, Guid? expectedId = null) + protected async virtual Task ValidateDisplayNameAsync(string displayName, Guid? expectedId = null) { var edition = await EditionRepository.FindByDisplayNameAsync(displayName); if (edition != null && edition.Id != expectedId) diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/ConnectionStringInvalidator.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/ConnectionStringInvalidator.cs index abee02f79..84ce9f988 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/ConnectionStringInvalidator.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/ConnectionStringInvalidator.cs @@ -20,7 +20,7 @@ public class ConnectionStringInvalidator : Cache = cache; } - public virtual async Task HandleEventAsync(ConnectionStringCreatedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringCreatedEventData eventData) { await Cache.RemoveAsync( TenantCacheItem.CalculateCacheKey( @@ -29,7 +29,7 @@ public class ConnectionStringInvalidator : considerUow: true); } - public virtual async Task HandleEventAsync(ConnectionStringDeletedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringDeletedEventData eventData) { await Cache.RemoveAsync( TenantCacheItem.CalculateCacheKey( diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantCacheItemInvalidator.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantCacheItemInvalidator.cs index c0630ddbf..617abb778 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantCacheItemInvalidator.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantCacheItemInvalidator.cs @@ -16,7 +16,7 @@ public class TenantCacheItemInvalidator : ILocalEventHandler eventData) + public async virtual Task HandleEventAsync(EntityChangedEventData eventData) { await Cache.RemoveAsync(TenantCacheItem.CalculateCacheKey(eventData.Entity.Id, eventData.Entity.Name), considerUow: true); // 同时移除租户版本缓存 diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs index 194a599d4..bfce496dd 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.Domain.Services; namespace LINGYUN.Abp.Saas.Tenants; @@ -15,7 +15,7 @@ public class TenantManager : DomainService, ITenantManager } - public virtual async Task CreateAsync(string name) + public async virtual Task CreateAsync(string name) { Check.NotNull(name, nameof(name)); @@ -23,7 +23,7 @@ public class TenantManager : DomainService, ITenantManager return new Tenant(GuidGenerator.Create(), name); } - public virtual async Task ChangeNameAsync(Tenant tenant, string name) + public async virtual Task ChangeNameAsync(Tenant tenant, string name) { Check.NotNull(tenant, nameof(tenant)); Check.NotNull(name, nameof(name)); @@ -32,7 +32,7 @@ public class TenantManager : DomainService, ITenantManager tenant.SetName(name); } - protected virtual async Task ValidateNameAsync(string name, Guid? expectedId = null) + protected async virtual Task ValidateNameAsync(string name, Guid? expectedId = null) { var tenant = await TenantRepository.FindByNameAsync(name); if (tenant != null && tenant.Id != expectedId) diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs index 51250befa..cbeedbc60 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; using JetBrains.Annotations; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; @@ -28,12 +28,12 @@ public class TenantStore : ITenantStore, ITransientDependency Cache = cache; } - public virtual async Task FindAsync(string name) + public async virtual Task FindAsync(string name) { return (await GetCacheItemAsync(null, name)).Value; } - public virtual async Task FindAsync(Guid id) + public async virtual Task FindAsync(Guid id) { return (await GetCacheItemAsync(id, null)).Value; } @@ -50,7 +50,7 @@ public class TenantStore : ITenantStore, ITransientDependency return (GetCacheItem(id, null)).Value; } - protected virtual async Task GetCacheItemAsync(Guid? id, string name) + protected async virtual Task GetCacheItemAsync(Guid? id, string name) { var cacheKey = CalculateCacheKey(id, name); @@ -81,7 +81,7 @@ public class TenantStore : ITenantStore, ITransientDependency throw new AbpException("Both id and name can't be invalid."); } - protected virtual async Task SetCacheAsync(string cacheKey, [CanBeNull] Tenant tenant) + protected async virtual Task SetCacheAsync(string cacheKey, [CanBeNull] Tenant tenant) { var tenantConfiguration = tenant != null ? ObjectMapper.Map(tenant) : null; var cacheItem = new TenantCacheItem(tenantConfiguration); diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/EfCoreTenantRepository.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/EfCoreTenantRepository.cs index 5313eecac..db423ab7d 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/EfCoreTenantRepository.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/EfCoreTenantRepository.cs @@ -55,7 +55,7 @@ public class EfCoreTenantRepository : EfCoreRepository t.Id == id, GetCancellationToken(cancellationToken)); } - public virtual async Task FindByNameAsync( + public async virtual Task FindByNameAsync( string name, bool includeDetails = true, CancellationToken cancellationToken = default) @@ -160,7 +160,7 @@ public class EfCoreTenantRepository : EfCoreRepository t.Id == id); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, @@ -203,7 +203,7 @@ public class EfCoreTenantRepository : EfCoreRepository GetCountAsync(string filter = null, CancellationToken cancellationToken = default) + public async virtual Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) { return await (await GetQueryableAsync()) .WhereIf( diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs index 3a31a9b0d..b28af61bf 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs @@ -47,7 +47,7 @@ namespace LINGYUN.Abp.SettingManagement } [Authorize(AbpSettingManagementPermissions.Settings.Manager)] - public virtual async Task SetGlobalAsync(UpdateSettingsDto input) + public async virtual Task SetGlobalAsync(UpdateSettingsDto input) { if (CurrentTenant.IsAvailable) { @@ -72,7 +72,7 @@ namespace LINGYUN.Abp.SettingManagement } [Authorize(AbpSettingManagementPermissions.Settings.Manager)] - public virtual async Task SetCurrentTenantAsync(UpdateSettingsDto input) + public async virtual Task SetCurrentTenantAsync(UpdateSettingsDto input) { // 增加特性检查 await CheckFeatureAsync(); @@ -96,18 +96,18 @@ namespace LINGYUN.Abp.SettingManagement //[Authorize] [AllowAnonymous] - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await GetAllForProviderAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString()); } [AllowAnonymous] - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await GetAllForProviderAsync(GlobalSettingValueProvider.ProviderName, null); } - protected virtual async Task GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task GetAllForProviderAsync(string providerName, string providerKey) { /* * 2020-11-19 @@ -425,7 +425,7 @@ namespace LINGYUN.Abp.SettingManagement return settingGroups; } - protected virtual async Task CheckFeatureAsync() + protected async virtual Task CheckFeatureAsync() { await FeatureChecker.CheckEnabledAsync(SettingManagementFeatures.Enable); } diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/UserSettingAppService.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/UserSettingAppService.cs index d4abafbc6..fa1bfd69c 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/UserSettingAppService.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/UserSettingAppService.cs @@ -43,7 +43,7 @@ namespace LINGYUN.Abp.SettingManagement LocalizationResource = typeof(AbpSettingManagementResource); } - public virtual async Task SetCurrentUserAsync(UpdateSettingsDto input) + public async virtual Task SetCurrentUserAsync(UpdateSettingsDto input) { // 增加特性检查 await CheckFeatureAsync(); @@ -62,12 +62,12 @@ namespace LINGYUN.Abp.SettingManagement await CurrentUnitOfWork.SaveChangesAsync(); } - public virtual async Task GetAllForCurrentUserAsync() + public async virtual Task GetAllForCurrentUserAsync() { return await GetAllForProviderAsync(UserSettingValueProvider.ProviderName, CurrentUser.GetId().ToString()); } - protected virtual async Task GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task GetAllForProviderAsync(string providerName, string providerKey) { var settingGroups = new SettingGroupResult(); @@ -241,7 +241,7 @@ namespace LINGYUN.Abp.SettingManagement return settingGroups; } - protected virtual async Task CheckFeatureAsync() + protected async virtual Task CheckFeatureAsync() { await FeatureChecker.CheckEnabledAsync(SettingManagementFeatures.Enable); } diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs index c720a8854..a87645141 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs @@ -18,28 +18,28 @@ namespace LINGYUN.Abp.SettingManagement [HttpPut] [Route("change-current-tenant")] - public virtual async Task SetCurrentTenantAsync(UpdateSettingsDto input) + public async virtual Task SetCurrentTenantAsync(UpdateSettingsDto input) { await _settingAppService.SetCurrentTenantAsync(input); } [HttpPut] [Route("change-global")] - public virtual async Task SetGlobalAsync(UpdateSettingsDto input) + public async virtual Task SetGlobalAsync(UpdateSettingsDto input) { await _settingAppService.SetGlobalAsync(input); } [HttpGet] [Route("by-global")] - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await _settingAppService.GetAllForGlobalAsync(); } [HttpGet] [Route("by-current-tenant")] - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await _settingAppService.GetAllForCurrentTenantAsync(); } diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs index 4db5e24fd..a02c185c4 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs @@ -20,14 +20,14 @@ namespace LINGYUN.Abp.SettingManagement [HttpGet] [Route("by-current-user")] - public virtual async Task GetAllForCurrentUserAsync() + public async virtual Task GetAllForCurrentUserAsync() { return await _service.GetAllForCurrentUserAsync(); } [HttpPut] [Route("change-current-user")] - public virtual async Task SetCurrentUserAsync(UpdateSettingsDto input) + public async virtual Task SetCurrentUserAsync(UpdateSettingsDto input) { await _service.SetCurrentUserAsync(input); } diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.DistributedLocking/LINGYUN/Abp/BackgroundTasks/DistributedLocking/JobDistributedLockingProvider.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.DistributedLocking/LINGYUN/Abp/BackgroundTasks/DistributedLocking/JobDistributedLockingProvider.cs index 05e27bcea..d531afd43 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.DistributedLocking/LINGYUN/Abp/BackgroundTasks/DistributedLocking/JobDistributedLockingProvider.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.DistributedLocking/LINGYUN/Abp/BackgroundTasks/DistributedLocking/JobDistributedLockingProvider.cs @@ -20,7 +20,7 @@ public class JobDistributedLockingProvider : IJobLockProvider, ISingletonDepende DistributedLock = distributedLock; } - public virtual async Task TryLockAsync(string jobKey, int lockSeconds) + public async virtual Task TryLockAsync(string jobKey, int lockSeconds) { var handle = await DistributedLock.TryAcquireAsync(jobKey); if (handle != null) @@ -45,7 +45,7 @@ public class JobDistributedLockingProvider : IJobLockProvider, ISingletonDepende return false; } - public virtual async Task TryReleaseAsync(string jobKey) + public async virtual Task TryReleaseAsync(string jobKey) { if (LockCache.TryGetValue(jobKey, out var handle)) { diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJob.cs index ca3a5509d..d850800e8 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJob.cs @@ -37,7 +37,7 @@ public class HttpRequestJob : HttpRequestJobBase, IJobRunnable public const string PropertyContentType = "contentType"; public const string PropertyHeaders = "headers"; - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { InitJob(context); diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJobBase.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJobBase.cs index 4896e7242..57c8eb01d 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJobBase.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/HttpRequestJobBase.cs @@ -27,7 +27,7 @@ public abstract class HttpRequestJobBase CurrentTenant = context.GetRequiredService(); } - protected virtual async Task RequestAsync( + protected async virtual Task RequestAsync( JobRunnableContext context, HttpMethod httpMethod, string requestUrl, @@ -72,7 +72,7 @@ public abstract class HttpRequestJobBase return Deserialize(stringContent); } - protected virtual async Task RequestAsync( + protected async virtual Task RequestAsync( JobRunnableContext context, HttpMethod httpMethod, string requestUrl, @@ -147,7 +147,7 @@ public abstract class HttpRequestJobBase requestMessage.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(CultureInfo.CurrentCulture.Name)); } - protected virtual async Task ThrowExceptionForResponseAsync(HttpResponseMessage response) + protected async virtual Task ThrowExceptionForResponseAsync(HttpResponseMessage response) { if (response.Headers.Contains(AbpHttpConsts.AbpErrorFormat)) { diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendEmailJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendEmailJob.cs index f0c44eb2c..20016c134 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendEmailJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendEmailJob.cs @@ -59,7 +59,7 @@ public class SendEmailJob : IJobRunnable /// public const string PropertyCulture = "culture"; - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { context.TryGetString(PropertyFrom, out var from); var to = context.GetString(PropertyTo); diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendSmsJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendSmsJob.cs index 4f7123569..c3ba1a943 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendSmsJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendSmsJob.cs @@ -24,7 +24,7 @@ public class SendSmsJob : IJobRunnable public const string PropertyMessage = "message"; public const string PropertyProperties = "properties"; - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { var phoneNumber = context.GetString(PropertyPhoneNumber); var message = context.GetString(PropertyMessage); diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/ServiceInvocationJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/ServiceInvocationJob.cs index 037cf94ab..8de4ce001 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/ServiceInvocationJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/ServiceInvocationJob.cs @@ -55,7 +55,7 @@ public class ServiceInvocationJob : IJobRunnable // TODO: support grpc private readonly static string[] Providers = new string[] { "http", "dapr" }; - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { // 获取参数列表 var type = context.GetString(PropertyService); @@ -103,7 +103,7 @@ public class ServiceInvocationJob : IJobRunnable .GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) .First(m => m.Name == CallRequestMethod && m.IsGenericMethodDefinition); - protected virtual async Task ExecuteWithHttpProxy( + protected async virtual Task ExecuteWithHttpProxy( JobRunnableContext context, Type serviceType, MethodInfo serviceMethod) @@ -147,7 +147,7 @@ public class ServiceInvocationJob : IJobRunnable } } - protected virtual async Task GetActionApiDescriptionModel( + protected async virtual Task GetActionApiDescriptionModel( JobRunnableContext context, Type serviceType, MethodInfo serviceMethod) @@ -183,7 +183,7 @@ public class ServiceInvocationJob : IJobRunnable .GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) .First(m => m.Name == DaprCallRequestMethod && m.IsGenericMethodDefinition); - protected virtual async Task ExecuteWithDaprProxy( + protected async virtual Task ExecuteWithDaprProxy( JobRunnableContext context, Type serviceType, MethodInfo serviceMethod) @@ -240,7 +240,7 @@ public class ServiceInvocationJob : IJobRunnable } } - protected virtual async Task GetActionApiDescriptionModel( + protected async virtual Task GetActionApiDescriptionModel( JobRunnableContext context, string service, string appId, @@ -258,7 +258,7 @@ public class ServiceInvocationJob : IJobRunnable #endregion - protected virtual async Task GetResultAsync(Task task, Type resultType) + protected async virtual Task GetResultAsync(Task task, Type resultType) { await task; var resultProperty = typeof(Task<>) diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Quartz/LINGYUN/Abp/BackgroundTasks/Quartz/QuartzJobScheduler.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Quartz/LINGYUN/Abp/BackgroundTasks/Quartz/QuartzJobScheduler.cs index 27065ea90..dc06d1d30 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Quartz/LINGYUN/Abp/BackgroundTasks/Quartz/QuartzJobScheduler.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Quartz/LINGYUN/Abp/BackgroundTasks/Quartz/QuartzJobScheduler.cs @@ -30,12 +30,12 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend QuartzJobCreator = quartzJobCreator; } - public virtual async Task ExistsAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task ExistsAsync(JobInfo job, CancellationToken cancellationToken = default) { return await Scheduler.CheckExists(BuildJobKey(job), cancellationToken); } - public virtual async Task PauseAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task PauseAsync(JobInfo job, CancellationToken cancellationToken = default) { var jobKey = BuildJobKey(job); if (await Scheduler.CheckExists(jobKey, cancellationToken)) @@ -48,12 +48,12 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend } } - public virtual async Task PublishAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task PublishAsync(JobInfo job, CancellationToken cancellationToken = default) { return await QueueAsync(job, cancellationToken); } - public virtual async Task QueueAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task QueueAsync(JobInfo job, CancellationToken cancellationToken = default) { var jobKey = BuildJobKey(job); if (await Scheduler.CheckExists(jobKey, cancellationToken)) @@ -78,7 +78,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend return await Scheduler.CheckExists(jobTrigger.Key, cancellationToken); } - public virtual async Task QueuesAsync(IEnumerable jobs, CancellationToken cancellationToken = default) + public async virtual Task QueuesAsync(IEnumerable jobs, CancellationToken cancellationToken = default) { var jobDictionary = new Dictionary>(); foreach (var job in jobs) @@ -101,7 +101,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend await Scheduler.ScheduleJobs(jobDictionary, true, cancellationToken); } - public virtual async Task RemoveAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task RemoveAsync(JobInfo job, CancellationToken cancellationToken = default) { var jobKey = BuildJobKey(job); if (!await Scheduler.CheckExists(jobKey, cancellationToken)) @@ -119,7 +119,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend return !await Scheduler.CheckExists(jobKey, cancellationToken); } - public virtual async Task ResumeAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task ResumeAsync(JobInfo job, CancellationToken cancellationToken = default) { var jobKey = BuildJobKey(job); if (await Scheduler.CheckExists(jobKey, cancellationToken)) @@ -132,7 +132,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend } } - public virtual async Task ShutdownAsync(CancellationToken cancellationToken = default) + public async virtual Task ShutdownAsync(CancellationToken cancellationToken = default) { await StopAsync(cancellationToken); @@ -141,7 +141,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend return Scheduler.IsShutdown; } - public virtual async Task StartAsync(CancellationToken cancellationToken = default) + public async virtual Task StartAsync(CancellationToken cancellationToken = default) { if (Scheduler.InStandbyMode) { @@ -150,7 +150,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend return Scheduler.InStandbyMode; } - public virtual async Task StopAsync(CancellationToken cancellationToken = default) + public async virtual Task StopAsync(CancellationToken cancellationToken = default) { if (!Scheduler.InStandbyMode) { @@ -160,7 +160,7 @@ public class QuartzJobScheduler : IJobScheduler, IJobPublisher, ISingletonDepend return !Scheduler.InStandbyMode; } - public virtual async Task TriggerAsync(JobInfo job, CancellationToken cancellationToken = default) + public async virtual Task TriggerAsync(JobInfo job, CancellationToken cancellationToken = default) { var jobKey = BuildJobKey(job); if (!await Scheduler.CheckExists(jobKey, cancellationToken)) diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobAdapter.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobAdapter.cs index eaa63c900..26f05d255 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobAdapter.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobAdapter.cs @@ -28,7 +28,7 @@ public class BackgroundJobAdapter : IJobRunnable Logger = NullLogger>.Instance; } - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { using var scope = ServiceScopeFactory.CreateScope(); object args = null; diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobManager.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobManager.cs index 08c799cbc..789fd0971 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobManager.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundJobManager.cs @@ -39,7 +39,7 @@ public class BackgroundJobManager : IBackgroundJobManager, ITransientDependency TasksOptions = taskOptions.Value; } - public virtual async Task EnqueueAsync( + public async virtual Task EnqueueAsync( TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null) diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundCleaningJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundCleaningJob.cs index b85b7e462..454f15717 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundCleaningJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundCleaningJob.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.BackgroundTasks.Internal; [DisableJobAction] public class BackgroundCleaningJob : IJobRunnable { - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { var options = context.ServiceProvider.GetRequiredService>().Value; var store = context.ServiceProvider.GetRequiredService(); diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundPollingJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundPollingJob.cs index 207e15b0b..b0477ba60 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundPollingJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/BackgroundPollingJob.cs @@ -11,7 +11,7 @@ namespace LINGYUN.Abp.BackgroundTasks.Internal; [DisableJobAction] public class BackgroundPollingJob : IJobRunnable { - public virtual async Task ExecuteAsync(JobRunnableContext context) + public async virtual Task ExecuteAsync(JobRunnableContext context) { var options = context.ServiceProvider.GetRequiredService>().Value; var store = context.ServiceProvider.GetRequiredService(); diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Application/LINGYUN/Abp/TaskManagement/BackgroundJobLogAppService.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Application/LINGYUN/Abp/TaskManagement/BackgroundJobLogAppService.cs index 012a1db32..837e68f8c 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Application/LINGYUN/Abp/TaskManagement/BackgroundJobLogAppService.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Application/LINGYUN/Abp/TaskManagement/BackgroundJobLogAppService.cs @@ -23,14 +23,14 @@ public class BackgroundJobLogAppService : TaskManagementApplicationService, IBac return BackgroundJobLogRepository.DeleteAsync(id); } - public virtual async Task GetAsync(long id) + public async virtual Task GetAsync(long id) { var backgroundJobLog = await BackgroundJobLogRepository.GetAsync(id); return ObjectMapper.Map(backgroundJobLog); } - public virtual async Task> GetListAsync(BackgroundJobLogGetListInput input) + public async virtual Task> GetListAsync(BackgroundJobLogGetListInput input) { var filter = new BackgroundJobLogFilter { diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobManager.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobManager.cs index a962f119d..6d80257f2 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobManager.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobManager.cs @@ -25,14 +25,14 @@ public class BackgroundJobManager : DomainService BackgroundJobInfoRepository = backgroundJobInfoRepository; } - public virtual async Task CreateAsync(BackgroundJobInfo jobInfo) + public async virtual Task CreateAsync(BackgroundJobInfo jobInfo) { await BackgroundJobInfoRepository.InsertAsync(jobInfo); return jobInfo; } - public virtual async Task UpdateAsync(BackgroundJobInfo jobInfo, bool resetJob = false) + public async virtual Task UpdateAsync(BackgroundJobInfo jobInfo, bool resetJob = false) { await BackgroundJobInfoRepository.UpdateAsync(jobInfo); @@ -67,17 +67,17 @@ public class BackgroundJobManager : DomainService return jobInfo; } - public virtual async Task DeleteAsync(BackgroundJobInfo jobInfo) + public async virtual Task DeleteAsync(BackgroundJobInfo jobInfo) { await BackgroundJobInfoRepository.DeleteAsync(jobInfo); } - public virtual async Task BulkDeleteAsync(IEnumerable jobInfos) + public async virtual Task BulkDeleteAsync(IEnumerable jobInfos) { await BackgroundJobInfoRepository.DeleteManyAsync(jobInfos); } - public virtual async Task QueueAsync(BackgroundJobInfo jobInfo) + public async virtual Task QueueAsync(BackgroundJobInfo jobInfo) { await EventBus.PublishAsync( new JobStartEventData @@ -88,7 +88,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task BulkQueueAsync(IEnumerable jobInfos) + public async virtual Task BulkQueueAsync(IEnumerable jobInfos) { if (jobInfos.Any()) { @@ -102,7 +102,7 @@ public class BackgroundJobManager : DomainService } } - public virtual async Task TriggerAsync(BackgroundJobInfo jobInfo) + public async virtual Task TriggerAsync(BackgroundJobInfo jobInfo) { await EventBus.PublishAsync( new JobTriggerEventData @@ -113,7 +113,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task BulkTriggerAsync(IEnumerable jobInfos) + public async virtual Task BulkTriggerAsync(IEnumerable jobInfos) { if (jobInfos.Any()) { @@ -127,7 +127,7 @@ public class BackgroundJobManager : DomainService } } - public virtual async Task PauseAsync(BackgroundJobInfo jobInfo) + public async virtual Task PauseAsync(BackgroundJobInfo jobInfo) { jobInfo.SetStatus(JobStatus.Paused); jobInfo.SetNextRunTime(null); @@ -146,7 +146,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task BulkPauseAsync(IEnumerable jobInfos) + public async virtual Task BulkPauseAsync(IEnumerable jobInfos) { foreach (var jobInfo in jobInfos) { @@ -168,7 +168,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task ResumeAsync(BackgroundJobInfo jobInfo) + public async virtual Task ResumeAsync(BackgroundJobInfo jobInfo) { jobInfo.SetStatus(JobStatus.Running); jobInfo.IsAbandoned = false; @@ -188,7 +188,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task BulkResumeAsync(IEnumerable jobInfos) + public async virtual Task BulkResumeAsync(IEnumerable jobInfos) { foreach (var jobInfo in jobInfos) { @@ -211,7 +211,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task StopAsync(BackgroundJobInfo jobInfo) + public async virtual Task StopAsync(BackgroundJobInfo jobInfo) { jobInfo.SetStatus(JobStatus.Stopped); jobInfo.SetNextRunTime(null); @@ -230,7 +230,7 @@ public class BackgroundJobManager : DomainService }); } - public virtual async Task BulkStopAsync(IEnumerable jobInfos) + public async virtual Task BulkStopAsync(IEnumerable jobInfos) { foreach (var jobInfo in jobInfos) { diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobInfoRepository.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobInfoRepository.cs index f63725a14..ffe217f08 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobInfoRepository.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobInfoRepository.cs @@ -26,7 +26,7 @@ public class EfCoreBackgroundJobInfoRepository : Clock = clock; } - public virtual async Task CheckNameAsync( + public async virtual Task CheckNameAsync( string group, string name, CancellationToken cancellationToken = default) @@ -36,7 +36,7 @@ public class EfCoreBackgroundJobInfoRepository : GetCancellationToken(cancellationToken)); } - public virtual async Task FindJobAsync( + public async virtual Task FindJobAsync( string id, bool includeDetails = true, CancellationToken cancellationToken = default) @@ -75,7 +75,7 @@ public class EfCoreBackgroundJobInfoRepository : .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetExpiredJobsAsync( + public async virtual Task> GetExpiredJobsAsync( int maxResultCount, TimeSpan jobExpiratime, CancellationToken cancellationToken = default) @@ -90,7 +90,7 @@ public class EfCoreBackgroundJobInfoRepository : .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetAllPeriodTasksAsync( + public async virtual Task> GetAllPeriodTasksAsync( CancellationToken cancellationToken = default) { var status = new JobStatus[] { JobStatus.Running, JobStatus.FailedRetry }; @@ -104,13 +104,13 @@ public class EfCoreBackgroundJobInfoRepository : .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetCountAsync(BackgroundJobInfoFilter filter, CancellationToken cancellationToken = default) + public async virtual Task GetCountAsync(BackgroundJobInfoFilter filter, CancellationToken cancellationToken = default) { return await ApplyFilter(await GetDbSetAsync(), filter) .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync(BackgroundJobInfoFilter filter, string sorting = "Name", int maxResultCount = 10, int skipCount = 0, CancellationToken cancellationToken = default) + public async virtual Task> GetListAsync(BackgroundJobInfoFilter filter, string sorting = "Name", int maxResultCount = 10, int skipCount = 0, CancellationToken cancellationToken = default) { return await ApplyFilter(await GetDbSetAsync(), filter) .OrderBy(sorting ?? $"{nameof(BackgroundJobInfo.CreationTime)} DESC") @@ -118,7 +118,7 @@ public class EfCoreBackgroundJobInfoRepository : .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetWaitingListAsync( + public async virtual Task> GetWaitingListAsync( int maxResultCount, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobLogRepository.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobLogRepository.cs index 28a56a39a..a03621788 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobLogRepository.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.EntityFrameworkCore/LINGYUN/Abp/TaskManagement/EntityFrameworkCore/EfCoreBackgroundJobLogRepository.cs @@ -20,7 +20,7 @@ public class EfCoreBackgroundJobLogRepository : { } - public virtual async Task GetCountAsync( + public async virtual Task GetCountAsync( BackgroundJobLogFilter filter, string jobId = null, CancellationToken cancellationToken = default) @@ -38,7 +38,7 @@ public class EfCoreBackgroundJobLogRepository : .CountAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( BackgroundJobLogFilter filter, string jobId = null, string sorting = nameof(BackgroundJobLog.RunTime), diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Quartz/LINGYUN/Abp/TaskManagement/Quartz/QuartzJobScheduler.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Quartz/LINGYUN/Abp/TaskManagement/Quartz/QuartzJobScheduler.cs index 0e8a636b9..9a25dd15b 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Quartz/LINGYUN/Abp/TaskManagement/Quartz/QuartzJobScheduler.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Quartz/LINGYUN/Abp/TaskManagement/Quartz/QuartzJobScheduler.cs @@ -11,7 +11,7 @@ public class QuartzJobScheduler : IJobScheduler Scheduler = scheduler; } - public virtual async Task ExistsAsync(string group, string name) + public async virtual Task ExistsAsync(string group, string name) { throw new System.NotImplementedException(); } diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantSynchronizer.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantSynchronizer.cs index cdb9dd896..70f6a0547 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantSynchronizer.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantSynchronizer.cs @@ -46,7 +46,7 @@ public class TenantSynchronizer : /// /// [UnitOfWork] - public virtual async Task HandleEventAsync(EntityUpdatedEto eventData) + public async virtual Task HandleEventAsync(EntityUpdatedEto eventData) { await UpdateCacheItemAsync(eventData.Entity.Id, eventData.Entity.Name); } @@ -60,7 +60,7 @@ public class TenantSynchronizer : /// /// [UnitOfWork] - public virtual async Task HandleEventAsync(EntityCreatedEto eventData) + public async virtual Task HandleEventAsync(EntityCreatedEto eventData) { await UpdateCacheItemAsync(eventData.Entity.Id, eventData.Entity.Name); } @@ -73,7 +73,7 @@ public class TenantSynchronizer : /// /// /// - public virtual async Task HandleEventAsync(EntityDeletedEto eventData) + public async virtual Task HandleEventAsync(EntityDeletedEto eventData) { await RemoveCacheItemAsync(eventData.Entity.Id, eventData.Entity.Name); } @@ -87,7 +87,7 @@ public class TenantSynchronizer : /// /// [UnitOfWork] - public virtual async Task HandleEventAsync(ConnectionStringCreatedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringCreatedEventData eventData) { await UpdateCacheItemAsync(eventData.TenantId, eventData.TenantName); } @@ -100,13 +100,13 @@ public class TenantSynchronizer : /// /// /// - public virtual async Task HandleEventAsync(ConnectionStringDeletedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringDeletedEventData eventData) { // TODO: 用更新还是用删除? await RemoveCacheItemAsync(eventData.TenantId, eventData.TenantName); } - protected virtual async Task UpdateCacheItemAsync(Guid tenantId, string tenantName = null) + protected async virtual Task UpdateCacheItemAsync(Guid tenantId, string tenantName = null) { try { @@ -139,7 +139,7 @@ public class TenantSynchronizer : } } - protected virtual async Task RemoveCacheItemAsync(Guid tenantId, string tenantName = null) + protected async virtual Task RemoveCacheItemAsync(Guid tenantId, string tenantName = null) { using (_currentTenant.Change(null)) { diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs index 45f46ae7e..e6242b565 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs @@ -70,7 +70,7 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder }; } - public virtual async Task FindAsync(string name) + public async virtual Task FindAsync(string name) { var tenantCacheItem = await GetCacheItemByNameAsync(name); @@ -85,7 +85,7 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder }; } - public virtual async Task FindAsync(Guid id) + public async virtual Task FindAsync(Guid id) { var tenantCacheItem = await GetCacheItemByIdAsync(id); @@ -100,7 +100,7 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder }; } - protected virtual async Task GetCacheItemByIdAsync(Guid id) + protected async virtual Task GetCacheItemByIdAsync(Guid id) { using (_currentTenant.Change(null)) { @@ -142,7 +142,7 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder return cacheItem; } } - protected virtual async Task GetCacheItemByNameAsync(string name) + protected async virtual Task GetCacheItemByNameAsync(string name) { // 需要切换到最外层以解决查询无效的bug using (_currentTenant.Change(null)) diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs index b36a1fb9d..b27d975da 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs @@ -33,32 +33,32 @@ public class TenantSynchronizer : _tenantAppService = tenantAppService; } - public virtual async Task HandleEventAsync(EntityUpdatedEto eventData) + public async virtual Task HandleEventAsync(EntityUpdatedEto eventData) { await UpdateCacheItemAsync(eventData.Entity.Id, eventData.Entity.Name); } - public virtual async Task HandleEventAsync(EntityCreatedEto eventData) + public async virtual Task HandleEventAsync(EntityCreatedEto eventData) { await UpdateCacheItemAsync(eventData.Entity.Id, eventData.Entity.Name); } - public virtual async Task HandleEventAsync(EntityDeletedEto eventData) + public async virtual Task HandleEventAsync(EntityDeletedEto eventData) { await RemoveCacheItemAsync(eventData.Entity.Id, eventData.Entity.Name); } - public virtual async Task HandleEventAsync(ConnectionStringCreatedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringCreatedEventData eventData) { await UpdateCacheItemAsync(eventData.TenantId, eventData.TenantName); } - public virtual async Task HandleEventAsync(ConnectionStringDeletedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringDeletedEventData eventData) { await RemoveCacheItemAsync(eventData.TenantId, eventData.TenantName); } - protected virtual async Task UpdateCacheItemAsync(Guid tenantId, string tenantName = null) + protected async virtual Task UpdateCacheItemAsync(Guid tenantId, string tenantName = null) { using (_currentTenant.Change(null)) { @@ -81,7 +81,7 @@ public class TenantSynchronizer : } } - protected virtual async Task RemoveCacheItemAsync(Guid tenantId, string tenantName = null) + protected async virtual Task RemoveCacheItemAsync(Guid tenantId, string tenantName = null) { using (_currentTenant.Change(null)) { diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs index f8373e639..114e1e322 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs @@ -53,7 +53,7 @@ namespace LINGYUN.Abp.MultiTenancy.RemoteService }; } - public virtual async Task FindAsync(string name) + public async virtual Task FindAsync(string name) { var tenantCacheItem = await GetCacheItemByNameAsync(name); return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name) @@ -62,7 +62,7 @@ namespace LINGYUN.Abp.MultiTenancy.RemoteService }; } - public virtual async Task FindAsync(Guid id) + public async virtual Task FindAsync(Guid id) { var tenantCacheItem = await GetCacheItemByIdAsync(id); return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name) @@ -71,7 +71,7 @@ namespace LINGYUN.Abp.MultiTenancy.RemoteService }; } - protected virtual async Task GetCacheItemByIdAsync(Guid id) + protected async virtual Task GetCacheItemByIdAsync(Guid id) { using (_currentTenant.Change(null)) { @@ -107,7 +107,7 @@ namespace LINGYUN.Abp.MultiTenancy.RemoteService return cacheItem; } } - protected virtual async Task GetCacheItemByNameAsync(string name) + protected async virtual Task GetCacheItemByNameAsync(string name) { using (_currentTenant.Change(null)) { diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantCacheItemInvalidator.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantCacheItemInvalidator.cs index 01efd49ae..ab3e6d402 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantCacheItemInvalidator.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantCacheItemInvalidator.cs @@ -21,7 +21,7 @@ public class TenantCacheItemInvalidator : Cache = cache; } - public virtual async Task HandleEventAsync(EntityUpdatedEto eventData) + public async virtual Task HandleEventAsync(EntityUpdatedEto eventData) { await Cache.RemoveAsync( TenantCacheItem.CalculateCacheKey( @@ -35,7 +35,7 @@ public class TenantCacheItemInvalidator : considerUow: true); } - public virtual async Task HandleEventAsync(EntityDeletedEto eventData) + public async virtual Task HandleEventAsync(EntityDeletedEto eventData) { await Cache.RemoveAsync( TenantCacheItem.CalculateCacheKey( @@ -49,7 +49,7 @@ public class TenantCacheItemInvalidator : considerUow: true); } - public virtual async Task HandleEventAsync(ConnectionStringCreatedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringCreatedEventData eventData) { await Cache.RemoveAsync( TenantCacheItem.CalculateCacheKey( @@ -58,7 +58,7 @@ public class TenantCacheItemInvalidator : considerUow: true); } - public virtual async Task HandleEventAsync(ConnectionStringDeletedEventData eventData) + public async virtual Task HandleEventAsync(ConnectionStringDeletedEventData eventData) { await Cache.RemoveAsync( TenantCacheItem.CalculateCacheKey( diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs index 4459d3d89..1dbe33320 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs @@ -1,19 +1,19 @@ using JetBrains.Annotations; -using LINGYUN.Abp.Saas.Tenants; +using LINGYUN.Abp.Saas.Tenants; using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -using Volo.Abp.Threading; - +using Volo.Abp.Threading; + namespace LINGYUN.Abp.MultiTenancy.Saas; public class TenantStore : ITenantStore, ITransientDependency -{ +{ protected ICurrentTenant CurrentTenant { get; } protected ITenantAppService TenantAppService { get; } protected IDistributedCache Cache { get; } @@ -28,12 +28,12 @@ public class TenantStore : ITenantStore, ITransientDependency TenantAppService = tenantAppService; } - public virtual async Task FindAsync(string name) + public async virtual Task FindAsync(string name) { return (await GetCacheItemAsync(null, name)).Value; } - public virtual async Task FindAsync(Guid id) + public async virtual Task FindAsync(Guid id) { return (await GetCacheItemAsync(id, null)).Value; } @@ -50,7 +50,7 @@ public class TenantStore : ITenantStore, ITransientDependency return AsyncHelper.RunSync(async () => await FindAsync(id)); } - protected virtual async Task GetCacheItemAsync(Guid? id, string name) + protected async virtual Task GetCacheItemAsync(Guid? id, string name) { var cacheKey = CalculateCacheKey(id, name); @@ -76,10 +76,10 @@ public class TenantStore : ITenantStore, ITransientDependency { var tenant = await TenantAppService.GetAsync(name); IReadOnlyList connectionStrings = new List(); - if (tenant != null) - { - var connectionStringsResult = await TenantAppService.GetConnectionStringAsync(tenant.Id); - connectionStrings = connectionStringsResult.Items; + if (tenant != null) + { + var connectionStringsResult = await TenantAppService.GetConnectionStringAsync(tenant.Id); + connectionStrings = connectionStringsResult.Items; } return await SetCacheAsync(cacheKey, tenant, connectionStrings); } @@ -88,25 +88,25 @@ public class TenantStore : ITenantStore, ITransientDependency throw new AbpException("Both id and name can't be invalid."); } - protected virtual async Task SetCacheAsync( + protected async virtual Task SetCacheAsync( string cacheKey, [CanBeNull] TenantDto tenant, [CanBeNull] IReadOnlyList connectionStrings) { var tenantConfiguration = tenant != null - ? new TenantConfiguration(tenant.Id, tenant.Name) - { - IsActive = tenant.IsActive, + ? new TenantConfiguration(tenant.Id, tenant.Name) + { + IsActive = tenant.IsActive, } : null; - if (tenantConfiguration != null && connectionStrings?.Any() == true) - { - foreach (var connectionString in connectionStrings) - { - tenantConfiguration.ConnectionStrings.Add( - connectionString.Name, - connectionString.Value); - } + if (tenantConfiguration != null && connectionStrings?.Any() == true) + { + foreach (var connectionString in connectionStrings) + { + tenantConfiguration.ConnectionStrings.Add( + connectionString.Name, + connectionString.Value); + } } var cacheItem = new TenantCacheItem(tenantConfiguration); await Cache.SetAsync(cacheKey, cacheItem, considerUow: true); diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs index 26a24a97f..743998e35 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs @@ -28,7 +28,7 @@ namespace LINGYUN.Abp.TenantManagement TenantManager = tenantManager; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var tenant = await TenantRepository.FindAsync(id, false); if(tenant == null) @@ -38,7 +38,7 @@ namespace LINGYUN.Abp.TenantManagement return ObjectMapper.Map(tenant); } - public virtual async Task GetAsync(string name) + public async virtual Task GetAsync(string name) { var tenant = await TenantRepository.FindByNameAsync(name, false); if (tenant == null) @@ -48,7 +48,7 @@ namespace LINGYUN.Abp.TenantManagement return ObjectMapper.Map(tenant); } - public virtual async Task> GetListAsync(TenantGetByPagedInputDto input) + public async virtual Task> GetListAsync(TenantGetByPagedInputDto input) { var count = await TenantRepository.GetCountAsync(input.Filter); var list = await TenantRepository.GetListAsync( @@ -65,7 +65,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.Create)] - public virtual async Task CreateAsync(TenantCreateDto input) + public async virtual Task CreateAsync(TenantCreateDto input) { var tenant = await TenantManager.CreateAsync(input.Name); input.MapExtraPropertiesTo(tenant); @@ -96,7 +96,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.Update)] - public virtual async Task UpdateAsync(Guid id, TenantUpdateDto input) + public async virtual Task UpdateAsync(Guid id, TenantUpdateDto input) { var tenant = await TenantRepository.GetAsync(id, false); @@ -108,7 +108,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var tenant = await TenantRepository.FindAsync(id); if (tenant == null) @@ -119,7 +119,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task GetConnectionStringAsync(Guid id, string name) + public async virtual Task GetConnectionStringAsync(Guid id, string name) { var tenant = await TenantRepository.GetAsync(id); @@ -133,7 +133,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task> GetConnectionStringAsync(Guid id) + public async virtual Task> GetConnectionStringAsync(Guid id) { var tenant = await TenantRepository.GetAsync(id); @@ -142,7 +142,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate) + public async virtual Task SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate) { var tenant = await TenantRepository.GetAsync(id); if (tenant.FindConnectionString(tenantConnectionStringCreateOrUpdate.Name) == null) @@ -169,7 +169,7 @@ namespace LINGYUN.Abp.TenantManagement } [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] - public virtual async Task DeleteConnectionStringAsync(Guid id, string name) + public async virtual Task DeleteConnectionStringAsync(Guid id, string name) { var tenant = await TenantRepository.GetAsync(id); diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.ClientProxies/LINGYUN/Abp/Webhooks/ClientProxies/ClientProxiesWebhookPublisher.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.ClientProxies/LINGYUN/Abp/Webhooks/ClientProxies/ClientProxiesWebhookPublisher.cs index 9e5ae8b35..fe15c139e 100644 --- a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.ClientProxies/LINGYUN/Abp/Webhooks/ClientProxies/ClientProxiesWebhookPublisher.cs +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks.ClientProxies/LINGYUN/Abp/Webhooks/ClientProxies/ClientProxiesWebhookPublisher.cs @@ -84,7 +84,7 @@ public class ClientProxiesWebhookPublisher : IWebhookPublisher, ITransientDepend await PublishAsync(input); } - protected virtual async Task PublishAsync(WebhookPublishInput input) + protected async virtual Task PublishAsync(WebhookPublishInput input) { await PublishAppService.PublishAsync(input); } diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookPublisher.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookPublisher.cs index be46197ae..8ea598c58 100644 --- a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookPublisher.cs +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookPublisher.cs @@ -32,7 +32,7 @@ namespace LINGYUN.Abp.Webhooks #region Async Publish Methods - public virtual async Task PublishAsync( + public async virtual Task PublishAsync( string webhookName, object data, bool sendExactSameData = false, @@ -42,7 +42,7 @@ namespace LINGYUN.Abp.Webhooks await PublishAsync(webhookName, data, subscriptions, sendExactSameData, headers); } - public virtual async Task PublishAsync( + public async virtual Task PublishAsync( string webhookName, object data, Guid? tenantId, @@ -53,7 +53,7 @@ namespace LINGYUN.Abp.Webhooks await PublishAsync(webhookName, data, subscriptions, sendExactSameData, headers); } - public virtual async Task PublishAsync( + public async virtual Task PublishAsync( Guid?[] tenantIds, string webhookName, object data, @@ -64,7 +64,7 @@ namespace LINGYUN.Abp.Webhooks await PublishAsync(webhookName, data, subscriptions, sendExactSameData, headers); } - protected virtual async Task PublishAsync( + protected async virtual Task PublishAsync( string webhookName, object data, List webhookSubscriptions, @@ -119,7 +119,7 @@ namespace LINGYUN.Abp.Webhooks #endregion - protected virtual async Task SaveAndGetWebhookAsync( + protected async virtual Task SaveAndGetWebhookAsync( Guid? tenantId, string webhookName, object data) diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookSender.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookSender.cs index 04f84dcd6..5bf66f408 100644 --- a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookSender.cs +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/DefaultWebhookSender.cs @@ -126,7 +126,7 @@ namespace LINGYUN.Abp.Webhooks } } - protected virtual async Task SendHttpRequest(HttpRequestMessage request) + protected async virtual Task SendHttpRequest(HttpRequestMessage request) { var client = _httpClientFactory.CreateClient(AbpWebhooksModule.WebhooksClient); diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookManager.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookManager.cs index d1929c4d1..f761230c3 100644 --- a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookManager.cs +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookManager.cs @@ -23,7 +23,7 @@ namespace LINGYUN.Abp.Webhooks WebhookSendAttemptStore = webhookSendAttemptStore; } - public virtual async Task GetWebhookPayloadAsync(WebhookSenderArgs webhookSenderArgs) + public async virtual Task GetWebhookPayloadAsync(WebhookSenderArgs webhookSenderArgs) { var data = JsonConvert.DeserializeObject(webhookSenderArgs.Data); @@ -64,7 +64,7 @@ namespace LINGYUN.Abp.Webhooks } } - public virtual async Task GetSerializedBodyAsync(WebhookSenderArgs webhookSenderArgs) + public async virtual Task GetSerializedBodyAsync(WebhookSenderArgs webhookSenderArgs) { if (webhookSenderArgs.SendExactSameData) { diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookSubscriptionManager.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookSubscriptionManager.cs index fe1a9c697..ad675548f 100644 --- a/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookSubscriptionManager.cs +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.Webhooks/LINGYUN/Abp/Webhooks/WebhookSubscriptionManager.cs @@ -31,17 +31,17 @@ namespace LINGYUN.Abp.Webhooks WebhookSubscriptionsStore = NullWebhookSubscriptionsStore.Instance; } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await WebhookSubscriptionsStore.GetAsync(id); } - public virtual async Task> GetAllSubscriptionsAsync(Guid? tenantId) + public async virtual Task> GetAllSubscriptionsAsync(Guid? tenantId) { return await WebhookSubscriptionsStore.GetAllSubscriptionsAsync(tenantId); } - public virtual async Task> GetAllSubscriptionsIfFeaturesGrantedAsync(Guid? tenantId, string webhookName) + public async virtual Task> GetAllSubscriptionsIfFeaturesGrantedAsync(Guid? tenantId, string webhookName) { if (!await _webhookDefinitionManager.IsAvailableAsync(tenantId, webhookName)) { @@ -51,12 +51,12 @@ namespace LINGYUN.Abp.Webhooks return (await WebhookSubscriptionsStore.GetAllSubscriptionsAsync(tenantId, webhookName)).ToList(); } - public virtual async Task> GetAllSubscriptionsOfTenantsAsync(Guid?[] tenantIds) + public async virtual Task> GetAllSubscriptionsOfTenantsAsync(Guid?[] tenantIds) { return (await WebhookSubscriptionsStore.GetAllSubscriptionsOfTenantsAsync(tenantIds)).ToList(); } - public virtual async Task> GetAllSubscriptionsOfTenantsIfFeaturesGrantedAsync(Guid?[] tenantIds, string webhookName) + public async virtual Task> GetAllSubscriptionsOfTenantsIfFeaturesGrantedAsync(Guid?[] tenantIds, string webhookName) { var featureGrantedTenants = new List(); foreach (var tenantId in tenantIds) @@ -70,7 +70,7 @@ namespace LINGYUN.Abp.Webhooks return (await WebhookSubscriptionsStore.GetAllSubscriptionsOfTenantsAsync(featureGrantedTenants.ToArray(), webhookName)).ToList(); } - public virtual async Task IsSubscribedAsync(Guid? tenantId, string webhookName) + public async virtual Task IsSubscribedAsync(Guid? tenantId, string webhookName) { if (!await _webhookDefinitionManager.IsAvailableAsync(tenantId, webhookName)) { @@ -80,7 +80,7 @@ namespace LINGYUN.Abp.Webhooks return await WebhookSubscriptionsStore.IsSubscribedAsync(tenantId, webhookName); } - public virtual async Task AddOrUpdateSubscriptionAsync(WebhookSubscriptionInfo webhookSubscription) + public async virtual Task AddOrUpdateSubscriptionAsync(WebhookSubscriptionInfo webhookSubscription) { using (var uow = _unitOfWorkManager.Begin()) { @@ -101,7 +101,7 @@ namespace LINGYUN.Abp.Webhooks } } - public virtual async Task ActivateWebhookSubscriptionAsync(Guid id, bool active) + public async virtual Task ActivateWebhookSubscriptionAsync(Guid id, bool active) { using (var uow = _unitOfWorkManager.Begin()) { @@ -112,7 +112,7 @@ namespace LINGYUN.Abp.Webhooks } } - public virtual async Task DeleteSubscriptionAsync(Guid id) + public async virtual Task DeleteSubscriptionAsync(Guid id) { using (var uow = _unitOfWorkManager.Begin()) { @@ -122,7 +122,7 @@ namespace LINGYUN.Abp.Webhooks } } - public virtual async Task AddWebhookAsync(WebhookSubscriptionInfo subscription, string webhookName) + public async virtual Task AddWebhookAsync(WebhookSubscriptionInfo subscription, string webhookName) { using (var uow = _unitOfWorkManager.Begin()) { @@ -146,7 +146,7 @@ namespace LINGYUN.Abp.Webhooks #region PermissionCheck - protected virtual async Task CheckIfPermissionsGrantedAsync(WebhookSubscriptionInfo webhookSubscription) + protected async virtual Task CheckIfPermissionsGrantedAsync(WebhookSubscriptionInfo webhookSubscription) { if (webhookSubscription.Webhooks.IsNullOrEmpty()) { @@ -159,7 +159,7 @@ namespace LINGYUN.Abp.Webhooks } } - protected virtual async Task CheckPermissionsAsync(Guid? tenantId, string webhookName) + protected async virtual Task CheckPermissionsAsync(Guid? tenantId, string webhookName) { if (!await _webhookDefinitionManager.IsAvailableAsync(tenantId, webhookName)) { diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.Identity.WeChat/LINGYUN/Abp/Identity/WeChat/OpenId/UserWeChatOpenIdFinder.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.Identity.WeChat/LINGYUN/Abp/Identity/WeChat/OpenId/UserWeChatOpenIdFinder.cs index 009fb50c3..cdf831cac 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.Identity.WeChat/LINGYUN/Abp/Identity/WeChat/OpenId/UserWeChatOpenIdFinder.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.Identity.WeChat/LINGYUN/Abp/Identity/WeChat/OpenId/UserWeChatOpenIdFinder.cs @@ -20,14 +20,14 @@ namespace LINGYUN.Abp.Identity.WeChat.OpenId UserManager = userManager; } - public virtual async Task FindByUserIdAsync(Guid userId, string provider) + public async virtual Task FindByUserIdAsync(Guid userId, string provider) { var user = await UserManager.FindByIdAsync(userId.ToString()); return GetUserOpenIdOrNull(user, provider); } - public virtual async Task FindByUserNameAsync(string userName, string provider) + public async virtual Task FindByUserNameAsync(string userName, string provider) { var user = await UserManager.FindByNameAsync(userName); diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs index 8548aa9ea..287d46043 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs @@ -59,7 +59,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram } } - protected virtual async Task SendWeChatTemplateMessagAsync(NotificationInfo notification, UserIdentifier identifier, CancellationToken cancellationToken = default) + protected async virtual Task SendWeChatTemplateMessagAsync(NotificationInfo notification, UserIdentifier identifier, CancellationToken cancellationToken = default) { var templateId = GetOrDefaultTemplateId(notification.Data); if (templateId.IsNullOrWhiteSpace()) diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Application/LINGYUN/Abp/WeChat/Crypto/CryptoAppService.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Application/LINGYUN/Abp/WeChat/Crypto/CryptoAppService.cs index fb43fdc23..ca954bb62 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Application/LINGYUN/Abp/WeChat/Crypto/CryptoAppService.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Application/LINGYUN/Abp/WeChat/Crypto/CryptoAppService.cs @@ -27,7 +27,7 @@ namespace LINGYUN.Abp.WeChat.Crypto MiniProgramOptionsFactory = miniProgramOptionsFactory; } - public virtual async Task GetUserInfoAsync(GetUserInfoInput input) + public async virtual Task GetUserInfoAsync(GetUserInfoInput input) { var options = await MiniProgramOptionsFactory.CreateAsync(); WeChatOpenId weChatOpenId = input.Code.IsNullOrWhiteSpace() diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.HttpApi/LINGYUN/Abp/WeChat/Crypto/CryptoController.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.HttpApi/LINGYUN/Abp/WeChat/Crypto/CryptoController.cs index ce06483fd..0800b163a 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.HttpApi/LINGYUN/Abp/WeChat/Crypto/CryptoController.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.HttpApi/LINGYUN/Abp/WeChat/Crypto/CryptoController.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.WeChat.Crypto [HttpGet] [Route("getUserInfo")] - public virtual async Task GetUserInfoAsync(GetUserInfoInput input) + public async virtual Task GetUserInfoAsync(GetUserInfoInput input) { return await _service.GetUserInfoAsync(input); } diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/AbpWeChatMiniProgramOptionsFactory.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/AbpWeChatMiniProgramOptionsFactory.cs index cd8b603c9..16d9951f5 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/AbpWeChatMiniProgramOptionsFactory.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/AbpWeChatMiniProgramOptionsFactory.cs @@ -14,7 +14,7 @@ namespace LINGYUN.Abp.WeChat.MiniProgram Options = options; } - public virtual async Task CreateAsync() + public async virtual Task CreateAsync() { await Options.SetAsync(); diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/Messages/SubscribeMessager.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/Messages/SubscribeMessager.cs index 1e7e2e598..b2e786201 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/Messages/SubscribeMessager.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.MiniProgram/LINGYUN/Abp/WeChat/MiniProgram/Messages/SubscribeMessager.cs @@ -45,7 +45,7 @@ namespace LINGYUN.Abp.WeChat.MiniProgram.Messages WeChatMiniProgramFeatures.Messages.SendLimitInterval, LimitPolicy.Month, WeChatMiniProgramFeatures.Messages.DefaultSendLimit)] - public virtual async Task SendAsync( + public async virtual Task SendAsync( Guid toUser, string templateId, string page = "", @@ -74,7 +74,7 @@ namespace LINGYUN.Abp.WeChat.MiniProgram.Messages WeChatMiniProgramFeatures.Messages.SendLimitInterval, LimitPolicy.Month, WeChatMiniProgramFeatures.Messages.DefaultSendLimit)] - public virtual async Task SendAsync(SubscribeMessage message, CancellationToken cancellationToken = default) + public async virtual Task SendAsync(SubscribeMessage message, CancellationToken cancellationToken = default) { var options = await MiniProgramOptionsFactory.CreateAsync(); @@ -96,7 +96,7 @@ namespace LINGYUN.Abp.WeChat.MiniProgram.Messages } } - protected virtual async Task MakeRequestAndGetResultAsync(string url, SubscribeMessage message, CancellationToken cancellationToken = default) + protected async virtual Task MakeRequestAndGetResultAsync(string url, SubscribeMessage message, CancellationToken cancellationToken = default) { var client = HttpClientFactory.CreateClient(AbpWeChatMiniProgramConsts.HttpClient); var sendDataContent = JsonConvert.SerializeObject(message); diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Official/LINGYUN/Abp/WeChat/Official/AbpWeChatOfficialOptionsFactory.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Official/LINGYUN/Abp/WeChat/Official/AbpWeChatOfficialOptionsFactory.cs index e945ac9d7..83bde65ca 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Official/LINGYUN/Abp/WeChat/Official/AbpWeChatOfficialOptionsFactory.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Official/LINGYUN/Abp/WeChat/Official/AbpWeChatOfficialOptionsFactory.cs @@ -14,7 +14,7 @@ namespace LINGYUN.Abp.WeChat.Official Options = options; } - public virtual async Task CreateAsync() + public async virtual Task CreateAsync() { await Options.SetAsync(); diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs index 90a3a0474..4b1fc63ae 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs @@ -29,17 +29,17 @@ namespace LINGYUN.Abp.WeChat.SettingManagement LocalizationResource = typeof(WeChatResource); } - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await GetAllForProviderAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString()); } - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await GetAllForProviderAsync(GlobalSettingValueProvider.ProviderName, null); } - protected virtual async Task GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task GetAllForProviderAsync(string providerName, string providerKey) { var settingGroups = new SettingGroupResult(); var wechatSettingGroup = new SettingGroupDto(L["DisplayName:WeChat"], L["Description:WeChat"]); diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs index aa1246e40..3ac4ecd87 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs @@ -21,14 +21,14 @@ namespace LINGYUN.Abp.WeChat.SettingManagement [HttpGet] [Route("by-current-tenant")] - public virtual async Task GetAllForCurrentTenantAsync() + public async virtual Task GetAllForCurrentTenantAsync() { return await WeChatSettingAppService.GetAllForCurrentTenantAsync(); } [HttpGet] [Route("by-global")] - public virtual async Task GetAllForGlobalAsync() + public async virtual Task GetAllForGlobalAsync() { return await WeChatSettingAppService.GetAllForGlobalAsync(); } diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/OpenId/WeChatOpenIdFinder.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/OpenId/WeChatOpenIdFinder.cs index d3934940e..4b444482e 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/OpenId/WeChatOpenIdFinder.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/OpenId/WeChatOpenIdFinder.cs @@ -39,7 +39,7 @@ namespace LINGYUN.Abp.WeChat.OpenId Logger = NullLogger.Instance; } - public virtual async Task FindAsync(string appId) + public async virtual Task FindAsync(string appId) { if (!CurrentUser.IsAuthenticated) { @@ -51,14 +51,14 @@ namespace LINGYUN.Abp.WeChat.OpenId throw new AbpException("The wechat login session has expired. Use 'wx.login' result code to exchange the sessionKey"); } - public virtual async Task FindAsync(string code, string appId, string appSecret) + public async virtual Task FindAsync(string code, string appId, string appSecret) { // TODO: 如果需要获取SessionKey的话呢,需要再以openid作为标识来缓存一下吗 // 或者前端保存code,通过传递code来获取 return (await GetCacheItemAsync(code, appId, appSecret)).WeChatOpenId; } - protected virtual async Task GetCacheItemAsync(string code, string appId, string appSecret) + protected async virtual Task GetCacheItemAsync(string code, string appId, string appSecret) { var cacheKey = WeChatOpenIdCacheItem.CalculateCacheKey(appId, code); diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/Token/WeChatTokenProvider.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/Token/WeChatTokenProvider.cs index cdf9797d6..78663522e 100644 --- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/Token/WeChatTokenProvider.cs +++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat/LINGYUN/Abp/WeChat/Token/WeChatTokenProvider.cs @@ -27,7 +27,7 @@ namespace LINGYUN.Abp.WeChat.Token Logger = NullLogger.Instance; } - public virtual async Task GetTokenAsync( + public async virtual Task GetTokenAsync( string appId, string appSecret, CancellationToken cancellationToken = default) @@ -35,7 +35,7 @@ namespace LINGYUN.Abp.WeChat.Token return (await GetCacheItemAsync("WeChatToken", appId, appSecret, cancellationToken)).WeChatToken; } - protected virtual async Task GetCacheItemAsync( + protected async virtual Task GetCacheItemAsync( string provider, string appId, string appSecret, diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.DistributedLock/LINGYUN/Abp/WorkflowCore/DistributedLock/AbpDistributedLockProvider.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.DistributedLock/LINGYUN/Abp/WorkflowCore/DistributedLock/AbpDistributedLockProvider.cs index 1395a28b2..026bc12ea 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.DistributedLock/LINGYUN/Abp/WorkflowCore/DistributedLock/AbpDistributedLockProvider.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.DistributedLock/LINGYUN/Abp/WorkflowCore/DistributedLock/AbpDistributedLockProvider.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.WorkflowCore.DistributedLock _distributedLock = abpDistributedLock; } - public virtual async Task AcquireLock(string Id, CancellationToken cancellationToken) + public async virtual Task AcquireLock(string Id, CancellationToken cancellationToken) { var handle = await _distributedLock.TryAcquireAsync(Id, cancellationToken: cancellationToken); if (handle == null) @@ -37,7 +37,7 @@ namespace LINGYUN.Abp.WorkflowCore.DistributedLock return true; } - public virtual async Task ReleaseLock(string Id) + public async virtual Task ReleaseLock(string Id) { var cacheItem = _lockCache.Get(Id); if (cacheItem == null) diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/ElasticsearchPersistenceProvider.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/ElasticsearchPersistenceProvider.cs index 5a4a377c8..a313e84f1 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/ElasticsearchPersistenceProvider.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/ElasticsearchPersistenceProvider.cs @@ -41,7 +41,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch public bool SupportsScheduledCommands => true; - public virtual async Task ClearSubscriptionToken(string eventSubscriptionId, string token, CancellationToken cancellationToken = default) + public async virtual Task ClearSubscriptionToken(string eventSubscriptionId, string token, CancellationToken cancellationToken = default) { var id = Guid.Parse(eventSubscriptionId); @@ -72,7 +72,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - public virtual async Task CreateEvent(Event newEvent, CancellationToken cancellationToken = default) + public async virtual Task CreateEvent(Event newEvent, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -91,7 +91,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return newEvent.Id; } - public virtual async Task CreateEventSubscription(EventSubscription subscription, CancellationToken cancellationToken = default) + public async virtual Task CreateEventSubscription(EventSubscription subscription, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -110,7 +110,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return subscription.Id; } - public virtual async Task CreateNewWorkflow(WorkflowInstance workflow, CancellationToken cancellationToken = default) + public async virtual Task CreateNewWorkflow(WorkflowInstance workflow, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -134,7 +134,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch AsyncHelper.RunSync(async () => await _indexInitializer.InitializeAsync()); } - public virtual async Task GetEvent(string id, CancellationToken cancellationToken = default) + public async virtual Task GetEvent(string id, CancellationToken cancellationToken = default) { var eventId = Guid.Parse(id); @@ -150,7 +150,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Source; } - public virtual async Task> GetEvents(string eventName, string eventKey, DateTime asOf, CancellationToken cancellationToken = default) + public async virtual Task> GetEvents(string eventName, string eventKey, DateTime asOf, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -171,7 +171,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents.Select(x => x.Id); } - public virtual async Task GetFirstOpenSubscription(string eventName, string eventKey, DateTime asOf, CancellationToken cancellationToken = default) + public async virtual Task GetFirstOpenSubscription(string eventName, string eventKey, DateTime asOf, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -195,7 +195,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents.FirstOrDefault(); } - public virtual async Task> GetRunnableEvents(DateTime asAt, CancellationToken cancellationToken = default) + public async virtual Task> GetRunnableEvents(DateTime asAt, CancellationToken cancellationToken = default) { var client = CreateClient(); var now = asAt.ToUniversalTime(); @@ -216,7 +216,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents.Select(x => x.Id); } - public virtual async Task> GetRunnableInstances(DateTime asAt, CancellationToken cancellationToken = default) + public async virtual Task> GetRunnableInstances(DateTime asAt, CancellationToken cancellationToken = default) { var client = CreateClient(); var now = asAt.ToUniversalTime().Ticks; @@ -237,7 +237,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents.Select(x => x.Id); } - public virtual async Task GetSubscription(string eventSubscriptionId, CancellationToken cancellationToken = default) + public async virtual Task GetSubscription(string eventSubscriptionId, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -253,7 +253,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Source; } - public virtual async Task> GetSubscriptions(string eventName, string eventKey, DateTime asOf, CancellationToken cancellationToken = default) + public async virtual Task> GetSubscriptions(string eventName, string eventKey, DateTime asOf, CancellationToken cancellationToken = default) { var client = CreateClient(); var now = asOf.ToUniversalTime(); @@ -275,7 +275,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents; } - public virtual async Task GetWorkflowInstance(string Id, CancellationToken cancellationToken = default) + public async virtual Task GetWorkflowInstance(string Id, CancellationToken cancellationToken = default) { var workflowId = Guid.Parse(Id); var client = CreateClient(); @@ -290,7 +290,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Source; } - public virtual async Task> GetWorkflowInstances(WorkflowStatus? status, string type, DateTime? createdFrom, DateTime? createdTo, int skip, int take) + public async virtual Task> GetWorkflowInstances(WorkflowStatus? status, string type, DateTime? createdFrom, DateTime? createdTo, int skip, int take) { var client = CreateClient(); @@ -325,7 +325,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents; } - public virtual async Task> GetWorkflowInstances(IEnumerable ids, CancellationToken cancellationToken = default) + public async virtual Task> GetWorkflowInstances(IEnumerable ids, CancellationToken cancellationToken = default) { var client = CreateClient(); @@ -343,7 +343,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return response.Documents; } - public virtual async Task MarkEventProcessed(string id, CancellationToken cancellationToken = default) + public async virtual Task MarkEventProcessed(string id, CancellationToken cancellationToken = default) { var eventId = Guid.Parse(id); var indexName = CreateIndex(PersistenceIndexConsts.EventIndex); @@ -369,7 +369,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - public virtual async Task MarkEventUnprocessed(string id, CancellationToken cancellationToken = default) + public async virtual Task MarkEventUnprocessed(string id, CancellationToken cancellationToken = default) { var eventId = Guid.Parse(id); var indexName = CreateIndex(PersistenceIndexConsts.EventIndex); @@ -395,7 +395,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - public virtual async Task PersistErrors(IEnumerable errors, CancellationToken cancellationToken = default) + public async virtual Task PersistErrors(IEnumerable errors, CancellationToken cancellationToken = default) { var executionErrors = errors as ExecutionError[] ?? errors.ToArray(); if (executionErrors.Any()) @@ -411,7 +411,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - public virtual async Task PersistWorkflow(WorkflowInstance workflow, CancellationToken cancellationToken = default) + public async virtual Task PersistWorkflow(WorkflowInstance workflow, CancellationToken cancellationToken = default) { var workflowId = Guid.Parse(workflow.Id); var indexName = CreateIndex(PersistenceIndexConsts.WorkflowInstanceIndex); @@ -432,7 +432,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch ct: cancellationToken); } - public virtual async Task ProcessCommands(DateTimeOffset asOf, Func action, CancellationToken cancellationToken = default) + public async virtual Task ProcessCommands(DateTimeOffset asOf, Func action, CancellationToken cancellationToken = default) { var client = CreateClient(); var indexName = CreateIndex(PersistenceIndexConsts.ScheduledCommandIndex); @@ -467,7 +467,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - public virtual async Task ScheduleCommand(ScheduledCommand command) + public async virtual Task ScheduleCommand(ScheduledCommand command) { var persistedCommand = new PersistedScheduledCommand( _guidGenerator.Create(), @@ -484,7 +484,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch CheckResponse(response); } - public virtual async Task SetSubscriptionToken(string eventSubscriptionId, string token, string workerId, DateTime expiry, CancellationToken cancellationToken = default) + public async virtual Task SetSubscriptionToken(string eventSubscriptionId, string token, string workerId, DateTime expiry, CancellationToken cancellationToken = default) { var id = Guid.Parse(eventSubscriptionId); var indexName = CreateIndex(PersistenceIndexConsts.EventSubscriptionIndex); @@ -516,7 +516,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch return false; } - public virtual async Task TerminateSubscription(string eventSubscriptionId, CancellationToken cancellationToken = default) + public async virtual Task TerminateSubscription(string eventSubscriptionId, CancellationToken cancellationToken = default) { var id = Guid.Parse(eventSubscriptionId); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/PersistenceIndexInitializer.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/PersistenceIndexInitializer.cs index 63bcf5b15..ae8a21b3f 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/PersistenceIndexInitializer.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch/LINGYUN/Abp/WorkflowCore/Persistence/Elasticsearch/PersistenceIndexInitializer.cs @@ -35,7 +35,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch _logger = logger; } - public virtual async Task InitializeAsync() + public async virtual Task InitializeAsync() { var client = _clientFactory.Create(); var dateTimeFormat = !_jsonOptions.DefaultDateTimeFormat.IsNullOrWhiteSpace() @@ -53,7 +53,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch await InitlizeScheduledCommandIndex(client, indexState, dateTimeFormat); } - protected virtual async Task InitlizeWorkflowInstanceIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeWorkflowInstanceIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("instances"); var indexExists = await client.Indices.ExistsAsync(indexName); @@ -78,7 +78,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - protected virtual async Task InitlizeEventIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeEventIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("events"); var indexExists = await client.Indices.ExistsAsync(indexName); @@ -95,7 +95,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - protected virtual async Task InitlizeEventSubscriptionIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeEventSubscriptionIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("subscriptions"); var indexExists = await client.Indices.ExistsAsync(indexName); @@ -113,7 +113,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - protected virtual async Task InitlizeExecutionErrorIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeExecutionErrorIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("executionerrors"); var indexExists = await client.Indices.ExistsAsync(indexName); @@ -130,7 +130,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence.Elasticsearch } } - protected virtual async Task InitlizeScheduledCommandIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) + protected async virtual Task InitlizeScheduledCommandIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat) { var indexName = _nameNormalizer.NormalizeIndex("scheduledcommands"); var indexExists = await client.Indices.ExistsAsync(indexName); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowRepository.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowRepository.cs index bbc2f4b8a..5385d6ef0 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowRepository.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowRepository.cs @@ -18,7 +18,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence { } - public virtual async Task> GetListAsync( + public async virtual Task> GetListAsync( WorkflowStatus? status, string type, DateTime? createdFrom, @@ -36,7 +36,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence .ToListAsync(); } - public virtual async Task> GetOlderListAsync( + public async virtual Task> GetOlderListAsync( WorkflowStatus status, DateTime olderThan, bool includeDetails = false, diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowScheduledCommandRepository.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowScheduledCommandRepository.cs index 030a3ac0e..1ac4f1c39 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowScheduledCommandRepository.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/EfCoreWorkflowScheduledCommandRepository.cs @@ -14,7 +14,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence { } - public virtual async Task CheckExistsAsync( + public async virtual Task CheckExistsAsync( string name, string data, CancellationToken cancellationToken = default) diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPersistenceProvider.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPersistenceProvider.cs index 84b353c8c..377cc93aa 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPersistenceProvider.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPersistenceProvider.cs @@ -53,7 +53,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence Logger = NullLogger.Instance; } - public virtual async Task ClearSubscriptionToken( + public async virtual Task ClearSubscriptionToken( string eventSubscriptionId, string token, CancellationToken cancellationToken = default) @@ -69,7 +69,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence await _subscriptionRepository.UpdateAsync(existingEntity, cancellationToken: cancellationToken); } - public virtual async Task CreateEvent( + public async virtual Task CreateEvent( Event newEvent, CancellationToken cancellationToken = default) { @@ -82,7 +82,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return newEvent.Id; } - public virtual async Task CreateEventSubscription( + public async virtual Task CreateEventSubscription( EventSubscription subscription, CancellationToken cancellationToken = default) { @@ -95,7 +95,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return subscription.Id; } - public virtual async Task CreateNewWorkflow( + public async virtual Task CreateNewWorkflow( WorkflowInstance workflow, CancellationToken cancellationToken = default) { @@ -113,7 +113,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence // TODO: } - public virtual async Task GetEvent(string id, CancellationToken cancellationToken = default) + public async virtual Task GetEvent(string id, CancellationToken cancellationToken = default) { var eventId = Guid.Parse(id); @@ -122,7 +122,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflowEvent.ToEvent(); } - public virtual async Task> GetEvents( + public async virtual Task> GetEvents( string eventName, string eventKey, DateTime asOf, @@ -138,7 +138,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflowEventIds.Select(e => e.ToString()); } - public virtual async Task GetFirstOpenSubscription( + public async virtual Task GetFirstOpenSubscription( string eventName, string eventKey, DateTime asOf, @@ -152,7 +152,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflowEventSubscription?.ToEventSubscription(); } - public virtual async Task> GetRunnableEvents( + public async virtual Task> GetRunnableEvents( DateTime asAt, CancellationToken cancellationToken = default) { @@ -169,7 +169,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflowEventIdList.Select(e => e.ToString()); } - public virtual async Task> GetRunnableInstances( + public async virtual Task> GetRunnableInstances( DateTime asAt, CancellationToken cancellationToken = default) { @@ -184,7 +184,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflowIdList.Select(e => e.ToString()); } - public virtual async Task GetSubscription( + public async virtual Task GetSubscription( string eventSubscriptionId, CancellationToken cancellationToken = default) { @@ -194,7 +194,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return subscription?.ToEventSubscription(); } - public virtual async Task> GetSubscriptions( + public async virtual Task> GetSubscriptions( string eventName, string eventKey, DateTime asOf, @@ -209,7 +209,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return eventSubscriptions.Select(x => x.ToEventSubscription()); } - public virtual async Task GetWorkflowInstance( + public async virtual Task GetWorkflowInstance( string Id, CancellationToken cancellationToken = default) { @@ -222,7 +222,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflow?.ToWorkflowInstance(); } - public virtual async Task> GetWorkflowInstances( + public async virtual Task> GetWorkflowInstances( WorkflowStatus? status, string type, DateTime? createdFrom, @@ -235,7 +235,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflows.Select(x => x.ToWorkflowInstance()); } - public virtual async Task> GetWorkflowInstances( + public async virtual Task> GetWorkflowInstances( IEnumerable ids, CancellationToken cancellationToken = default) { @@ -249,7 +249,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return workflows.Select(x => x.ToWorkflowInstance()); } - public virtual async Task MarkEventProcessed(string id, CancellationToken cancellationToken = default) + public async virtual Task MarkEventProcessed(string id, CancellationToken cancellationToken = default) { var eventId = Guid.Parse(id); var workflowEvent = await _workflowEventRepository.GetAsync(eventId, cancellationToken: cancellationToken); @@ -259,7 +259,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence await _workflowEventRepository.UpdateAsync(workflowEvent, cancellationToken: cancellationToken); } - public virtual async Task MarkEventUnprocessed(string id, CancellationToken cancellationToken = default) + public async virtual Task MarkEventUnprocessed(string id, CancellationToken cancellationToken = default) { var eventId = Guid.Parse(id); var workflowEvent = await _workflowEventRepository.GetAsync(eventId, cancellationToken: cancellationToken); @@ -269,7 +269,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence await _workflowEventRepository.UpdateAsync(workflowEvent, cancellationToken: cancellationToken); } - public virtual async Task PersistErrors(IEnumerable errors, CancellationToken cancellationToken = default) + public async virtual Task PersistErrors(IEnumerable errors, CancellationToken cancellationToken = default) { if (errors.Any()) { @@ -279,7 +279,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence } } - public virtual async Task PersistWorkflow(WorkflowInstance workflow, CancellationToken cancellationToken = default) + public async virtual Task PersistWorkflow(WorkflowInstance workflow, CancellationToken cancellationToken = default) { if (!Guid.TryParse(workflow.Id, out Guid workflowId)) { @@ -301,7 +301,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence } } - public virtual async Task ProcessCommands( + public async virtual Task ProcessCommands( DateTimeOffset asOf, Func action, CancellationToken cancellationToken = default) @@ -327,7 +327,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence } } - public virtual async Task ScheduleCommand(ScheduledCommand command) + public async virtual Task ScheduleCommand(ScheduledCommand command) { if (!await _scheduledCommandRepository.CheckExistsAsync(command.CommandName, command.Data)) { @@ -337,7 +337,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence } } - public virtual async Task SetSubscriptionToken( + public async virtual Task SetSubscriptionToken( string eventSubscriptionId, string token, string workerId, @@ -355,7 +355,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence return true; } - public virtual async Task TerminateSubscription( + public async virtual Task TerminateSubscription( string eventSubscriptionId, CancellationToken cancellationToken = default) { diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPurger.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPurger.cs index d0c18904b..07c289191 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPurger.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence/LINGYUN/Abp/WorkflowCore/Persistence/AbpWorkflowPurger.cs @@ -15,7 +15,7 @@ namespace LINGYUN.Abp.WorkflowCore.Persistence _workflowRepository = workflowRepository; } - public virtual async Task PurgeWorkflows(WorkflowStatus status, DateTime olderThan) + public async virtual Task PurgeWorkflows(WorkflowStatus status, DateTime olderThan) { var olderThanUtc = olderThan.ToUniversalTime(); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.RabbitMQ/LINGYUN/Abp/WorkflowCore/RabbitMQ/AbpRabbitMqQueueProvider.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.RabbitMQ/LINGYUN/Abp/WorkflowCore/RabbitMQ/AbpRabbitMqQueueProvider.cs index 5bd6ed5ae..b2dafc441 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.RabbitMQ/LINGYUN/Abp/WorkflowCore/RabbitMQ/AbpRabbitMqQueueProvider.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.RabbitMQ/LINGYUN/Abp/WorkflowCore/RabbitMQ/AbpRabbitMqQueueProvider.cs @@ -68,7 +68,7 @@ namespace LINGYUN.Abp.WorkflowCore.RabbitMQ await QueueWorkAsync(id, queue); } - protected virtual async Task QueueWorkAsync(string id, QueueType queue) + protected async virtual Task QueueWorkAsync(string id, QueueType queue) { CheckDisposed(); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore/LINGYUN/Abp/WorkflowCore/AbpUnitOfWorkQueueProvider.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore/LINGYUN/Abp/WorkflowCore/AbpUnitOfWorkQueueProvider.cs index a70b64cb4..ead616bd6 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore/LINGYUN/Abp/WorkflowCore/AbpUnitOfWorkQueueProvider.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore/LINGYUN/Abp/WorkflowCore/AbpUnitOfWorkQueueProvider.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.WorkflowCore public bool IsDequeueBlocking => _queueProvider.IsDequeueBlocking; - public virtual async Task DequeueWork(QueueType queue, CancellationToken cancellationToken) + public async virtual Task DequeueWork(QueueType queue, CancellationToken cancellationToken) { if (_unitOfWorkManager.Current != null && !_unitOfWorkManager.Current.IsCompleted) { diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityAppService.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityAppService.cs index d8c921907..e9b3e2d00 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityAppService.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityAppService.cs @@ -14,12 +14,12 @@ namespace LINGYUN.Abp.WorkflowManagement.Activitys _controller = controller; } - public virtual async Task FailureAsync(ActivityFailureInput input) + public async virtual Task FailureAsync(ActivityFailureInput input) { await _controller.SubmitActivityFailure(input.Token, input.Result); } - public virtual async Task GetAsync(GetPendingActivityInput input) + public async virtual Task GetAsync(GetPendingActivityInput input) { var activity = await _controller.GetPendingActivity( input.ActivityName, input.WorkflowId, input.Timeout); @@ -27,12 +27,12 @@ namespace LINGYUN.Abp.WorkflowManagement.Activitys return ObjectMapper.Map(activity); } - public virtual async Task DeleteAsync(ActivityReleaseInput input) + public async virtual Task DeleteAsync(ActivityReleaseInput input) { await _controller.ReleaseActivityToken(input.Token); } - public virtual async Task SuccessAsync(ActivitySuccessInput input) + public async virtual Task SuccessAsync(ActivitySuccessInput input) { await _controller.SubmitActivitySuccess(input.Token, input.Result); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Engine/EngineAppService.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Engine/EngineAppService.cs index 0a2cc6bbf..b03f96fa9 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Engine/EngineAppService.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Engine/EngineAppService.cs @@ -19,13 +19,13 @@ namespace LINGYUN.Abp.WorkflowManagement.Engine } [Authorize(WorkflowManagementPermissions.Engine.Initialize)] - public virtual async Task InitializeAsync() + public async virtual Task InitializeAsync() { await _engineManager.InitializeAsync(); } [Authorize(WorkflowManagementPermissions.Engine.Register)] - public virtual async Task RegisterAsync() + public async virtual Task RegisterAsync() { // 暂时没有解决多租户自动注册工作流,管理员可以通过api主动注册 await _registryManager.RegisterAsync(); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Events/EventAppService.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Events/EventAppService.cs index dd3931881..135ec1a01 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Events/EventAppService.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Events/EventAppService.cs @@ -14,7 +14,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Events _controller = controller; } - public virtual async Task PublishAsync(EventPublishInput input) + public async virtual Task PublishAsync(EventPublishInput input) { await _controller.PublishEvent(input.EventName, input.EventKey, input.EventData, input.EffectiveDate); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowAppService.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowAppService.cs index 8bbb98c6d..eeda9de47 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowAppService.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowAppService.cs @@ -28,14 +28,14 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows _workflowRepository = workflowRepository; } - public virtual async Task GetAsync(string id) + public async virtual Task GetAsync(string id) { var workflow = await _persistence.GetWorkflowInstance(id); return ObjectMapper.Map(workflow); } - public virtual async Task ResumeAsync(string id) + public async virtual Task ResumeAsync(string id) { var result = await _controller.ResumeWorkflow(id); if (!result) @@ -46,7 +46,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows } } - public virtual async Task StartAsync(Guid id, WorkflowStartInput input) + public async virtual Task StartAsync(Guid id, WorkflowStartInput input) { var workflowDef = await _workflowRepository.GetAsync(id); @@ -98,7 +98,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows return ObjectMapper.Map(result); } - public virtual async Task SuspendAsync(string id) + public async virtual Task SuspendAsync(string id) { var result = await _controller.SuspendWorkflow(id); if (!result) @@ -109,7 +109,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows } } - public virtual async Task TerminateAsync(string id) + public async virtual Task TerminateAsync(string id) { var result = await _controller.TerminateWorkflow(id); if (!result) diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionAppService.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionAppService.cs index 8a986411d..9eb6a9415 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionAppService.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Application/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionAppService.cs @@ -29,7 +29,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows } [Authorize(WorkflowManagementPermissions.WorkflowDef.Create)] - public virtual async Task CreateAsync(WorkflowDefinitionCreateDto input) + public async virtual Task CreateAsync(WorkflowDefinitionCreateDto input) { if (await _workflowRepository.CheckVersionAsync(input.Name, input.Version)) { @@ -120,7 +120,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows } [Authorize(WorkflowManagementPermissions.WorkflowDef.Delete)] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { var workflowDef = await _workflowRepository.GetAsync(id); var stepDefNodes = await _stepNodeRepository.GetAllChildrenWithWorkflowAsync(workflowDef.Id); @@ -133,7 +133,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows _workflowManager.UnRegister(workflowDef); } - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { var workflowDef = await _workflowRepository.GetAsync(id); var stepDefNodes = await _stepNodeRepository.GetAllChildrenWithWorkflowAsync(workflowDef.Id); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Domain/LINGYUN/Abp/WorkflowManagement/WorkflowRegistryManager.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Domain/LINGYUN/Abp/WorkflowManagement/WorkflowRegistryManager.cs index c49cc0b6c..dcc90e9a9 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Domain/LINGYUN/Abp/WorkflowManagement/WorkflowRegistryManager.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.Domain/LINGYUN/Abp/WorkflowManagement/WorkflowRegistryManager.cs @@ -24,7 +24,7 @@ namespace LINGYUN.Abp.WorkflowManagement _compensateNodeRepository = compensateNodeRepository; } - public virtual async Task RegisterAsync(CancellationToken cancellationToken = default) + public async virtual Task RegisterAsync(CancellationToken cancellationToken = default) { // TODO: 多租户如何注册? diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreCompensateNodeRepository.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreCompensateNodeRepository.cs index 6c5e69367..8da4baa1c 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreCompensateNodeRepository.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreCompensateNodeRepository.cs @@ -17,7 +17,7 @@ namespace LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore { } - public virtual async Task> GetAllChildrenWithWorkflowAsync(Guid workflowId, CancellationToken cancellationToken = default) + public async virtual Task> GetAllChildrenWithWorkflowAsync(Guid workflowId, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Where(x => x.WorkflowId.Equals(workflowId)) diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreStepNodeRepository.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreStepNodeRepository.cs index 96c3d43ea..96f0281c8 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreStepNodeRepository.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreStepNodeRepository.cs @@ -17,7 +17,7 @@ namespace LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore { } - public virtual async Task> GetAllChildrenWithWorkflowAsync(Guid workflowId, CancellationToken cancellationToken = default) + public async virtual Task> GetAllChildrenWithWorkflowAsync(Guid workflowId, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .Where(x => x.WorkflowId.Equals(workflowId)) diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreWorkflowRepository.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreWorkflowRepository.cs index e26001568..1b71c1ca2 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreWorkflowRepository.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore/LINGYUN/Abp/WorkflowManagement/EntityFrameworkCore/EfCoreWorkflowRepository.cs @@ -16,7 +16,7 @@ namespace LINGYUN.Abp.WorkflowManagement.EntityFrameworkCore { } - public virtual async Task CheckVersionAsync(string name, int version, CancellationToken cancellationToken = default) + public async virtual Task CheckVersionAsync(string name, int version, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) .AnyAsync(x => x.Name.Equals(name) && x.Version == version, diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityController.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityController.cs index 12e81bc2a..962ae46e8 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityController.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Activitys/ActivityController.cs @@ -18,25 +18,25 @@ namespace LINGYUN.Abp.WorkflowManagement.Activitys } [HttpPost("fail/{token}")] - public virtual async Task FailureAsync(ActivityFailureInput input) + public async virtual Task FailureAsync(ActivityFailureInput input) { await _service.FailureAsync(input); } [HttpGet("{ActivityName}")] - public virtual async Task GetAsync(GetPendingActivityInput input) + public async virtual Task GetAsync(GetPendingActivityInput input) { return await _service.GetAsync(input); } [HttpDelete("{Token}")] - public virtual async Task DeleteAsync(ActivityReleaseInput input) + public async virtual Task DeleteAsync(ActivityReleaseInput input) { await _service.DeleteAsync(input); } [HttpPost("success/{Token}")] - public virtual async Task SuccessAsync(ActivitySuccessInput input) + public async virtual Task SuccessAsync(ActivitySuccessInput input) { await _service.SuccessAsync(input); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Engine/EngineController.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Engine/EngineController.cs index cf6c9727c..1003a7daa 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Engine/EngineController.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Engine/EngineController.cs @@ -19,14 +19,14 @@ namespace LINGYUN.Abp.WorkflowManagement.Engine [HttpPost] [Route("initialize")] - public virtual async Task InitializeAsync() + public async virtual Task InitializeAsync() { await _service.InitializeAsync(); } [HttpPost] [Route("register")] - public virtual async Task RegisterAsync() + public async virtual Task RegisterAsync() { await _service.RegisterAsync(); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Events/EventController.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Events/EventController.cs index fc3ef545f..359ce2c8c 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Events/EventController.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Events/EventController.cs @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.WorkflowManagement.Events [HttpPost] [Route("{EventName}/{EventKey}")] - public virtual async Task PublishAsync(EventPublishInput input) + public async virtual Task PublishAsync(EventPublishInput input) { await _service.PublishAsync(input); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowController.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowController.cs index 8fd0656ca..d0a53c307 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowController.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowController.cs @@ -20,35 +20,35 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(string id) + public async virtual Task GetAsync(string id) { return await _service.GetAsync(id); } [HttpPut] [Route("{id}/resume")] - public virtual async Task ResumeAsync(string id) + public async virtual Task ResumeAsync(string id) { await _service.ResumeAsync(id); } [HttpPost] [Route("{id}/start")] - public virtual async Task StartAsync(Guid id, WorkflowStartInput input) + public async virtual Task StartAsync(Guid id, WorkflowStartInput input) { return await _service.StartAsync(id, input); } [HttpPut] [Route("{id}/suspend")] - public virtual async Task SuspendAsync(string id) + public async virtual Task SuspendAsync(string id) { await _service.SuspendAsync(id); } [HttpPut] [Route("{id}/terminate")] - public virtual async Task TerminateAsync(string id) + public async virtual Task TerminateAsync(string id) { await _service.TerminateAsync(id); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionController.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionController.cs index fd467ab09..505e470d4 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionController.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.HttpApi/LINGYUN/Abp/WorkflowManagement/Workflows/WorkflowDefinitionController.cs @@ -20,21 +20,21 @@ namespace LINGYUN.Abp.WorkflowManagement.Workflows } [HttpPost] - public virtual async Task CreateAsync(WorkflowDefinitionCreateDto input) + public async virtual Task CreateAsync(WorkflowDefinitionCreateDto input) { return await _service.CreateAsync(input); } [HttpDelete] [Route("{id}")] - public virtual async Task DeleteAsync(Guid id) + public async virtual Task DeleteAsync(Guid id) { await _service.DeleteAsync(id); } [HttpGet] [Route("{id}")] - public virtual async Task GetAsync(Guid id) + public async virtual Task GetAsync(Guid id) { return await _service.GetAsync(id); } diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingAppService.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingAppService.cs index 50aa31f04..0bcfb1f0a 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingAppService.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingAppService.cs @@ -29,12 +29,12 @@ namespace LINGYUN.Abp.WorkflowManagement.SettingManagement LocalizationResource = typeof(WorkflowManagementResource); } - public virtual async Task> GetAllForCurrentTenantAsync() + public async virtual Task> GetAllForCurrentTenantAsync() { return await GetAllForProviderAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString()); } - public virtual async Task SetCurrentTenantAsync(UpdateSettingsDto input) + public async virtual Task SetCurrentTenantAsync(UpdateSettingsDto input) { // 增加特性检查 await CheckFeatureAsync(); @@ -50,12 +50,12 @@ namespace LINGYUN.Abp.WorkflowManagement.SettingManagement } } - protected virtual async Task CheckFeatureAsync() + protected async virtual Task CheckFeatureAsync() { await FeatureChecker.CheckEnabledAsync(SettingManagementFeatures.Enable); } - protected virtual async Task> GetAllForProviderAsync(string providerName, string providerKey) + protected async virtual Task> GetAllForProviderAsync(string providerName, string providerKey) { var settingGroups = new List(); diff --git a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingController.cs b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingController.cs index ed7f05c8c..ff3617a36 100644 --- a/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingController.cs +++ b/aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowManagement.SettingManagement/LINGYUN/Abp/WorkflowManagement/SettingManagement/SettingController.cs @@ -20,27 +20,27 @@ namespace LINGYUN.Abp.WorkflowManagement.SettingManagement } [HttpPut] - public virtual async Task SetCurrentTenantAsync(UpdateSettingsDto input) + public async virtual Task SetCurrentTenantAsync(UpdateSettingsDto input) { await _settingAppService.SetCurrentTenantAsync(input); } [HttpGet] - public virtual async Task> GetAllForCurrentTenantAsync() + public async virtual Task> GetAllForCurrentTenantAsync() { return await _settingAppService.GetAllForCurrentTenantAsync(); } [HttpPost] [Route("by-global")] - public virtual async Task SetGlobalAsync(UpdateSettingsDto input) + public async virtual Task SetGlobalAsync(UpdateSettingsDto input) { await _settingAppService.SetGlobalAsync(input); } [HttpGet] [Route("by-global")] - public virtual async Task> GetAllForGlobalAsync() + public async virtual Task> GetAllForGlobalAsync() { return await _settingAppService.GetAllForGlobalAsync(); } diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index 6e5feab9b..370aa58be 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -43,7 +43,7 @@ public class TenantSynchronizer : /// /// /// - public virtual async Task HandleEventAsync(CreateEventData eventData) + public async virtual Task HandleEventAsync(CreateEventData eventData) { using (var unitOfWork = UnitOfWorkManager.Begin()) { diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Local/UserCreateJoinIMEventHandler.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Local/UserCreateJoinIMEventHandler.cs index 417d24697..c27b125da 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Local/UserCreateJoinIMEventHandler.cs +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Local/UserCreateJoinIMEventHandler.cs @@ -27,19 +27,19 @@ namespace LY.MicroService.RealtimeMessage.EventBus.Distributed /// /// [UnitOfWork] - public virtual async Task HandleEventAsync(EntityCreatedEventData eventData) + public async virtual Task HandleEventAsync(EntityCreatedEventData eventData) { await SeedChatDataAsync(eventData.Entity); await SeedUserSubscriptionNotifiersAsync(eventData.Entity); } - protected virtual async Task SeedChatDataAsync(IUserData user) + protected async virtual Task SeedChatDataAsync(IUserData user) { await _chatDataSeeder.SeedAsync(user); } - protected virtual async Task SeedUserSubscriptionNotifiersAsync(IUserData user) + protected async virtual Task SeedUserSubscriptionNotifiersAsync(IUserData user) { var userIdentifier = new UserIdentifier(user.Id, user.UserName); diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index ded6862ab..216f2909c 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -43,7 +43,7 @@ public class TenantSynchronizer : /// /// /// - public virtual async Task HandleEventAsync(CreateEventData eventData) + public async virtual Task HandleEventAsync(CreateEventData eventData) { using (var unitOfWork = UnitOfWorkManager.Begin()) { diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index 1843e2f48..0a3adebbe 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -42,7 +42,7 @@ public class TenantSynchronizer : /// /// /// - public virtual async Task HandleEventAsync(CreateEventData eventData) + public async virtual Task HandleEventAsync(CreateEventData eventData) { using (var unitOfWork = UnitOfWorkManager.Begin()) { diff --git a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs index 5035cec86..6b094ea32 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs @@ -63,7 +63,7 @@ public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransien } [UnitOfWork] - public virtual async Task SeedAsync(DataSeedContext context) + public async virtual Task SeedAsync(DataSeedContext context) { using (_currentTenant.Change(context?.TenantId)) { diff --git a/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/SendCode.cshtml.cs b/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/SendCode.cshtml.cs index 9434bc02c..ed8c6efc4 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/SendCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/SendCode.cshtml.cs @@ -45,7 +45,7 @@ namespace LY.MicroService.IdentityServer.Pages.Account LocalizationResourceType = typeof(AccountResource); } - public virtual async Task OnGetAsync() + public async virtual Task OnGetAsync() { Input = new SendCodeInputModel(); @@ -62,7 +62,7 @@ namespace LY.MicroService.IdentityServer.Pages.Account return Page(); } - public virtual async Task OnPostAsync() + public async virtual Task OnPostAsync() { var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); if (user == null) diff --git a/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs b/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs index 14cc42afb..de98773a0 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs @@ -32,7 +32,7 @@ namespace LY.MicroService.IdentityServer.Pages.Account return Page(); } - public virtual async Task OnPostAsync() + public async virtual Task OnPostAsync() { var result = await SignInManager.TwoFactorAuthenticatorSignInAsync(Input.VerifyCode, RememberMe, RememberBrowser); if (result.Succeeded) diff --git a/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyCode.cshtml.cs b/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyCode.cshtml.cs index f272da457..f1f29d1e0 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/Pages/Account/VerifyCode.cshtml.cs @@ -48,7 +48,7 @@ namespace LY.MicroService.IdentityServer.Pages.Account return Page(); } - public virtual async Task OnPostAsync() + public async virtual Task OnPostAsync() { // ֤û¼״̬ var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); diff --git a/aspnet-core/tests/LINGYUN.Abp.AspNetCore.Tests/LINGYUN/Abp/AspNetCore/AbpAspNetCoreTestBase.cs b/aspnet-core/tests/LINGYUN.Abp.AspNetCore.Tests/LINGYUN/Abp/AspNetCore/AbpAspNetCoreTestBase.cs index de60e70c2..6ff2fcc1c 100644 --- a/aspnet-core/tests/LINGYUN.Abp.AspNetCore.Tests/LINGYUN/Abp/AspNetCore/AbpAspNetCoreTestBase.cs +++ b/aspnet-core/tests/LINGYUN.Abp.AspNetCore.Tests/LINGYUN/Abp/AspNetCore/AbpAspNetCoreTestBase.cs @@ -26,13 +26,13 @@ namespace LINGYUN.Abp.AspNetCore RequestHeaders = new Dictionary(); } - protected virtual async Task GetResponseAsObjectAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false, HttpMethod method = null) + protected async virtual Task GetResponseAsObjectAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false, HttpMethod method = null) { var strResponse = await GetResponseAsStringAsync(url, expectedStatusCode, xmlHttpRequest, method); return JsonSerializer.Deserialize(strResponse, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); } - protected virtual async Task GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false, HttpMethod method = null) + protected async virtual Task GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false, HttpMethod method = null) { using (var response = await GetResponseAsync(url, expectedStatusCode, xmlHttpRequest, method)) { @@ -40,7 +40,7 @@ namespace LINGYUN.Abp.AspNetCore } } - protected virtual async Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false, HttpMethod method = null) + protected async virtual Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false, HttpMethod method = null) { using (var requestMessage = new HttpRequestMessage(method ?? HttpMethod.Get, url)) { diff --git a/aspnet-core/tests/LINGYUN.Abp.AuditLogging.Elasticsearch.Tests/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogManagerTests.cs b/aspnet-core/tests/LINGYUN.Abp.AuditLogging.Elasticsearch.Tests/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogManagerTests.cs index f96e0c5dd..507d0f13d 100644 --- a/aspnet-core/tests/LINGYUN.Abp.AuditLogging.Elasticsearch.Tests/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogManagerTests.cs +++ b/aspnet-core/tests/LINGYUN.Abp.AuditLogging.Elasticsearch.Tests/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogManagerTests.cs @@ -76,7 +76,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch logs[0].ApplicationName.ShouldBe("_app_5"); } - protected virtual async Task> MockcAsync(int count) + protected async virtual Task> MockcAsync(int count) { var mock = new AutoMocker(); diff --git a/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/BlobContainer_Tests.cs b/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/BlobContainer_Tests.cs index b28628fc2..80dfa5e15 100644 --- a/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/BlobContainer_Tests.cs +++ b/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/BlobContainer_Tests.cs @@ -87,7 +87,7 @@ namespace LINGYUN.Abp.BlobStoring.Aliyun [InlineData("test-blob-1")] [InlineData("test-blob-1.txt")] [InlineData("test-folder/test-blob-1")] - public virtual async Task Saved_Blobs_Should_Exists(string blobName) + public async virtual Task Saved_Blobs_Should_Exists(string blobName) { await Container.SaveAsync(blobName, "test content".GetBytes()); (await Container.ExistsAsync(blobName)).ShouldBeTrue(); diff --git a/aspnet-core/tests/LINGYUN.Abp.Dapr.AspNetCore.TestHost/LINGYUN/Abp/Dapr/Actors/TestActor.cs b/aspnet-core/tests/LINGYUN.Abp.Dapr.AspNetCore.TestHost/LINGYUN/Abp/Dapr/Actors/TestActor.cs index 17584125a..e93ca4af5 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Dapr.AspNetCore.TestHost/LINGYUN/Abp/Dapr/Actors/TestActor.cs +++ b/aspnet-core/tests/LINGYUN.Abp.Dapr.AspNetCore.TestHost/LINGYUN/Abp/Dapr/Actors/TestActor.cs @@ -43,7 +43,7 @@ namespace LINGYUN.Abp.Dapr.Actors await StateManager.TryRemoveStateAsync("test:actors"); } - protected virtual async Task> GetValuesByStateAsync() + protected async virtual Task> GetValuesByStateAsync() { return await StateManager .GetOrAddStateAsync( diff --git a/aspnet-core/tests/LINGYUN.Abp.Dapr.Client.Tests/ClientProxies/TestClientProxy.Generated.cs b/aspnet-core/tests/LINGYUN.Abp.Dapr.Client.Tests/ClientProxies/TestClientProxy.Generated.cs index 1e9d70f80..819b80b90 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Dapr.Client.Tests/ClientProxies/TestClientProxy.Generated.cs +++ b/aspnet-core/tests/LINGYUN.Abp.Dapr.Client.Tests/ClientProxies/TestClientProxy.Generated.cs @@ -22,12 +22,12 @@ namespace LINGYUN.Abp.Dapr.ServiceInvocation.ClientProxies; [ExposeServices(typeof(ITestAppService), typeof(TestClientProxy))] public partial class TestClientProxy : DaprClientProxyBase, ITestAppService { - public virtual async Task> GetAsync() + public async virtual Task> GetAsync() { return await RequestAsync>(nameof(GetAsync)); } - public virtual async Task UpdateAsync(int inctement) + public async virtual Task UpdateAsync(int inctement) { return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue { @@ -35,7 +35,7 @@ public partial class TestClientProxy : DaprClientProxyBase, ITe }); } - public virtual async Task GetWrapedAsync(string name) + public async virtual Task GetWrapedAsync(string name) { return await RequestAsync(nameof(GetWrapedAsync), new ClientProxyRequestTypeValue { diff --git a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/ProtectionFieldTests.cs b/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/ProtectionFieldTests.cs index 6bc1c83c8..7a3bcf8fd 100644 --- a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/ProtectionFieldTests.cs +++ b/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/ProtectionFieldTests.cs @@ -22,7 +22,7 @@ namespace LINGYUN.Abp.DataProtection } [Fact] - public virtual async Task FakeAsync() + public async virtual Task FakeAsync() { var values = new List() diff --git a/aspnet-core/tests/LINGYUN.Abp.Features.LimitValidation.Redis.Tests/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureCheckerTests.cs b/aspnet-core/tests/LINGYUN.Abp.Features.LimitValidation.Redis.Tests/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureCheckerTests.cs index f3cdecd8c..dd77418d9 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Features.LimitValidation.Redis.Tests/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureCheckerTests.cs +++ b/aspnet-core/tests/LINGYUN.Abp.Features.LimitValidation.Redis.Tests/LINGYUN/Abp/Features/LimitValidation/Redis/RedisRequiresLimitFeatureCheckerTests.cs @@ -19,21 +19,21 @@ namespace LINGYUN.Abp.Features.LimitValidation.Redis } [Fact] - public virtual async Task Check_Test_Async() + public async virtual Task Check_Test_Async() { var context = new RequiresLimitFeatureContext(TestFeatureNames.TestLimitFeature, Options, LimitPolicy.Minute); await RequiresLimitFeatureChecker.CheckAsync(context); } [Fact] - public virtual async Task Process_Test_Async() + public async virtual Task Process_Test_Async() { var context = new RequiresLimitFeatureContext(TestFeatureNames.TestLimitFeature, Options, LimitPolicy.Minute); await RequiresLimitFeatureChecker.ProcessAsync(context); } [Fact] - public virtual async Task Check_Limit_Test_Async() + public async virtual Task Check_Limit_Test_Async() { var context = new RequiresLimitFeatureContext(TestFeatureNames.TestLimitFeature, Options, LimitPolicy.Minute, 1 ,5); await RequiresLimitFeatureChecker.ProcessAsync(context); diff --git a/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN/Abp/Tests/AbpTestsBase.cs b/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN/Abp/Tests/AbpTestsBase.cs index a1b467558..bf9203b9e 100644 --- a/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN/Abp/Tests/AbpTestsBase.cs +++ b/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN/Abp/Tests/AbpTestsBase.cs @@ -21,7 +21,7 @@ namespace LINGYUN.Abp.Tests return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); } - protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + protected async virtual Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) { using (var scope = ServiceProvider.CreateScope()) { @@ -41,7 +41,7 @@ namespace LINGYUN.Abp.Tests return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); } - protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + protected async virtual Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) { using (var scope = ServiceProvider.CreateScope()) {