[WPF] ConnectivityImplementation->ToConnectionTypes -> ArgumentOutOfRangeException for ConnectionType = 53 (IF_TYPE_PROP_VIRTUAL)
RwSgxx opened this issue · 2 comments
@jamesmontemagno
I know that we should use Xamarin.Essentials, but we are working with Xamarin Forms on WPF, and Xamarin.Essentials is not supported on WPF.
Bug Information
Version Number of Plugin: 3.2.0
Device Tested On: PC
Simulator Tested On: -
Version of VS: 16.6.2
Version of Xamarin: 4.6.0.847
Versions of other things you are using:
Steps to reproduce the Behavior
Install NordVPN (probably most VPNs) -> it will create a network interface of type 53 (IF_TYPE_PROP_VIRTUAL).
Use the plugin in a .Net framework application (WPF)
Expected Behavior
It should just say that the ConnectionType = ConnectionType.Other instead of the ArgumentOutOfRangeException .
This interface type 53 (IF_TYPE_PROP_VIRTUAL) is not mapped in .Net, but it exists in windows:
ipifcons.h
Actual Behavior
This network interface type will result in an ArgumentOutOfRangeException in
src\Connectivity.Plugin.Net45\ConnectivityImplementation.cs -> ConnectivityImplementation -> ToConnectionTypes
Code snippet
Screenshots
Thank you!
I have the same problem...
I have same issue. Can the ToConnectionTypes method in ConnectivityImplementation.cs be changed to "return ConnectionType.Other" in the default case instead of throwing an Argument out of range exception?