protected virtual ConnectionType Convert(NWInterfaceType networkType)
 {
     return(networkType switch
     {
         NWInterfaceType.Cellular => ConnectionType.Cellular,
         NWInterfaceType.Wifi => ConnectionType.WiFi,
         _ => ConnectionType.Other
     });
Beispiel #2
0
 public NWPathMonitor(NWInterfaceType interfaceType)
 {
     InitializeHandle(nw_path_monitor_create_with_type(interfaceType));
     _SetUpdatedSnapshotHandler(SetUpdatedSnapshotHandlerWrapper);
 }
Beispiel #3
0
 extern static IntPtr nw_path_monitor_create_with_type(NWInterfaceType interfaceType);
Beispiel #4
0
 public NWPathMonitor(NWInterfaceType interfaceType)
 {
     InitializeHandle(nw_path_monitor_create_with_type(interfaceType));
 }
Beispiel #5
0
 public bool UsesInterfaceType(NWInterfaceType type) => nw_path_uses_interface_type(GetCheckedHandle(), type);
Beispiel #6
0
 extern static bool nw_path_uses_interface_type(IntPtr handle, NWInterfaceType type);