Change override async to async override

pull/5967/head
liangshiwei 5 years ago
parent a4ee9f2c7b
commit ce050cd71c

@ -342,12 +342,12 @@ public class DistrictAppService
{
}
protected override async Task DeleteByIdAsync(DistrictKey id)
protected async override Task DeleteByIdAsync(DistrictKey id)
{
await Repository.DeleteAsync(d => d.CityId == id.CityId && d.Name == id.Name);
}
protected override async Task<District> GetEntityByIdAsync(DistrictKey id)
protected async override Task<District> GetEntityByIdAsync(DistrictKey id)
{
return await AsyncQueryableExecuter.FirstOrDefaultAsync(
Repository.Where(d => d.CityId == id.CityId && d.Name == id.Name)
@ -400,7 +400,7 @@ public class MyPeopleAppService : CrudAppService<Person, PersonDto, Guid>
{
}
protected override async Task CheckDeletePolicyAsync()
protected async override Task CheckDeletePolicyAsync()
{
await AuthorizationService.CheckAsync("...");
}

@ -54,7 +54,7 @@ public class PassiveUserCheckerWorker : AsyncPeriodicBackgroundWorkerBase
Timer.Period = 600000; //10 minutes
}
protected override async Task DoWorkAsync(
protected async override Task DoWorkAsync(
PeriodicBackgroundWorkerContext workerContext)
{
Logger.LogInformation("Starting: Setting status of inactive users...");

@ -1100,7 +1100,7 @@ The final `@code` block should be the following:
//ADDED A NEW FIELD
IReadOnlyList<AuthorLookupDto> authorList = Array.Empty<AuthorLookupDto>();
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
await base.OnInitializedAsync();

@ -487,7 +487,7 @@ Add the following code block to the end of the `Books.razor` file:
bool canEditBook;
bool canDeleteBook;
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
await base.OnInitializedAsync();

@ -1038,7 +1038,7 @@ namespace Acme.BookStore.Blazor.Pages
EditingAuthor = new UpdateAuthorDto();
}
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
await SetPermissionsAsync();
await GetAuthorsAsync();

@ -353,12 +353,12 @@ public class DistrictAppService
{
}
protected override async Task DeleteByIdAsync(DistrictKey id)
protected async override Task DeleteByIdAsync(DistrictKey id)
{
await Repository.DeleteAsync(d => d.CityId == id.CityId && d.Name == id.Name);
}
protected override async Task<District> GetEntityByIdAsync(DistrictKey id)
protected async override Task<District> GetEntityByIdAsync(DistrictKey id)
{
return await AsyncQueryableExecuter.FirstOrDefaultAsync(
Repository.Where(d => d.CityId == id.CityId && d.Name == id.Name)

@ -54,7 +54,7 @@ public class PassiveUserCheckerWorker : AsyncPeriodicBackgroundWorkerBase
Timer.Period = 600000; //10 minutes
}
protected override async Task DoWorkAsync(
protected async override Task DoWorkAsync(
PeriodicBackgroundWorkerContext workerContext)
{
Logger.LogInformation("Starting: Setting status of inactive users...");

@ -21,7 +21,7 @@
private IReadOnlyList<LanguageInfo> _otherLanguages;
private LanguageInfo _currentLanguage;
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
var selectedLanguageName = await JsRuntime.InvokeAsync<string>(
"localStorage.getItem",

@ -26,7 +26,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic
protected string ServerUrl { get; set; }
protected string ServerAccountUrl { get; set; }
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
Menu = await MenuManager.GetAsync(StandardMenus.User);

@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic
private List<RenderFragment> ToolbarItemRenders { get; set; } = new List<RenderFragment>();
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
var toolbar = await ToolbarManager.GetAsync(StandardToolbars.Main);

@ -38,7 +38,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
);
}
protected override async Task<IReadOnlyList<string>> GetBundleFilesAsync(string bundleName)
protected async override Task<IReadOnlyList<string>> GetBundleFilesAsync(string bundleName)
{
return await BundleManager.GetScriptBundleFilesAsync(bundleName);
}

@ -38,7 +38,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
);
}
protected override async Task<IReadOnlyList<string>> GetBundleFilesAsync(string bundleName)
protected async override Task<IReadOnlyList<string>> GetBundleFilesAsync(string bundleName)
{
return await BundleManager.GetStyleBundleFilesAsync(bundleName);
}

@ -48,7 +48,7 @@ namespace Volo.Abp.AspNetCore.SecurityLog
WebClientInfoProvider = webClientInfoProvider;
}
protected override async Task<SecurityLogInfo> CreateAsync()
protected async override Task<SecurityLogInfo> CreateAsync()
{
var securityLogInfo = await base.CreateAsync();

@ -13,7 +13,7 @@ namespace Volo.Abp.Authorization
_permissionChecker = permissionChecker;
}
protected override async Task HandleRequirementAsync(
protected async override Task HandleRequirementAsync(
AuthorizationHandlerContext context,
PermissionRequirement requirement)
{

@ -30,7 +30,7 @@ namespace Volo.Abp.BackgroundJobs
Timer.Period = WorkerOptions.JobPollPeriod;
}
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
protected async override Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
var store = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobStore>();

@ -202,7 +202,7 @@ namespace Volo.Abp.BlazoriseUI
EditingEntity = new TUpdateViewModel();
}
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
await SetBreadcrumbItemsAsync();
await SetPermissionsAsync();

@ -15,14 +15,14 @@ namespace Volo.Abp.Castle.DynamicProxy
_abpInterceptor = abpInterceptor;
}
protected override async Task InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed)
protected async override Task InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task> proceed)
{
await _abpInterceptor.InterceptAsync(
new CastleAbpMethodInvocationAdapter(invocation, proceedInfo, proceed)
);
}
protected override async Task<TResult> InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed)
protected async override Task<TResult> InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed)
{
var adapter = new CastleAbpMethodInvocationAdapterWithReturnValue<TResult>(invocation, proceedInfo, proceed);

@ -80,12 +80,12 @@ namespace Volo.Abp.Application.Services
Repository = repository;
}
protected override async Task DeleteByIdAsync(TKey id)
protected async override Task DeleteByIdAsync(TKey id)
{
await Repository.DeleteAsync(id);
}
protected override async Task<TEntity> GetEntityByIdAsync(TKey id)
protected async override Task<TEntity> GetEntityByIdAsync(TKey id)
{
return await Repository.GetAsync(id);
}

@ -46,7 +46,7 @@ namespace Volo.Abp.Application.Services
Repository = repository;
}
protected override async Task<TEntity> GetEntityByIdAsync(TKey id)
protected async override Task<TEntity> GetEntityByIdAsync(TKey id)
{
return await Repository.GetAsync(id);
}

@ -67,7 +67,7 @@ namespace Volo.Abp.Emailing.Smtp
}
}
protected override async Task SendEmailAsync(MailMessage mail)
protected async override Task SendEmailAsync(MailMessage mail)
{
using (var smtpClient = await BuildClientAsync())
{

@ -28,7 +28,7 @@ namespace Volo.Abp.MailKit
SmtpConfiguration = smtpConfiguration;
}
protected override async Task SendEmailAsync(MailMessage mail)
protected async override Task SendEmailAsync(MailMessage mail)
{
using (var client = await BuildClientAsync())
{

@ -15,12 +15,12 @@ namespace Volo.Abp.TestApp.Application
{
}
protected override async Task DeleteByIdAsync(DistrictKey id)
protected async override Task DeleteByIdAsync(DistrictKey id)
{
await Repository.DeleteAsync(d => d.CityId == id.CityId && d.Name == id.Name);
}
protected override async Task<District> GetEntityByIdAsync(DistrictKey id)
protected async override Task<District> GetEntityByIdAsync(DistrictKey id)
{
return await AsyncExecuter.FirstOrDefaultAsync(
Repository.Where(d => d.CityId == id.CityId && d.Name == id.Name)

@ -28,7 +28,7 @@ namespace Volo.Abp.Account.Blazor.Pages.Account
protected PersonalInfoModel PersonalInfoModel;
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
await GetUserInformations();
}

@ -15,7 +15,7 @@ namespace Volo.Blogging.Comments
_permissionChecker = permissionChecker;
}
protected override async Task HandleRequirementAsync(
protected async override Task HandleRequirementAsync(
AuthorizationHandlerContext context,
OperationAuthorizationRequirement requirement,
Comment resource)

@ -15,7 +15,7 @@ namespace Volo.Blogging.Posts
_permissionChecker = permissionChecker;
}
protected override async Task HandleRequirementAsync(
protected async override Task HandleRequirementAsync(
AuthorizationHandlerContext context,
OperationAuthorizationRequirement requirement,
Post resource)

@ -27,7 +27,7 @@ namespace Volo.Abp.Identity.Blazor.Pages.Identity
DeletePolicyName = IdentityPermissions.Roles.Delete;
}
protected override async Task SetPermissionsAsync()
protected async override Task SetPermissionsAsync()
{
await base.SetPermissionsAsync();

@ -40,14 +40,14 @@ namespace Volo.Abp.Identity.Blazor.Pages.Identity
DeletePolicyName = IdentityPermissions.Users.Delete;
}
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
await base.OnInitializedAsync();
Roles = (await AppService.GetAssignableRolesAsync()).Items;
}
protected override async Task SetPermissionsAsync()
protected async override Task SetPermissionsAsync()
{
await base.SetPermissionsAsync();
@ -80,7 +80,7 @@ namespace Volo.Abp.Identity.Blazor.Pages.Identity
return base.CreateEntityAsync();
}
protected override async Task OpenEditModalAsync(Guid id)
protected async override Task OpenEditModalAsync(Guid id)
{
EditModalSelectedTab = DefaultSelectedTab;

@ -22,7 +22,7 @@ namespace Volo.Abp.IdentityServer.Tokens
timer.Period = Options.CleanupPeriod;
}
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
protected async override Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
await workerContext
.ServiceProvider

@ -29,7 +29,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement
protected string SelectedGroup;
protected List<BreadcrumbItem> BreadcrumbItems = new List<BreadcrumbItem>();
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
SettingComponentCreationContext = new SettingComponentCreationContext(ServiceProvider);

@ -33,7 +33,7 @@ namespace Volo.Abp.TenantManagement.Blazor.Pages.TenantManagement
TenantInfo = new TenantInfoModel();
}
protected override async Task SetPermissionsAsync()
protected async override Task SetPermissionsAsync()
{
await base.SetPermissionsAsync();

@ -49,7 +49,7 @@
{
private IEnumerable<Claim> _claims;
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
if (authState.User.Identity.IsAuthenticated)

@ -34,7 +34,7 @@ namespace MyCompanyName.MyProjectName
_application = _host.Services.GetService<IAbpApplicationWithExternalServiceProvider>();
}
protected override async void OnStartup(StartupEventArgs e)
protected async override void OnStartup(StartupEventArgs e)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
@ -66,7 +66,7 @@ namespace MyCompanyName.MyProjectName
}
}
protected override async void OnExit(ExitEventArgs e)
protected async override void OnExit(ExitEventArgs e)
{
_application.Shutdown();
await _host.StopAsync();

Loading…
Cancel
Save