Click or drag to resize

IMobileDeviceManager Interface


Represents the manager object that contains the collection of Device Bundles. Also, it can retrieve the information of a device from the Ingeniux CMS mobile detection library.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.5.94
Syntax
public interface IMobileDeviceManager : ITransactionalEntity, 
	IDisposable

The IMobileDeviceManager type exposes the following members.

Properties
  NameDescription
Public propertyContentStore
Gets the Content Store.
(Inherited from ITransactionalEntity.)
Public propertyCurrentUser
Gets the Operating User for the Session .
(Inherited from ITransactionalEntity.)
Public propertyEnabled
Gets and sets whether mobile emulation is enabled. When not enabled, device bundles cannot be selected to emulate mobile preview, and the CMS user interface does not allow management of device bundles.
Public propertyGenericDevice
Gets the generic device information.
Public propertyItem
Gets an device bundle by its name.
Public propertySession
Gets the User Session that this manager instance was initiated from.
(Inherited from ITransactionalEntity.)
Top
Methods
  NameDescription
Public methodAddDeviceBundle
Adds a new device bundle to the collection.
Public methodDeepCloneT, TManager
Duplicates an object instance, not including its unique ID.
(Inherited from ITransactionalEntity.)
Public methodDeviceBundle
Gets a device bundle by its name.
Public methodDeviceBundles
Retrieves the collection of all device bundles in a paginated format.
Public methodQuickWrite
Creates a temporary Write Session to quickly write something outside the current Session and transaction. This is a way to bypass the transaction and quickly put something into the content store.
(Inherited from ITransactionalEntity.)
Public methodRemoveDeviceBundle
Removes a device bundle from the collection.
Top
Remarks

Like all manager objects, instances of this manager are retrieved from a IUserSession object. It only works within that session object.

C#
using (IUserSession session = store.OpenReadSession(currentUser))
{
       IMobileDeviceManager mobileDeviceManager = session.MobileDeviceManager;
       ...
}
Examples
Serialization of this manager object matches the MobileDevices.xml in previous-generation CMS content.
XML
<?xml version="1.0" encoding="utf-8"?>
<MobileDevices Enabled="false">
  <GenericDevice W="240" H="320" />
  <DeviceBundle N="iPhone" W="320" H="480" 
      UA="Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B125 Safari/7534.48.3" 
      RDID="12280-18117-17776-18092">
    <D>Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.85 (KHTML, like Gecko) Version/5.1 Mobile/9B125 Safari/7534.48.3</D>
  </DeviceBundle>
  <DeviceBundle N="iPad" W="768" H="1024" 
      UA="Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8J2 Safari/6531.22.7" 
      RDID="15767-17090-4201-18092">
  </DeviceBundle>
</MobileDevices>
See Also