Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Don't rely on IoC containters to preserve registration order IConfigureOptions services #150

@halter73

Description

@halter73

Autofac and possibly other IoC containers will not return IEnumerable resolved services in the order they were registered, but Options currently depends on this behavior. This causes certain extension methods in Kestrel, WebListener, MVC (and EF?) to break when Autofac is used.

This will probably require adding an Order property back to IConfigureOptions similar to what we had back in beta7.

A key difference is we want to continue running the actions passed to Configure in the order they are added. This will likely require that Configure inspect the IServiceCollection prior to registering the ConfigureOptions instance.

This should resolve the issues raised in aspnet/Hosting#785

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions