Skip to content

NamedOptions will only be considered by KeyedSingletonService with ServiceProvider usage, not NamedSingleton #9

@DevTKSS

Description

@DevTKSS

To me, it's unclear how to use NamedOptions connecting this with IConfiguration in the Service Configuration in the HostBuilder using Uno provided IConfigBuilder from the ConfigurationExtensions.

Uno did remove Microsofts .Configure<...> Method known and well documented in the Microsoft Docs which would be known, but is missing a documentation about how we should use the new IConfigBuilder.

So in amiss of that, we need to create a derived Record for each of them to get the correct JsonSerializable Type and makes us need to define the CodeSampleService Generic.


State Update: serviceProvider.AddNamedSingleton(name) from Uno DI without using Configure Method is where it fails.

  • Updating the Service Registration to use Keyed Services from Microsoft instead of Unos Named version does fix the problem hoping for the Uno Team to pick up on this for Named Services so we can use the NamedServices for it again as the key is a simple string. See future details on 5297fce

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    Status

    Tackle me!

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions