Class CharacteristicCollection
Represents a collection of characteristics.
Assembly: Meadow.Contracts.dll
View Source
public class CharacteristicCollection : IEnumerable<ICharacteristic>, IEnumerable
Implements:
System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.ICharacteristic>
, System.Collections.IEnumerable
Properties
Count
Gets the number of characteristics in the collection.
View Source
public int Count { get; }
this[string]
Gets the characteristic with the specified name or UUID.
View Source
public ICharacteristic? this[string nameOrId] { get; }
this[int]
Gets the characteristic at the specified index.
View Source
public ICharacteristic? this[int index] { get; }
Methods
Add(ICharacteristic)
Adds a characteristic to the collection.
View Source
public void Add(ICharacteristic characteristic)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Gateways.Bluetooth.ICharacteristic | characteristic | The characteristic to add. |
AddRange(IEnumerable<ICharacteristic>)
Adds a range of characteristics to the collection.
View Source
public void AddRange(IEnumerable<ICharacteristic> characteristics)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.ICharacteristic> | characteristics | The characteristics to add. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
View Source
public IEnumerator<ICharacteristic> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<Meadow.Gateways.Bluetooth.ICharacteristic>
: An enumerator that can be used to iterate through the collection.
Implements
System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.ICharacteristic>
System.Collections.IEnumerable
Extension Methods
- System.Collections.Generic.IEnumerable{Meadow.Gateways.Bluetooth.ICharacteristic}.Meadow.ExtensionMethods.Contains``1(Meadow.Gateways.Bluetooth.ICharacteristic[])
- System.Collections.Generic.IEnumerable{Meadow.Gateways.Bluetooth.ICharacteristic}.Meadow.ExtensionMethods.FirstIndexOf``1(Meadow.Gateways.Bluetooth.ICharacteristic[])