C# 클래스 CyrusBuilt.MonoPi.Components.Lights.LightComponent

A component that is an abstraction of a light.
상속: LightBase
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
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