Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Where did IControllerTypeProvider go in RC2? #4730

Closed
dotnetjunkie opened this issue May 24, 2016 · 7 comments
Closed

Where did IControllerTypeProvider go in RC2? #4730

dotnetjunkie opened this issue May 24, 2016 · 7 comments
Assignees
Milestone

Comments

@dotnetjunkie
Copy link

dotnetjunkie commented May 24, 2016

In rc1, a call to AddMvc ensured the registration of an IControllerTypeProvider implementation. In rc2 however, no such registration is made and while browsing through the source code there seem to be no usage of IControllerTypeProvider (although the Github repository search might invalidly return not the right results).

Why is no IControllerTypeProvider registration made and what is currently the way to request a list of controller types from MVC?

@pranavkm
Copy link
Contributor

pranavkm commented May 24, 2016

IControllerTypeProvider and the surrounding infrastructure was replaced by application parts and features, specifically ControllerFeature. See https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs#L96-L102 for usage.

Oddly IControllerTypeProvider continues to exist in the code base but isn't used anywhere. It needs to be deleted.

@pranavkm
Copy link
Contributor

cc @javiercn

@Eilon Eilon added this to the 1.0.0 milestone May 24, 2016
@Eilon Eilon assigned pranavkm and unassigned javiercn May 24, 2016
@Eilon
Copy link
Member

Eilon commented May 24, 2016

@pranavkm yeah let's remove IControllerTypeProvider.

@pranavkm
Copy link
Contributor

#4735 < PR for it

@pranavkm
Copy link
Contributor

@dotnetjunkie - I removed the type as part of 15f113d. Let me know if you have issues working with the ControllerFeature.

@javiercn
Copy link
Member

@pranavkm is correct

@dotnetjunkie
Copy link
Author

@pranavkm, using the example in the code base you postef at, I managed to get this working.

From an API perspective the creation of a feature onject and sending it to the part manager feels a bit weird though; there might be an abstraction or extension method missing, although admittingly a request for all controller types might not be a very common use case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants