C# Класс CyrusBuilt.MonoPi.Components.Lights.LightComponent

A component that is an abstraction of a light.
Наследование: LightBase
Показать файл Открыть проект

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

Метод Описание
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.

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

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

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
Результат void

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

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. ///
Результат System

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

Switches the light off.
/// The pin is configured for input instead of output. ///
public Off ( ) : void
Результат void

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

Switches the light on.
/// The pin is configured for input instead of output. ///
public On ( ) : void
Результат void