DefaultViewComponentDescriptorProvider Class

Summary

Default implementation of [Microsoft.AspNet.Mvc.ViewComponents.IViewComponentDescriptorProvider](Microsoft.AspNet.Mvc.ViewComponents.IViewComponentDescriptorProvider.yml).

Syntax

public class DefaultViewComponentDescriptorProvider : IViewComponentDescriptorProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider

Constructors

DefaultViewComponentDescriptorProvider(Microsoft.AspNet.Mvc.IAssemblyProvider)

Creates a new [Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider](Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider.yml).

Arguments:
public DefaultViewComponentDescriptorProvider(IAssemblyProvider assemblyProvider)

Methods

Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider.GetCandidateTypes()

Gets the candidate [System.Reflection.TypeInfo]() instances. The results of this will be provided to [Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider.IsViewComponentType(System.Reflection.TypeInfo)](Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider.yml) for filtering.

Return type:System.Collections.Generic.IEnumerable{System.Reflection.TypeInfo}
Returns:A list of [System.Reflection.TypeInfo]() instances.
protected virtual IEnumerable<TypeInfo> GetCandidateTypes()
Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider.GetViewComponents()
Return type:System.Collections.Generic.IEnumerable{Microsoft.AspNet.Mvc.ViewComponents.ViewComponentDescriptor}
public virtual IEnumerable<ViewComponentDescriptor> GetViewComponents()
IsViewComponentType(System.Reflection.TypeInfo)

Determines whether or not the given [System.Reflection.TypeInfo]() is a View Component class.

Arguments:
  • typeInfo (System.Reflection.TypeInfo) – The [System.Reflection.TypeInfo]().
Return type:

System.Boolean

Returns:

<c>true</c> if <paramref name=”typeInfo” />represents a View Component class, otherwise <c>false</c>.

protected virtual bool IsViewComponentType(TypeInfo typeInfo)