Class SitecoreLayoutRequestExtensions
Extension methods for SitecoreLayoutRequest.
Inheritance
System.Object
SitecoreLayoutRequestExtensions
Namespace: Sitecore.LayoutService.Client.Request
Assembly: Sitecore.LayoutService.Client.Abstractions.dll
Syntax
Methods
AddHeader(SitecoreLayoutRequest, String, String[])
Adds the header with key and value to the headers collection stored in layout request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | layoutRequest | Layout request instance. |
| System.String | key | Header key. |
| System.String [] | value | header value. |
AddHeaders(SitecoreLayoutRequest, IDictionary<String, String[]>)
Adds headers collection to the headers collection stored in layout request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | layoutRequest | Layout request instance. |
| System.Collections.Generic.IDictionary < System.String , System.String []> | headers | Headers collection. |
ApiKey(SitecoreLayoutRequest)
Gets the API key of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The API key string value, otherwise null. |
ApiKey(SitecoreLayoutRequest, String)
Sets the API key of the request. If a null value is provided, the API key is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The request. |
AuthenticationHeader(SitecoreLayoutRequest)
Sets the authentication header of the request. If a null value is provided, the authentication header is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The request. |
AuthenticationHeader(SitecoreLayoutRequest, String)
Gets the authentication header of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The authentication header string value, otherwise null. |
Language(SitecoreLayoutRequest)
Gets the language of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The language string value, otherwise null. |
Language(SitecoreLayoutRequest, String)
Sets the language of the request. If a null value is provided, the language is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The request. |
Mode(SitecoreLayoutRequest)
Gets the mode of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The mode string value, otherwise null. |
Mode(SitecoreLayoutRequest, String)
Sets the mode of the request. If a null value is provided, the mode is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The request. |
Path(SitecoreLayoutRequest)
Gets the path of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The path string value, otherwise null. |
Path(SitecoreLayoutRequest, String)
Sets the path of the request. If a null value is provided, the path is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The request. |
PreviewDate(SitecoreLayoutRequest)
Sets the preview date of the request. If a null value is provided, the preview date is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The request. |
PreviewDate(SitecoreLayoutRequest, String)
Gets the preview date of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The preview date string value, otherwise null. |
SiteName(SitecoreLayoutRequest)
Gets the site name of the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| System.String | The site name string value, otherwise null. |
SiteName(SitecoreLayoutRequest, String)
Sets the site name of the request. If a null value is provided, the site name is removed from the request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The SitecoreLayoutRequest. |
| System.String | value | The value to set. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The request. |
TryGetHeadersCollection(SitecoreLayoutRequest, out Dictionary<String, String[]>)
Tries to get headers collection from layout request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | layoutRequest | Layout request instance. |
| System.Collections.Generic.Dictionary < System.String , System.String []> | headers | Headers. |
Returns
| Type | Description |
|---|---|
| System.Boolean | false if there is no headers collection otherwise true. |
UpdateRequest(SitecoreLayoutRequest, Dictionary<String, Object>)
Update missing values in the original request with values in the default request.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The original request object. |
| System.Collections.Generic.Dictionary < System.String , System.Object > | requestDefaults | The default request object. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutRequest | The updated request object. |