Skip to content

Use IOptions pattern to bind ConsoleOptions rather than AddSingleton #46

@DericHuynh

Description

@DericHuynh

AddOptions is already added as part of the default host builder, so we might aswell leverage the benefits and use that for ConsoleAppOptions. This will allow the users to set the ConsoleAppOptions using a more standard .Configure(options => {...}) or AddOptions().Bind(...) if they want. This also allows them, to bind ConsoleAppOptions to configuration sections, allowing them to be set by environment variables, command line, appsettings.json or whatever configuration source is set.

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