Skip to content

ThinkingHome.DeviceModel.Remoting.ProxyServer

ThinkingHome.DeviceModel.Remoting.ProxyServer

IRemoteHostRegistry Interface

Реестр подключённых домашних хостов на прокси. Отдаёт IDeviceHost (RemoteHost) по hostId — бридж (Alice/Matter) резолвит hostId из своего контекста (например, пользователя Алисы).

csharp
public interface IRemoteHostRegistry

Derived
RemoteHostRegistry

Properties

IRemoteHostRegistry.ConnectedHosts Property

Идентификаторы подключённых сейчас хостов.

csharp
System.Collections.Generic.IReadOnlyCollection<string> ConnectedHosts { get; }

Property Value

System.Collections.Generic.IReadOnlyCollection<System.String>

Methods

IRemoteHostRegistry.TryGet(string, IDeviceHost) Method

Вернуть удалённый хост по hostId, если он сейчас подключён.

csharp
bool TryGet(string hostId, out ThinkingHome.DeviceModel.IDeviceHost? host);

Parameters

hostId System.String

host IDeviceHost

Returns

System.Boolean

Events

IRemoteHostRegistry.HostConnected Event

Хост подключился или переподключился (аргумент — hostId).

csharp
event Action<string>? HostConnected;

Event Type

System.Action<System.String>

IRemoteHostRegistry.HostDisconnected Event

Хост потерял соединение (аргумент — hostId).

csharp
event Action<string>? HostDisconnected;

Event Type

System.Action<System.String>

Опубликовано под лицензией MIT