Exemplo n.º 1
0
        public static JAccessPoint Translate(AccessPoint thisAp)
        {
            WlanInterface        wlanInterface = thisAp.GetFieldValue <WlanInterface>("_interface");
            WlanAvailableNetwork network       = thisAp.GetFieldValue <WlanAvailableNetwork>("_network");
            JAccessPoint         customAp      = new JAccessPoint
            {
                //TODO: Figure out why this line is so damn costly (and maybe replace it with interface Guid)
                InterfaceName            = wlanInterface.InterfaceName,
                Name                     = thisAp.Name,
                SignalStrength           = (int)thisAp.SignalStrength,
                AuthAlgorithm            = Enum.GetName(typeof(Dot11AuthAlgorithm), network.dot11DefaultAuthAlgorithm),
                CipherAlgorithm          = Enum.GetName(typeof(Dot11CipherAlgorithm), network.dot11DefaultCipherAlgorithm),
                BssType                  = Enum.GetName(typeof(Dot11BssType), network.dot11BssType),
                Connectable              = network.networkConnectable,
                WlanNotConnectableReason = Enum.GetName(typeof(WlanReasonCode), network.wlanNotConnectableReason)
            };

            return(customAp);
        }