Skip to main content

Class CharacteristicCollection

Represents a collection of characteristics.

Assembly: Meadow.Contracts.dll​
View Source​
Declaration
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​
Declaration
public int Count { get; }

this[string]​

Gets the characteristic with the specified name or UUID.

View Source​
Declaration
public ICharacteristic? this[string nameOrId] { get; }

this[int]​

Gets the characteristic at the specified index.

View Source​
Declaration
public ICharacteristic? this[int index] { get; }

Methods​

Add(ICharacteristic)​

Adds a characteristic to the collection.

View Source​
Declaration
public void Add(ICharacteristic characteristic)
Parameters​
TypeNameDescription
Meadow.Gateways.Bluetooth.ICharacteristiccharacteristicThe characteristic to add.

AddRange(IEnumerable<ICharacteristic>)​

Adds a range of characteristics to the collection.

View Source​
Declaration
public void AddRange(IEnumerable<ICharacteristic> characteristics)
Parameters​
TypeNameDescription
System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.ICharacteristic>characteristicsThe characteristics to add.

GetEnumerator()​

Returns an enumerator that iterates through the collection.

View Source​
Declaration
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[])