Runtime: ConfigurationSource load async resource

Created on 18 Dec 2018  路  4Comments  路  Source: dotnet/runtime

Problem:

I'm am trying to create a ConfigurationProvider that loads data from an http endpoint but there isn't a LoadAsync method to use.

Describe the solution you'd like

  1. maybe add a virtual LoadAsync method to the ConfigurationProvider abstract class
  2. add another type AsyncConfigurationProvider that only has a LoadAsync method and not the Load method

    Describe alternatives you've considered

using .GetAwaiter().GetResult() on the task

area-Extensions-Configuration feature request up-for-grabs

All 4 comments

+1
By the way to preserve exceptions the better alternative (to .Result) is probably .GetAwaiter().GetResult() see: https://github.com/aspnet/Security/issues/59

Next step for this is to prepare API suggestion and sample usage as per guideline in https://github.com/dotnet/runtime/blob/master/docs/project/api-review-process.md

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Timovzl picture Timovzl  路  3Comments

chunseoklee picture chunseoklee  路  3Comments

sahithreddyk picture sahithreddyk  路  3Comments

omariom picture omariom  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments