The SitecoreRenderingDevice method

Version:

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

PropertyDetails
UT SDK methodSitecoreRenderingDevice(string, string)
Required/optionalOptional
Multiple invocationsMultiple invocations are forbidden and cause an InvalidOperationException exception
Value validationMust contain a proper SitecoreRenderingDevice ID and SitecoreRenderingDevice Name values

For example:


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")

If you have suggestions for improving this article, let us know!