C# Класс Sdl.Web.Common.Mapping.SemanticSchema

Represents a Semantic Schema
Deserialized from JSON in schemas.json.
Показать файл Открыть проект

Открытые методы

Метод Описание
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