共用方式為


DeviceClient.Dispose Method

Definition

Overloads

Dispose()

Releases the unmanaged resources used by the DeviceClient and optionally disposes of the managed resources.

Dispose(Boolean)

Releases the unmanaged resources used by the DeviceClient and allows for any derived class to override and provide custom implementation.

Dispose()

Releases the unmanaged resources used by the DeviceClient and optionally disposes of the managed resources.

public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

Implements

Remarks

The method CloseAsync() should be called before disposing.

Applies to

Dispose(Boolean)

Releases the unmanaged resources used by the DeviceClient and allows for any derived class to override and provide custom implementation.

protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable Sub Dispose (disposing As Boolean)

Parameters

disposing
Boolean

Setting to true will release both managed and unmanaged resources. Setting to false will only release the unmanaged resources.

Applies to