C# 클래스 Sdl.Web.Common.Mapping.SemanticSchema

Represents a Semantic Schema
Deserialized from JSON in schemas.json.
파일 보기 프로젝트 열기: sdl/dxa-web-application-dotnet

공개 메소드들

메소드 설명
FindFieldBySemantics ( FieldSemantics fieldSemantics ) : Sdl.Web.Common.Mapping.SemanticSchemaField

Find SemanticSchemaField with given semantics.

GetEntityNames ( ) : string>.ILookup

Get the Schema's semantic entity/types names grouped per semantic vocabulary.

Using ILookup{TKey,TElement} rather than a Dictionary{TKey,TValue} because it will allow for duplicate keys.

GetModelTypeFromSemanticMapping ( Type baseModelType ) : Type

Determine a Model Type based on semantic mappings (and a given base model type).

This method makes it possible (for example) to let the Teaser.Media property get an instance of Image rather than just MediaItem (the type of the View Model property).

GetSemanticTypeNames ( ) : string[]

Gets semantic type names (qualified with Vocabulary ID) for the Schema.

Initialize ( Sdl.Web.Common.Configuration.Localization localization ) : void

Initializes an existing instance.

ToString ( ) : string

Provides a string representation of the object.

메소드 상세

FindFieldBySemantics() 공개 메소드

Find SemanticSchemaField with given semantics.
public FindFieldBySemantics ( FieldSemantics fieldSemantics ) : Sdl.Web.Common.Mapping.SemanticSchemaField
fieldSemantics FieldSemantics The semantics to check against
리턴 Sdl.Web.Common.Mapping.SemanticSchemaField

GetEntityNames() 공개 메소드

Get the Schema's semantic entity/types names grouped per semantic vocabulary.
Using ILookup{TKey,TElement} rather than a Dictionary{TKey,TValue} because it will allow for duplicate keys.
public GetEntityNames ( ) : string>.ILookup
리턴 string>.ILookup

GetModelTypeFromSemanticMapping() 공개 메소드

Determine a Model Type based on semantic mappings (and a given base model type).
This method makes it possible (for example) to let the Teaser.Media property get an instance of Image rather than just MediaItem (the type of the View Model property).
public GetModelTypeFromSemanticMapping ( Type baseModelType ) : Type
baseModelType System.Type The base type as obtained from the View Model.
리턴 System.Type

GetSemanticTypeNames() 공개 메소드

Gets semantic type names (qualified with Vocabulary ID) for the Schema.
public GetSemanticTypeNames ( ) : string[]
리턴 string[]

Initialize() 공개 메소드

Initializes an existing instance.
public Initialize ( Sdl.Web.Common.Configuration.Localization localization ) : void
localization Sdl.Web.Common.Configuration.Localization The context Localization.
리턴 void

ToString() 공개 메소드

Provides a string representation of the object.
public ToString ( ) : string
리턴 string