Skip to content

Configuring custom config section in RC2 (latest dev build) #1193

@rohits-dev

Description

@rohits-dev

Hi

I had a running configuration with RC1 but as soon as I upgraded to RC2, there is a compile time error at

public void ConfigureServices(IServiceCollection services)
{
      services.Configure<RefDataConfigs>(Configuration.GetSection(REF_DATA_CONFIG_KEY));
}

Seems like IServiceCollection.Configure started taking Action whereas it used to take IConfigurationSection.

Error   CS1503  Argument 2: cannot convert from 'Microsoft.Extensions.Configuration.IConfigurationSection' to 'System.Action<MyCustomTyppe>'    

Is there any easy way to fix this or I have to write a function which will convert IConfigurationSection to my custom type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions