Skip to content

Extension methods with IConfiguration parameter are ignored #142

Closed
@andriysavin

Description

@andriysavin

When you define sink configuration extension method with IConfiguration parameter that method is ignored. At the same time if you use IConfigurationSection and specify value in config source, the method is discovered and the parameter is populated. Also, if default value (null) is specified for IConfiguration parameter all works as exepected as well. I believe the source of the problem lies in the code which filters methods and doesn't take into account IConfiguration parameter type:

.All(p => p.HasDefaultValue || suppliedArgumentValues.Any(s => s.Key.Equals(p.Name, StringComparison.OrdinalIgnoreCase))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions