Delen via


DeviceAlreadyExistsException Constructors

Definition

Overloads

DeviceAlreadyExistsException(String)

Creates an instance of DeviceAlreadyExistsException with the specified device Id, an empty error message and marks it as non-transient.

DeviceAlreadyExistsException(SerializationInfo, StreamingContext)

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

DeviceAlreadyExistsException(String, Exception)

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

DeviceAlreadyExistsException(String, String)

Creates an instance of DeviceAlreadyExistsException with the specified device Id and the service returned tracking Id associated with this particular error, and marks it as non-transient.

DeviceAlreadyExistsException(ErrorCode, String, Exception)

Creates an instance of DeviceAlreadyExistsException 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.

DeviceAlreadyExistsException(String)

Creates an instance of DeviceAlreadyExistsException with the specified device Id, an empty error message and marks it as non-transient.

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

Parameters

deviceId
String

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

Applies to

DeviceAlreadyExistsException(SerializationInfo, StreamingContext)

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

public DeviceAlreadyExistsException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException
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

DeviceAlreadyExistsException(String, Exception)

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

public DeviceAlreadyExistsException (string message, Exception innerException);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException : string * Exception -> Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException
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

DeviceAlreadyExistsException(String, String)

Creates an instance of DeviceAlreadyExistsException with the specified device Id and the service returned tracking Id associated with this particular error, and marks it as non-transient.

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

Parameters

deviceId
String

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

trackingId
String

The service returned tracking Id associated with this particular error.

Applies to

DeviceAlreadyExistsException(ErrorCode, String, Exception)

Creates an instance of DeviceAlreadyExistsException 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 DeviceAlreadyExistsException (Microsoft.Azure.Devices.Common.Exceptions.ErrorCode code, string message, Exception innerException = default);
new Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException : Microsoft.Azure.Devices.Common.Exceptions.ErrorCode * string * Exception -> Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException
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