DevicesManager.AuthoritativeRefreshDevicesAsync Method (Guid, IEnumerable<ReportDeviceParameters>, Boolean)
Asynchronously refreshes the list of devices.
Namespace: Microsoft.WindowsServerSolutions.Common.Devices
Assembly: DevicesOM (in DevicesOM.dll)
Syntax
public void AuthoritativeRefreshDevicesAsync(
Guid deviceType,
IEnumerable<ReportDeviceParameters> parameters,
bool updateWhenTypeConflict
)
public:
void AuthoritativeRefreshDevicesAsync(
Guid deviceType,
IEnumerable<ReportDeviceParameters^>^ parameters,
bool updateWhenTypeConflict
)
Public Sub AuthoritativeRefreshDevicesAsync (
deviceType As Guid,
parameters As IEnumerable(Of ReportDeviceParameters),
updateWhenTypeConflict As Boolean
)
Parameters
deviceType
Type: System.GuidThe type of devices that are managed by the authoritative source.
parameters
Type: System.Collections.Generic.IEnumerable<ReportDeviceParameters>The parameters of all the devices that the are known by the authoritative source.
updateWhenTypeConflict
Type: System.BooleanControls whether an update is made to the type of the existing device. A conflict exists when a device that has the same identifier but a different device type is found in the devices provider.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The device type is Guid.Empty. |
ArgumentNullException | ArgumentNullException is null. |
Remarks
The caller must be the Authoritative source that manages the devices of the specified type. If updateWhenTypeConflict is true, the behavior of adding the device will be different than ReportDevice, which fails if the existing device is a different type. AuthoritativeRefreshDevices overwrites the device type. If updateWhenTypeConflict is false, the existing device is not refreshed. No TypeMismatch exception is thrown. If devices are the same type but are not in the list that is reported by AuthoritativeRefreshDevices, those devices are considered as out of sync devices and will be removed from the devices provider.
See Also
DevicesManager Class
Microsoft.WindowsServerSolutions.Common.Devices Namespace
Return to top