Table of Contents

Class Sdk

Namespace
Huddly.Sdk
Assembly
Huddly.Sdk.dll
public sealed class Sdk : ISdk, IDisposable
Inheritance
Sdk
Implements
Inherited Members

Constructors

Sdk(ILoggerFactory?, IEnumerable<IDeviceMonitor>, SdkSession?)

public Sdk(ILoggerFactory? loggerFactory, IEnumerable<IDeviceMonitor> monitors, SdkSession? session = null)

Parameters

loggerFactory ILoggerFactory
monitors IEnumerable<IDeviceMonitor>
session SdkSession

Methods

Create(ILoggerFactory?, params IDeviceMonitor[])

[Obsolete("Use the Sdk constructor or CreateDefault(). Method will be removed in SDK version 3.")]
public static Sdk Create(ILoggerFactory? loggerFactory, params IDeviceMonitor[] monitors)

Parameters

loggerFactory ILoggerFactory
monitors IDeviceMonitor[]

Returns

Sdk

Create(ILoggerFactory?, IEnumerable<IDeviceMonitor>)

[Obsolete("Use the Sdk constructor or CreateDefault(). Method will be removed in SDK version 3.")]
public static Sdk Create(ILoggerFactory? loggerFactory, IEnumerable<IDeviceMonitor> monitors)

Parameters

loggerFactory ILoggerFactory
monitors IEnumerable<IDeviceMonitor>

Returns

Sdk

CreateDefault(ILoggerFactory?, SdkSession?)

Create the SDK with recommended device monitors using the default configuration and timeouts.

public static Sdk CreateDefault(ILoggerFactory? loggerFactory, SdkSession? session = null)

Parameters

loggerFactory ILoggerFactory
session SdkSession

Returns

Sdk

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~Sdk()

protected ~Sdk()

GetMonitoredDevices()

public IImmutableDictionary<string, IDevice> GetMonitoredDevices()

Returns

IImmutableDictionary<string, IDevice>

A collection of all currently monitored devices

IsMonitoring()

public bool IsMonitoring()

Returns

bool

A bool indicating if the ISdk is actively monitoring or not

StartMonitoring(int, CancellationToken)

Starts monitoring and discovery of devices.

Consumers should subscribe to the DeviceConnected and DeviceDisconnected events before calling this method

public Task StartMonitoring(int timeout_ms = -1, CancellationToken ct = default)

Parameters

timeout_ms int
ct CancellationToken

Returns

Task

StopMonitoring()

Stops monitoring and discovery of devices

[Obsolete("Use Dispose() and create a new SDK instance instead. Method will be removed in SDK version 3.")]
public void StopMonitoring()

Events

DeviceConnected

Fires on device connection.

public event EventHandler<DeviceConnectionChangeEventArgs>? DeviceConnected

Event Type

EventHandler<DeviceConnectionChangeEventArgs>

DeviceDisconnected

Fires on device disconnect. The included device instance can no longer be used for communicating with the device.

In order to reconnect to the device, listen for a DeviceConnected event containing an IDevice with a matching Id.

public event EventHandler<DeviceConnectionChangeEventArgs>? DeviceDisconnected

Event Type

EventHandler<DeviceConnectionChangeEventArgs>