Skip to content

Method DiscoverFirstAsync

Namespace: Belay.Core
Assembly: Belay.Core.dll

DiscoverFirstAsync(ILoggerFactory?, CancellationToken)

Create a Device instance for the first discovered MicroPython device.

csharp
public static Task<Device?> DiscoverFirstAsync(ILoggerFactory? loggerFactory = null, CancellationToken cancellationToken = default)

Parameters

loggerFactory ILoggerFactory?

Optional logger factory.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<Device?>

A Device instance for the first discovered device, or null if none found.

Released under the Apache License 2.0.