StateValueCollection Class

StateValueCollection is a strongly-typed collection that is enumerable by both COM and .NET. The IStateValueCollection, IEnumerator and IEnumerable interfaces provide this polymorphism.

Definition

Namespace: ASCOM.DeviceInterface
Assembly: ASCOM.DeviceInterfaces (in ASCOM.DeviceInterfaces.dll) Version: 7.1.3+4851.c5da65c2b
C#
public class StateValueCollection : IStateValueCollection, 
	IEnumerable, IDisposable
Inheritance
Object    StateValueCollection
Implements
IStateValueCollection, IEnumerable, IDisposable

Remarks

See Device State Implementation and Requirements for further information on how to implement DeviceState, which properties to include, and the implementation support provided by the Platform.

Constructors

StateValueCollection Create an empty state value collection
StateValueCollection(ListIStateValue) Create a state value collection populated with values a list of objects that implement IStateValue
StateValueCollection(ListStateValue) Create a state value collection populated with values a list of StateValue objects
StateValueCollection(StateValue) Create a state value collection populated with values from an array of StateValue objects

Properties

Count The number of state values in the collection
Item Returns the state value as an IStateValue object at the given index into the collection.

Methods

Add(IStateValue) Add an object that implements IStateValue to the state value collection.
Add(String, Object) Add a new state value with the given name and value
AddLocalDateTime Add the local date and time to the state value collection.
AddUtcDateTime Add the UTC date and time to the state value collection.
Dispose Dispose of the state value collection.
GetEnumerator An enumerator that enables items in the collection to be retrieved

See Also