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

A component that is an abstraction of a dimmable light.
Inheritance: DimmableLightBase
显示文件 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
DimmableLightComponent ( IGpio pin, Int32 min, Int32 max ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.DimmableLightComponent class with the pin controlling the light and the minimum and maximum light level.

Dispose ( ) : void

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

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

Method Details

DimmableLightComponent() public method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.DimmableLightComponent class with the pin controlling the light and the minimum and maximum light level.
/// The pin cannot be null. ///
public DimmableLightComponent ( IGpio pin, Int32 min, Int32 max ) : System
pin IGpio /// The pin used to control the dimmable light. ///
min System.Int32 /// The minimum brightness level. ///
max System.Int32 /// The maximum brightness level. ///
return System

Dispose() public method

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