Interface IController
Configurable and startable controller.
Namespace: ArucoUnity
Assembly: Assembly-CSharp.dll
Syntax
public interface IController
Remarks
It can have other configurable controllers as dependencies. They must have started before starting this controller. They stop this controller when one of them stops.
Properties
| Improve this Doc View SourceAutoStart
Gets or sets if configuring and starting automatically when when all dependencies started. Manually configure and start by calling Configure() and StartController().
Declaration
bool AutoStart { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsConfigured
Gets if the controller is configured.
Declaration
bool IsConfigured { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsReady
Gets if the controller is ready to be started when all dependencies have started.
Declaration
bool IsReady { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsStarted
Gets if the controller is started.
Declaration
bool IsStarted { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceAddDependency(IController)
Add a new dependency. The controller must be stopped.
Declaration
void AddDependency(IController dependency)
Parameters
Type | Name | Description |
---|---|---|
IController | dependency | The dependency to add. |
Configure()
Configures the controller and calls the Configured event. Properties must be set and the controller must be stopped.
Declaration
void Configure()
GetDependencies()
Gets the list of the dependencies.
Declaration
List<IController> GetDependencies()
Returns
Type | Description |
---|---|
List<IController> | The list of the dependencies of this instance. |
RemoveDependency(IController)
Remove a dependency. The controller must be stopped.
Declaration
void RemoveDependency(IController dependency)
Parameters
Type | Name | Description |
---|---|---|
IController | dependency | The dependency to remove. |
StartController()
Starts the controller and calls the Started event. The controller must be configured, ready and stopped.
Declaration
void StartController()
StopController()
Stops the controller and calls the Stopped event. The controller must be configured and started.
Declaration
void StopController()
Events
| Improve this Doc View SourceConfigured
Called when the controller is configured.
Declaration
event EventHandler Configured
Event Type
Type | Description |
---|---|
EventHandler |
Ready
Called when the controller is configured and ready to be started, when all its dependencies started.
Declaration
event EventHandler Ready
Event Type
Type | Description |
---|---|
EventHandler |
Started
Called when the controller is started.
Declaration
event EventHandler Started
Event Type
Type | Description |
---|---|
EventHandler |
Stopped
Called when the controller is stopped.
Declaration
event EventHandler Stopped
Event Type
Type | Description |
---|---|
EventHandler |