Delen via


DeviceNotFoundException Constructors

Definition

Overloads

DeviceNotFoundException(String)

Creates an instance of DeviceNotFoundException with the specified device Id and marks it as non-transient.

DeviceNotFoundException(SerializationInfo, StreamingContext)

Creates an instance of DeviceNotFoundException with the SerializationInfo and StreamingContext associated with the exception.

DeviceNotFoundException(String, Exception)

Creates an instance of DeviceNotFoundException with a specified error message and a reference to the inner exception that caused this exception, and marks it as non-transient.

DeviceNotFoundException(String, String)

Creates an instance of DeviceNotFoundException with the specified device Id and the name of the IoT hub, and marks it as non-transient.

DeviceNotFoundException(ErrorCode, String, Exception)

Creates an instance of DeviceNotFoundException with a specified ErrorCode, error message and an optional reference to the inner exception that caused this exception. This exception is marked as non-transient.

DeviceNotFoundException(String, String, String)

Creates an instance of DeviceNotFoundException with the specified device Id, the name of the IoT hub and the tracking Id, and marks it as non-transient.

DeviceNotFoundException(String)

Creates an instance of DeviceNotFoundException with the specified device Id and marks it as non-transient.

public DeviceNotFoundException (string deviceId);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException : string -> Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException
Public Sub New (deviceId As String)

Parameters

deviceId
String

The Id of the device that is not registered on the IoT hub.

Applies to

DeviceNotFoundException(SerializationInfo, StreamingContext)

Creates an instance of DeviceNotFoundException with the SerializationInfo and StreamingContext associated with the exception.

public DeviceNotFoundException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException
Public Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Applies to

DeviceNotFoundException(String, Exception)

Creates an instance of DeviceNotFoundException with a specified error message and a reference to the inner exception that caused this exception, and marks it as non-transient.

public DeviceNotFoundException (string message, Exception innerException);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException : string * Exception -> Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The message that describes the error.

innerException
Exception

The exception that is the cause of the current exception.

Applies to

DeviceNotFoundException(String, String)

Creates an instance of DeviceNotFoundException with the specified device Id and the name of the IoT hub, and marks it as non-transient.

public DeviceNotFoundException (string deviceId, string iotHubName);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException : string * string -> Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException
Public Sub New (deviceId As String, iotHubName As String)

Parameters

deviceId
String

The Id of the device that is not registered on the IoT hub.

iotHubName
String

The name of the IoT hub to which the device should have been registered.

Applies to

DeviceNotFoundException(ErrorCode, String, Exception)

Creates an instance of DeviceNotFoundException with a specified ErrorCode, error message and an optional reference to the inner exception that caused this exception. This exception is marked as non-transient.

public DeviceNotFoundException (Microsoft.Azure.Devices.Common.Exceptions.ErrorCode code, string message, Exception innerException = default);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException : Microsoft.Azure.Devices.Common.Exceptions.ErrorCode * string * Exception -> Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException
Public Sub New (code As ErrorCode, message As String, Optional innerException As Exception = Nothing)

Parameters

code
ErrorCode

The ErrorCode associated with the error.

message
String

The message that describes the error.

innerException
Exception

The exception that is the cause of the current exception.

Applies to

DeviceNotFoundException(String, String, String)

Creates an instance of DeviceNotFoundException with the specified device Id, the name of the IoT hub and the tracking Id, and marks it as non-transient.

public DeviceNotFoundException (string deviceId, string iotHubName, string trackingId);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException : string * string * string -> Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException
Public Sub New (deviceId As String, iotHubName As String, trackingId As String)

Parameters

deviceId
String

The Id of the device that is not registered on the IoT hub.

iotHubName
String

The name of the IoT hub to which the device should have been registered.

trackingId
String

The service returned tracking Id associated with this particular error.

Applies to