1 implementation of SelectComponent
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ViewComponents\DefaultViewComponentSelector.cs (1)
28
public ViewComponentDescriptor
SelectComponent
(string componentName)
12 references to SelectComponent
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ViewComponents\DefaultViewComponentHelper.cs (1)
71
var descriptor = _selector.
SelectComponent
(name);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (11)
ViewComponents\DefaultViewComponentSelectorTest.cs (11)
20
var result = selector.
SelectComponent
("Suffix");
33
var result = selector.
SelectComponent
($"{Namespace}.Suffix");
46
var result = selector.
SelectComponent
("WithoutSuffix");
59
var result = selector.
SelectComponent
($"{Namespace}.WithoutSuffix");
72
var result = selector.
SelectComponent
("ByAttribute");
85
var result = selector.
SelectComponent
("ByNamingConvention");
104
var ex = Assert.Throws<InvalidOperationException>(() => selector.
SelectComponent
("Ambiguous"));
125
var ex = Assert.Throws<InvalidOperationException>(() => selector.
SelectComponent
(name));
138
var result = selector.
SelectComponent
("Namespace1.Ambiguous");
151
var result = selector.
SelectComponent
("NonAmbiguousName");
166
var result = selector.
SelectComponent
(name);