ViewComponentConventions Class

Definition

Static class that adds standard view component convention methods. This class cannot be inherited.

public ref class ViewComponentConventions abstract sealed
public static class ViewComponentConventions
type ViewComponentConventions = class
Public Class ViewComponentConventions
Inheritance
ViewComponentConventions

Fields

Name Description
ViewComponentSuffix

The suffix for a view component name.

Methods

Name Description
GetComponentFullName(TypeInfo)

Get the component's full name from a type from the Name first. If not defined, the full name is the Namespace with the Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentConventions.GetShortNameByConvention(System.Reflection.TypeInfo).

GetComponentName(TypeInfo)

Gets the name of a component.

IsComponent(TypeInfo)

Returns true if the type is a public, non abstract, non generic class which defines ViewComponentAttribute, but not the NonViewComponentAttribute and has a name that ends in ViewComponent.

Applies to