Closed chucker closed 3 years ago
How do we define precedence, though?
Something like this, maybe?
SystemConfiguration
tells us an interface is up, believe itThis introduces a slight inconsistency: Bluetooth PAN shows up (and does not in NU).
IORegistryDataSource
is still missingPing
tab needs a new way to get the selected interface according to preferencesAnything else?
Right now, we have:
INetworkInterfacesService
MacNetworkInterfacesService
, which in turn pulls in from:NativeMethods
, which is a mix ofSystemConfiguration
,IORegistry
and BSD (oof)SCNetworkInterface
, which has moreSystemConfiguration
stuff (and has its ownNativeMethods
)NetworkInterfaceViewModel
, which is yet another data sourceAlso,
GetAvailableInterfaces
reloads the list, butTryFindInterfaceByName
does not. AndGetAvailableInterfaces
is (I believe) called twice, so we have two different instances of the list.We should probably refactor this a lot. Something like:
NetworkInterfaceDataSource
with valuesBsd
,IORegistry
,Mono
, andSystemConfiguration
, and the[Flags]
attributeNetworkInterfacesRepository
, which is a read-only repository, with methods:ReloadAll(NetworkInterfaceDataSource dataSources)
GetByBsdName(string bsdName)
ListAll()
QueryAll(Expression<Func<NetworkInterfaceViewModel, bool>> predicate)
, maybe? or do we just needQueryAllIsUp
?NativeMethods
inner class