Skip to main content

Class ServiceCollection

Represents a collection of Bluetooth services.

Assembly: Meadow.Contracts.dll
View Source
public class ServiceCollection : IEnumerable<IService>, IEnumerable

Implements:
System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.IService>, System.Collections.IEnumerable

Properties

Count

Gets the number of services in the collection.

View Source
public int Count { get; }

this[string]

Gets the service with the specified name.

View Source
public IService? this[string serviceName] { get; }

this[int]

Gets the service at the specified index.

View Source
public IService? this[int index] { get; }

Methods

Add(IService)

Adds a service to the collection.

View Source
public void Add(IService service)
Parameters
TypeNameDescription
Meadow.Gateways.Bluetooth.IServiceserviceThe service to add.

AddRange(IEnumerable<IService>)

Adds a range of services to the collection.

View Source
public void AddRange(IEnumerable<IService> services)
Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.IService>servicesThe services to add.

GetEnumerator()

Returns an enumerator that iterates through the collection.

View Source
public IEnumerator<IService> GetEnumerator()
Returns

System.Collections.Generic.IEnumerator<Meadow.Gateways.Bluetooth.IService>: An enumerator that can be used to iterate through the collection.

Implements

  • System.Collections.Generic.IEnumerable<Meadow.Gateways.Bluetooth.IService>
  • System.Collections.IEnumerable

Extension Methods

  • System.Collections.Generic.IEnumerable{Meadow.Gateways.Bluetooth.IService}.Meadow.ExtensionMethods.Contains``1(Meadow.Gateways.Bluetooth.IService[])
  • System.Collections.Generic.IEnumerable{Meadow.Gateways.Bluetooth.IService}.Meadow.ExtensionMethods.FirstIndexOf``1(Meadow.Gateways.Bluetooth.IService[])