C# Класс Mycroft.App.Registry

Stores AppInstances
Not thread safe; only the Dispatcher's main processing thread should touch this class
Наследование: ICommandable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetAllRelated ( Capability capability ) : IEnumerable

Returns all instances that depend on or provide a capability

GetDependents ( Capability capability ) : IEnumerable

Gets instances that depend on a capability

GetProviders ( Capability capability ) : IEnumerable

Gets instances that provide a capability

HasInstance ( string instanceId ) : bool

Checks if an app with a specific instance ID exists

Issue ( Command command ) : void
Register ( AppInstance instance ) : bool

Adds an instance to the registry

Remove ( AppInstance instance ) : bool

Removes an app from the registry, used when an instance disconnects

TryGetInstance ( string instanceId, AppInstance &outInstance ) : bool

Retrives an app instance with that ID

Описание методов

GetAllRelated() публичный Метод

Returns all instances that depend on or provide a capability
public GetAllRelated ( Capability capability ) : IEnumerable
capability Capability
Результат IEnumerable

GetDependents() публичный Метод

Gets instances that depend on a capability
public GetDependents ( Capability capability ) : IEnumerable
capability Capability
Результат IEnumerable

GetProviders() публичный Метод

Gets instances that provide a capability
public GetProviders ( Capability capability ) : IEnumerable
capability Capability
Результат IEnumerable

HasInstance() публичный Метод

Checks if an app with a specific instance ID exists
public HasInstance ( string instanceId ) : bool
instanceId string
Результат bool

Issue() публичный Метод

public Issue ( Command command ) : void
command Mycroft.Cmd.Command
Результат void

Register() публичный Метод

Adds an instance to the registry
public Register ( AppInstance instance ) : bool
instance AppInstance
Результат bool

Remove() публичный Метод

Removes an app from the registry, used when an instance disconnects
public Remove ( AppInstance instance ) : bool
instance AppInstance
Результат bool

TryGetInstance() публичный Метод

Retrives an app instance with that ID
public TryGetInstance ( string instanceId, AppInstance &outInstance ) : bool
instanceId string
outInstance AppInstance
Результат bool