public async Task ForceUpdate(IWifiInterface @interface, CancellationToken token = default) { var selectedInterface = _wlanClient.Interfaces.Single(wlanInterface => GetInterfaceId(wlanInterface) == @interface.Name); await selectedInterface.Scan(token); }
public async Task <string> GetConnected(IWifiInterface @interface, CancellationToken token = default) { var selectedInterface = _wlanClient.Interfaces.Single(wlanInterface => GetInterfaceId(wlanInterface) == @interface.Name); await Task.FromResult <object?>(null); return(NetworkInfo.BssidToMac(selectedInterface.CurrentConnection.wlanAssociationAttributes.dot11Bssid)); }
public async IAsyncEnumerable <INetworkInfo> ReadNetworks(IWifiInterface @interface, [EnumeratorCancellation] CancellationToken token = default) { var selectedInterface = _wlanClient.Interfaces.Single(wlanInterface => GetInterfaceId(wlanInterface) == @interface.Name); await Task.FromResult <object?>(null); var networkBssList = selectedInterface.GetNetworkBssList(); foreach (var entry in networkBssList) { token.ThrowIfCancellationRequested(); yield return(new NetworkInfo(entry)); } }