Open topic with navigation

TryLockDeviceByInfo Method
Checks whether a device is available in the Mobile Center lab and, if so, locks it so that only the current LeanFT test can perform actions on it.
Remarks
If this method fails, the test continues without an exception.

C# Syntax

    public static bool TryLockDeviceByInfo(
       IDeviceInfo deviceInfo,
       out IDevice device
    )

Parameters

deviceInfo
  An interface (IDeviceInfo) containing information about the device to lock.
device
  If the method returns True, this parameter contains the locked IDevice. If the method returns False, the parameter contains a null value.

Return Value

True if the locking operation succeeded, otherwise false.