ApiFramework icon indicating copy to clipboard operation
ApiFramework copied to clipboard

Make ActionDescriptorChangeProvider available directly through DI

Open mikoskinen opened this issue 3 years ago • 0 comments

Currently to get hands on to ActionDescriptorChangeProvider one has to use the following:

    public EndpointManagementService(IEnumerable<IActionDescriptorChangeProvider> changeProviders)
    {
        _changeProvider = changeProviders.FirstOrDefault(x => x is ActionDescriptorChangeProvider) as ActionDescriptorChangeProvider;
    }

Making ActionDescriptorChangeProvider available directly through DI could be helpful in some situations where developer has to react when an endpoint changes.

Note that we still should have only one instance of ActionDescriptorChangeProvider. And we should at some point rename this class.

mikoskinen avatar Feb 12 '22 04:02 mikoskinen