Class States
- Namespace
- OverKizApi.Models
- Assembly
- OverKizApi.dll
An ordered, name-indexed collection of State objects for a device. Implements IEnumerable<T> so it can be used directly in foreach loops.
[JsonConverter(typeof(StatesJsonConverter))]
public sealed class States : IEnumerable<State>, IEnumerable
- Inheritance
-
States
- Implements
- Inherited Members
Remarks
Initialises the collection from an optional sequence of states.
Constructors
States(IEnumerable<State>?)
An ordered, name-indexed collection of State objects for a device. Implements IEnumerable<T> so it can be used directly in foreach loops.
public States(IEnumerable<State>? states = null)
Parameters
statesIEnumerable<State>Initial states; pass null or omit for an empty collection.
Remarks
Initialises the collection from an optional sequence of states.
Properties
this[string]
public State? this[string name] { get; }
Parameters
namestringQualified state name (e.g.
"core:ClosureState").
Property Value
Methods
Contains(string)
Returns true if a state with the given qualified name is present.
public bool Contains(string name)
Parameters
namestringQualified state name to look up.
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<State> GetEnumerator()
Returns
- IEnumerator<State>
An enumerator that can be used to iterate through the collection.