C# Class Mycroft.App.Registry

Stores AppInstances
Not thread safe; only the Dispatcher's main processing thread should touch this class
Inheritance: ICommandable
Afficher le fichier Open project: rit-sse-mycroft/core Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

GetAllRelated() public méthode

Returns all instances that depend on or provide a capability
public GetAllRelated ( Capability capability ) : IEnumerable
capability Capability
Résultat IEnumerable

GetDependents() public méthode

Gets instances that depend on a capability
public GetDependents ( Capability capability ) : IEnumerable
capability Capability
Résultat IEnumerable

GetProviders() public méthode

Gets instances that provide a capability
public GetProviders ( Capability capability ) : IEnumerable
capability Capability
Résultat IEnumerable

HasInstance() public méthode

Checks if an app with a specific instance ID exists
public HasInstance ( string instanceId ) : bool
instanceId string
Résultat bool

Issue() public méthode

public Issue ( Command command ) : void
command Mycroft.Cmd.Command
Résultat void

Register() public méthode

Adds an instance to the registry
public Register ( AppInstance instance ) : bool
instance AppInstance
Résultat bool

Remove() public méthode

Removes an app from the registry, used when an instance disconnects
public Remove ( AppInstance instance ) : bool
instance AppInstance
Résultat bool

TryGetInstance() public méthode

Retrives an app instance with that ID
public TryGetInstance ( string instanceId, AppInstance &outInstance ) : bool
instanceId string
outInstance AppInstance
Résultat bool