Esempio n. 1
0
        public static string NetworkToStringInCSV(WifiNetworkDto wifiOnAir, char delimiter)
        {
            var isBanned         = wifiOnAir.IsEnabled ? "" : "1";
            var dummy            = "";
            var firstCOnnectWhen = wifiOnAir.FirstConnectWhen.HasValue ? wifiOnAir.FirstConnectWhen.Value.ToString(_cultUS) : "";
            // prevent from further breaking of list load because of ';' in name or pwd or comments
            var nameAdj     = ToStringInCSV(wifiOnAir.Name.ReplaceNullSafe($"{delimiter}", SEMICOLON_REPLACEMENT_IN_CSV));
            var passwordAdj = wifiOnAir.Password.ReplaceNullSafe($"{delimiter}", SEMICOLON_REPLACEMENT_IN_CSV);
            var commentsAdj = wifiOnAir.Provider.ReplaceNullSafe($"{delimiter}", SEMICOLON_REPLACEMENT_IN_CSV);

            return($"{nameAdj}{delimiter}{wifiOnAir.BssID}{delimiter}{passwordAdj}{delimiter}{isBanned}{delimiter}{dummy}{delimiter}{commentsAdj}{delimiter}{wifiOnAir.WpsPin}{delimiter}{firstCOnnectWhen}{delimiter}{wifiOnAir.FirstConnectPublicIP}{delimiter}{wifiOnAir.RouterWebUIIP}{delimiter}{wifiOnAir.FirstConnectMac}{delimiter}{wifiOnAir.FirstCoordLat}{delimiter}{wifiOnAir.FirstCoordLong}{delimiter}{wifiOnAir.FirstCoordAlt}{delimiter}{wifiOnAir.LastCoordLat}{delimiter}{wifiOnAir.LastCoordLong}{delimiter}{wifiOnAir.LastCoordAlt}");
        }
Esempio n. 2
0
 public void CopyTo(WifiNetworkDto dtoDst)
 {
     dtoDst.IsEnabled            = IsEnabled;
     dtoDst.Password             = Password;
     dtoDst.Provider             = Provider;
     dtoDst.WpsPin               = WpsPin;
     dtoDst.FirstConnectWhen     = FirstConnectWhen;
     dtoDst.FirstConnectPublicIP = FirstConnectPublicIP;
     dtoDst.RouterWebUIIP        = RouterWebUIIP;
     dtoDst.FirstConnectMac      = FirstConnectMac;
     dtoDst.FirstCoordLat        = FirstCoordLat;
     dtoDst.FirstCoordLong       = FirstCoordLong;
     dtoDst.FirstCoordAlt        = FirstCoordAlt;
     dtoDst.LastCoordLat         = LastCoordLat;
     dtoDst.LastCoordLong        = LastCoordLong;
     dtoDst.LastCoordAlt         = LastCoordAlt;
 }