Browse Source

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

pull/993/head
Rafsanul Hasan 5 years ago
parent
commit
d556e4a9ea
No known key found for this signature in database GPG Key ID: 4BBF45E04D0AD72B
4 changed files with 11 additions and 6 deletions
  1. +4
    -3
      src/ApiGateways/ApiGw-Base/Startup.cs
  2. +3
    -0
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs
  3. +3
    -2
      src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs
  4. +1
    -1
      src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs

+ 4
- 3
src/ApiGateways/ApiGw-Base/Startup.cs 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(() => { });
}
};
});


+ 3
- 0
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs 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(() => { });
}
};
});


+ 3
- 2
src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs 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(() => { });
}
};
});


+ 1
- 1
src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs View File

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

Loading…
Cancel
Save