C# Class CyrusBuilt.MonoPi.Components.Lights.LightComponent

A component that is an abstraction of a light.
Inheritance: LightBase
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode Description
Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Components.Lights.LightComponent object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Lights.LightComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Lights.LightComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Lights.LightComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Lights.LightComponent was occupying.

LightComponent ( IGpio pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.LightComponent class with the pin controlling the light.

Off ( ) : void

Switches the light off.

On ( ) : void

Switches the light on.

Method Details

Dispose() public méthode

Releases all resource used by the CyrusBuilt.MonoPi.Components.Lights.LightComponent object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Lights.LightComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Lights.LightComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Lights.LightComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Lights.LightComponent was occupying.
public Dispose ( ) : void
Résultat void

LightComponent() public méthode

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.LightComponent class with the pin controlling the light.
/// The pin cannot be null. ///
public LightComponent ( IGpio pin ) : System
pin IGpio /// The output pin the light is wired to. ///
Résultat System

Off() public méthode

Switches the light off.
/// The pin is configured for input instead of output. ///
public Off ( ) : void
Résultat void

On() public méthode

Switches the light on.
/// The pin is configured for input instead of output. ///
public On ( ) : void
Résultat void