Skip to content

Commit

Permalink
Fixed typo in StatusId
Browse files Browse the repository at this point in the history
  • Loading branch information
sthewissen committed Dec 10, 2024
1 parent 7e5e425 commit f2d3e62
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion samples/NetworkData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public class NetworkDataModel
{
public int StausId { get; set; }
public int StatusId { get; set; }
public string? Ssid { get; set; }
public string? SsidName { get { return string.IsNullOrWhiteSpace(Ssid) ? "Unknown" : Ssid; } }
public int IpAddress { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions samples/ScanListPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private async void ExecuteConnectCommand(NetworkDataModel model)

private async void ExecuteInfoCommand(NetworkDataModel model)
{
var info = $"StatusId: {model.StausId}, " +
var info = $"StatusId: {model.StatusId}, " +
$"Ssid: {model.SsidName}, " +
$"IpAddress: {model.IpAddress}, " +
$"GatewayAddress: {model.GatewayAddress ?? "N/A"}, " +
Expand All @@ -59,7 +59,7 @@ private async Task GetWifiList()
{
networkDataModel.Add(new NetworkDataModel()
{
StausId = item.StausId,
StatusId = item.StatusId,
IpAddress = (int)item.IpAddress,
Bssid = item.Bssid,
Ssid = item.Ssid,
Expand Down
2 changes: 1 addition & 1 deletion src/MAUIWifiManager/NetworkData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Plugin.MauiWifiManager.Abstractions
{
public class NetworkData
{
public int StausId { get; set; }
public int StatusId { get; set; }
public string? Ssid { get; set; }
public int IpAddress { get; set; }
public string? GatewayAddress { get; set; }
Expand Down
10 changes: 5 additions & 5 deletions src/MAUIWifiManager/WifiNetworkService.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public async Task<NetworkData> GetNetworkInfo()
var wifiManager = _context.GetSystemService(Context.WifiService) as WifiManager;
if (wifiManager != null && wifiManager.IsWifiEnabled)
{
_networkData.StausId = 1;
_networkData.StatusId = 1;
_networkData.Ssid = wifiManager.ConnectionInfo?.SSID?.Trim(new char[] { '"', '\"' });
_networkData.Bssid = wifiManager.ConnectionInfo?.BSSID;
_networkData.SignalStrength = wifiManager.ConnectionInfo?.Rssi;
Expand Down Expand Up @@ -165,7 +165,7 @@ public async Task<NetworkData> GetNetworkInfo()

if (wifiInfo != null && wifiInfo.SupplicantState == SupplicantState.Completed)
{
_networkData.StausId = 1;
_networkData.StatusId = 1;
_networkData.Ssid = wifiInfo?.SSID?.Trim(new char[] { '"', '\"' });
_networkData.Bssid = wifiInfo?.BSSID;
_networkData.IpAddress = wifiInfo?.IpAddress ?? 0;
Expand Down Expand Up @@ -285,7 +285,7 @@ private async Task<NetworkData> AddWifiSuggestion(string ssid, string psk)
{
if (wifiInfo.SupplicantState == SupplicantState.Completed)
{
_networkData.StausId = 1;
_networkData.StatusId = 1;
_networkData.Ssid = wifiInfo?.SSID?.Trim(new char[] { '"', '\"' });
_networkData.Bssid = wifiInfo?.BSSID;
_networkData.IpAddress = wifiInfo?.IpAddress ?? 0;
Expand Down Expand Up @@ -321,7 +321,7 @@ private async Task<NetworkData> AddWifiSuggestion(string ssid, string psk)
{
if (OperatingSystem.IsAndroidVersionAtLeast(30) && !OperatingSystem.IsAndroidVersionAtLeast(31))
{
_networkData.StausId = 1;
_networkData.StatusId = 1;
_networkData.Ssid = wifiManager.ConnectionInfo?.SSID?.Trim(new char[] { '"', '\"' });
_networkData.Bssid = wifiManager.ConnectionInfo?.BSSID;
_networkData.SignalStrength = wifiManager.ConnectionInfo?.Rssi;
Expand Down Expand Up @@ -389,7 +389,7 @@ public async Task<NetworkData> RequestNetwork(string ssid, string password)
{
if (networkCapabilities.HasCapability(NetCapability.Validated))
{
_networkData.StausId = 1;
_networkData.StatusId = 1;
_networkData.Ssid = wifiManager.ConnectionInfo?.SSID?.Trim(new char[] { '"', '\"' });
_networkData.Bssid = wifiManager.ConnectionInfo?.BSSID;
_networkData.SignalStrength = wifiManager.ConnectionInfo?.Rssi;
Expand Down
2 changes: 1 addition & 1 deletion src/MAUIWifiManager/WifiNetworkService.apple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ CLLocationManager.Status is CLAuthorizationStatus.AuthorizedAlways ||
{
if (CaptiveNetwork.TryCopyCurrentNetworkInfo(item, out NSDictionary? info) == StatusCode.OK)
{
networkData.StausId = 1;
networkData.StatusId = 1;
networkData.Ssid = info?[CaptiveNetwork.NetworkInfoKeySSID].ToString();
networkData.Bssid = info?[CaptiveNetwork.NetworkInfoKeyBSSID].ToString();
networkData.NativeObject = info;
Expand Down
2 changes: 1 addition & 1 deletion src/MAUIWifiManager/WifiNetworkService.uwp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Task<NetworkData> GetNetworkInfo()
{
NetworkData data = new NetworkData();
ConnectionProfile profile = NetworkInformation.GetInternetConnectionProfile();
data.StausId = (int)profile.GetNetworkConnectivityLevel();
data.StatusId = (int)profile.GetNetworkConnectivityLevel();
if (profile.IsWlanConnectionProfile)
{
data.Ssid = profile.WlanConnectionProfileDetails.GetConnectedSsid();
Expand Down

0 comments on commit f2d3e62

Please sign in to comment.