C# 클래스 Sdl.Web.Common.Models.ModelTypeRegistry

Represents a Registry of View Model Types and associated Semantics.
파일 보기 프로젝트 열기: sdl/dxa-web-application-dotnet 1 사용 예제들

공개 메소드들

메소드 설명
GetMappedModelTypes ( string semanticTypeName ) : IEnumerable

Gets the Model Types mapped to a given semantic type name.

GetSemanticPropertyNames ( Type modelType, string propertyName ) : string[]

Gets the semantic property names for a given Model Type and property name.

GetSemanticTypes ( Type modelType, string>.IDictionary &prefixMappings ) : string[]

Gets the semantic types (and prefix mappings) for a given Model Type.

GetViewModelType ( MvcData viewData ) : Type

Get the View Model Type for a given View.

RegisterViewModel ( MvcData viewData, Type modelType ) : void

Registers a View Model and associated View.

RegisterViewModel ( MvcData viewData, string viewVirtualPath ) : void

Registers a View Model mapping by compiling a given view file and obtaining its model type.

비공개 메소드들

메소드 설명
ExtractSemanticInfo ( Type modelType ) : SemanticInfo
GetSemanticInfo ( Type modelType ) : SemanticInfo
RegisterModelType ( Type modelType ) : SemanticInfo

메소드 상세

GetMappedModelTypes() 공개 정적인 메소드

Gets the Model Types mapped to a given semantic type name.
public static GetMappedModelTypes ( string semanticTypeName ) : IEnumerable
semanticTypeName string The semantic type name qualified with vocabulary ID.
리턴 IEnumerable

GetSemanticPropertyNames() 공개 정적인 메소드

Gets the semantic property names for a given Model Type and property name.
public static GetSemanticPropertyNames ( Type modelType, string propertyName ) : string[]
modelType System.Type The Model Type.
propertyName string The property name.
리턴 string[]

GetSemanticTypes() 공개 정적인 메소드

Gets the semantic types (and prefix mappings) for a given Model Type.
public static GetSemanticTypes ( Type modelType, string>.IDictionary &prefixMappings ) : string[]
modelType System.Type The Model Type.
prefixMappings string>.IDictionary The prefix mappings for the prefixes used by the types.
리턴 string[]

GetViewModelType() 공개 정적인 메소드

Get the View Model Type for a given View.
public static GetViewModelType ( MvcData viewData ) : Type
viewData MvcData The data for the View.
리턴 System.Type

RegisterViewModel() 공개 정적인 메소드

Registers a View Model and associated View.
public static RegisterViewModel ( MvcData viewData, Type modelType ) : void
viewData MvcData The data for the View to register or null if only the Model Type is to be registered.
modelType System.Type The model Type used by the View.
리턴 void

RegisterViewModel() 공개 정적인 메소드

Registers a View Model mapping by compiling a given view file and obtaining its model type.
public static RegisterViewModel ( MvcData viewData, string viewVirtualPath ) : void
viewData MvcData The data for the View to register.
viewVirtualPath string The (virtual) path to the View file.
리턴 void