Class NativeNetworkAdapterCollection
Provides a collection of .NET native network adapters
Assembly: Meadow.dll
View Source
public class NativeNetworkAdapterCollection : INetworkAdapterCollection, IEnumerable<INetworkAdapter>, IEnumerable
Implements:
Meadow.Hardware.INetworkAdapterCollection, System.Collections.Generic.IEnumerable<Meadow.Hardware.INetworkAdapter>
, System.Collections.IEnumerable
Properties
this[int]
Gets an INetworkAdapter from the collection at a specified index
View Source
public INetworkAdapter this[int index] { get; }
Methods
GetEnumerator()
Gets an enumerator for the collection
View Source
public IEnumerator<INetworkAdapter> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<Meadow.Hardware.INetworkAdapter>
Refresh()
Refreshes the collection
View Source
public Task Refresh()
Returns
System.Threading.Tasks.Task
GetWiredNetworkAdapter(NetworkInterface)
Creates an IWiredNetworkAdapter from a NetworkInterface
View Source
public virtual IWiredNetworkAdapter GetWiredNetworkAdapter(NetworkInterface ni)
Returns
Meadow.Hardware.IWiredNetworkAdapter
Parameters
Type | Name | Description |
---|---|---|
System.Net.NetworkInformation.NetworkInterface | ni | The NetworkInterface for the adapter |
GetWiFiNetworkAdapter(NetworkInterface)
Creates an IWiFiNetworkAdapter from a NetworkInterface
View Source
public virtual IWiFiNetworkAdapter GetWiFiNetworkAdapter(NetworkInterface ni)
Returns
Meadow.Hardware.IWiFiNetworkAdapter
Parameters
Type | Name | Description |
---|---|---|
System.Net.NetworkInformation.NetworkInterface | ni | The NetworkInterface for the adapter |
Events
NetworkConnected
Event raised when a network is connected on any adapter
View Source
public event NetworkConnectionHandler NetworkConnected
Event Type
Meadow.Hardware.NetworkConnectionHandler
NetworkDisconnected
Event raised when a network is disconnected on any adapter
View Source
public event NetworkDisconnectionHandler NetworkDisconnected
Event Type
Meadow.Hardware.NetworkDisconnectionHandler
Implements
- Meadow.Hardware.INetworkAdapterCollection
System.Collections.Generic.IEnumerable<Meadow.Hardware.INetworkAdapter>
System.Collections.IEnumerable
Extension Methods
- System.Collections.Generic.IEnumerable{Meadow.Hardware.INetworkAdapter}.Meadow.ExtensionMethods.Contains``1(Meadow.Hardware.INetworkAdapter[])
- System.Collections.Generic.IEnumerable{Meadow.Hardware.INetworkAdapter}.Meadow.ExtensionMethods.FirstIndexOf``1(Meadow.Hardware.INetworkAdapter[])