Class ItemLinkField
Facilitates mapping a link field to a specific target model type.
Inheritance
System.Object
ItemLinkField
Implements
Inherited Members
FieldsReader.ReadField
FieldsReader.TryReadField
FieldsReader.ReadField(Type, String)
FieldsReader.TryReadField(Type, String, Object)
FieldsReader.TryReadFields(Type, Object)
FieldsReader.HandleReadFields(Type)
Namespace: Sitecore.LayoutService.Client.Response.Model.Fields
Assembly: Sitecore.LayoutService.Client.Abstractions.dll
Syntax
Type Parameters
| Name | Description |
|---|---|
| TTargetModel | Target model type. |
Constructors
ItemLinkField()
Declaration
Properties
Fields
Gets or sets the strongly typed target.
Declaration
Property Value
| Type | Description |
|---|---|
| TTargetModel |
Target
Gets or sets the strongly types target if the item link.
Declaration
Property Value
| Type | Description |
|---|---|
| TTargetModel |
Methods
HandleRead(Type)
Returns an instance of the Field data as a specified type.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The type to read the field as. |
Returns
| Type | Description |
|---|---|
| System.Object | A new instance of the specified type. |
Overrides
Read(Type)
Reads the current Field as the specified type. The type must implement IField.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The type of field to be read. |
Returns
| Type | Description |
|---|---|
| System.Object | A new instance if successful. |
Overrides
Read()
Reads the current Field as the specified type.
Declaration
Returns
| Type | Description |
|---|---|
| TField | A new instance of TField. |
Type Parameters
| Name | Description |
|---|---|
| TField | The type of Field to be read. |
Overrides
TryRead(Type, out IField)
Attempts to read the current Field as the specified type. The type must implement IField.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The type of field to be read. |
| IField | field | The resulting field. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the field could be read as the specified type, otherwise false. |
Overrides
TryRead(out TField)
Attempts to read the current Field as the specified type.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| TField | field | The resulting instance if successful. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the field could be read as the specified type, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| TField | The type of Field to be read. |
Overrides
Sitecore.LayoutService.Client.Response.Model.Fields.ItemLinkField.TryRead