fix blank async lambda/functions to await Task.Run(()=>{})

This commit is contained in:
Rafsanul Hasan 2019-04-04 15:47:41 +06:00
parent 167bb167ff
commit d556e4a9ea
No known key found for this signature in database
GPG Key ID: 4BBF45E04D0AD72B
4 changed files with 11 additions and 6 deletions

View File

@ -9,6 +9,7 @@ using Ocelot.Middleware;
using System;
using HealthChecks.UI.Client;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using System.Threading.Tasks;
namespace OcelotApiGw
{
@ -59,16 +60,16 @@ namespace OcelotApiGw
{
OnAuthenticationFailed = async ctx =>
{
int i = 0;
await Task.Run(() => { });
},
OnTokenValidated = async ctx =>
{
int i = 0;
await Task.Run(() => { });
},
OnMessageReceived = async ctx =>
{
int i = 0;
await Task.Run(() => { });
}
};
});

View File

@ -20,6 +20,7 @@ using Swashbuckle.AspNetCore.Swagger;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
{
@ -168,9 +169,11 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
{
OnAuthenticationFailed = async ctx =>
{
await Task.Run(() => { });
},
OnTokenValidated = async ctx =>
{
await Task.Run(() => { });
}
};
});

View File

@ -21,6 +21,7 @@ using System.Net.Http;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
{
@ -117,11 +118,11 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
{
OnAuthenticationFailed = async ctx =>
{
int i = 0;
await Task.Run(() => { });
},
OnTokenValidated = async ctx =>
{
int i = 0;
await Task.Run(() => { });
}
};
});

View File

@ -10,7 +10,7 @@ namespace Webhooks.API.IntegrationEvents
{
public async Task Handle(ProductPriceChangedIntegrationEvent @event)
{
int i = 0;
await Task.Run(() => { });
}
}
}