The SitecoreRenderingDevice method

Current version: 9.1

To define the SitecoreRenderingDevice value for the PageEvent event, use the SitecoreRenderingDevice() method.

Property

Details

UT SDK method

SitecoreRenderingDevice(string, string)

Required/optional

Optional

Multiple invocations

Multiple invocations are forbidden and cause an InvalidOperationException exception

Value validation

Must contain a proper SitecoreRenderingDevice ID and SitecoreRenderingDevice Name values

For example:

RequestResponse
string definitionId = "01f8ffbf-d662-4a87-beee-413307055c48"; 

var pageViewRequest = UTRequestBuilder.PageViewWithDefinitionId(definitionId)
                                      .ItemVersion(1)
                                      .ItemLanguage("en")
				      .Url("http://mysite/myurl") 
                                      .AddCustomValues("key", "value")
                                      .SitecoreRenderingDevice("deviceId", "deviceName")

Do you have some feedback for us?

If you have suggestions for improving this article,