/// <summary> /// Get Known Profile's Xmls from specified interfaces /// </summary> /// <param name="wlanIface"></param> /// <param name="isProtected">if false, key material not encrypted</param> /// <returns></returns> public List <string> GetKnownProfileXmls(WlanInterface wlanIface, bool isProtected = true) { List <string> profiles = new List <string>(); if (_client.NoWifiAvailable) { return(null); } string[] rawProfileInfo = wlanIface.GetProfilesXml(isProtected); foreach (string profileInfo in rawProfileInfo) { bool anotherInstanceWithProfileExists = rawProfileInfo.Any(n => n.Equals(profileInfo) && !string.IsNullOrEmpty(n)); if (!anotherInstanceWithProfileExists) { profiles.Add(profileInfo); } } return(profiles); }