diff --git a/WindowsDevicePortalWrapper/UnitTestProject/Core/PerformanceDataTests.cs b/WindowsDevicePortalWrapper/UnitTestProject/Core/PerformanceDataTests.cs
index 5101c52a..f1e470d5 100644
--- a/WindowsDevicePortalWrapper/UnitTestProject/Core/PerformanceDataTests.cs
+++ b/WindowsDevicePortalWrapper/UnitTestProject/Core/PerformanceDataTests.cs
@@ -132,7 +132,7 @@ public void GetSystemPerfWebSocketTest()
/// The to validate.
private static void ValidateRunningProcessesAsync(RunningProcesses runningProcesses)
{
- List processes = new List(runningProcesses.Processes);
+ List processes = runningProcesses.Processes;
// Check some known things about this response.
Assert.AreEqual(2, processes.Count);
diff --git a/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/IoT/IoT_rs1_release.cs b/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/IoT/IoT_rs1_release.cs
index a225de96..dd12df49 100644
--- a/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/IoT/IoT_rs1_release.cs
+++ b/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/IoT/IoT_rs1_release.cs
@@ -5,6 +5,7 @@
//----------------------------------------------------------------------------------------------
using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
@@ -589,7 +590,7 @@ public void GetHeadlessAppsListInfo_IoT()
HeadlessAppsListInfo appsList = getTask.Result;
// Check some known things about this response.
- Assert.AreEqual(true, appsList.AppPackages[0].IsStartup);
+ Assert.AreEqual(true, appsList.AppPackages.First().IsStartup);
}
///
@@ -771,7 +772,7 @@ public void GetIcsInterfacesInfo_IoT()
IscInterfacesInfo icsInterfaceInfo = getTask.Result;
// Check some known things about this response.
- Assert.AreEqual("Broadcom 802.11n Wireless SDIO Adapter", icsInterfaceInfo.PrivateInterfaces[0]);
+ Assert.AreEqual("Broadcom 802.11n Wireless SDIO Adapter", icsInterfaceInfo.PrivateInterfaces.First());
}
///
diff --git a/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_rs1_xbox_rel_1608.cs b/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_rs1_xbox_rel_1608.cs
index bfb97c82..91c2335f 100644
--- a/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_rs1_xbox_rel_1608.cs
+++ b/WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_rs1_xbox_rel_1608.cs
@@ -669,7 +669,7 @@ public void SetXboxLiveSandboxTest()
/// The to validate.
private static void ValidateRunningProcessesAsync(RunningProcesses runningProcesses)
{
- List processes = new List(runningProcesses.Processes);
+ List processes = runningProcesses.Processes;
// Check some known things about this response.
Assert.AreEqual(75, processes.Count);
diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/PerformanceData.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/PerformanceData.cs
index 1b2f835a..16322971 100644
--- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/PerformanceData.cs
+++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/PerformanceData.cs
@@ -412,7 +412,7 @@ public class RunningProcesses
/// Gets list of running processes.
///
[DataMember(Name = "Processes")]
- public DeviceProcessInfo[] Processes { get; private set; }
+ public List Processes { get; private set; }
///
/// Checks to see if this process Id is in the list of processes
@@ -423,18 +423,14 @@ public bool Contains(int processId)
{
bool found = false;
- if (this.Processes != null)
+ foreach (DeviceProcessInfo pi in this.Processes)
{
- foreach (DeviceProcessInfo pi in this.Processes)
+ if (pi.ProcessId == processId)
{
- if (pi.ProcessId == processId)
- {
- found = true;
- break;
- }
+ found = true;
+ break;
}
}
-
return found;
}
@@ -448,21 +444,17 @@ public bool Contains(string packageName, bool caseSensitive = true)
{
bool found = false;
- if (this.Processes != null)
+ foreach (DeviceProcessInfo pi in this.Processes)
{
- foreach (DeviceProcessInfo pi in this.Processes)
+ if (string.Compare(
+ pi.PackageFullName,
+ packageName,
+ caseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase) == 0)
{
- if (string.Compare(
- pi.PackageFullName,
- packageName,
- caseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase) == 0)
- {
- found = true;
- break;
- }
+ found = true;
+ break;
}
}
-
return found;
}
}
diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/ApplicationManager.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/ApplicationManager.cs
index a7881c25..ee0f3a2c 100644
--- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/ApplicationManager.cs
+++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/ApplicationManager.cs
@@ -5,6 +5,7 @@
//----------------------------------------------------------------------------------------------
using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Threading.Tasks;
@@ -119,7 +120,7 @@ public class AppsListInfo
/// Gets or sets the application packages
///
[DataMember(Name = "AppPackages")]
- public AppPackage[] AppPackages { get; private set; }
+ public List AppPackages { get; private set; }
}
[DataContract]
@@ -148,7 +149,7 @@ public class HeadlessAppsListInfo
/// Gets the list of headless application packages
///
[DataMember(Name = "AppPackages")]
- public AppPackage[] AppPackages { get; private set; }
+ public List AppPackages { get; private set; }
}
#endregion // Data contract
diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/BluetoothConnectivity.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/BluetoothConnectivity.cs
index 34b1d2ba..740f7cb2 100644
--- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/BluetoothConnectivity.cs
+++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/BluetoothConnectivity.cs
@@ -9,6 +9,7 @@
using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Threading;
+using System.Collections.Generic;
namespace Microsoft.Tools.WindowsDevicePortal
{
@@ -359,7 +360,7 @@ public class AvailableBluetoothDevicesInfo
/// Returns a list of available devices
///
[DataMember(Name = "AvailableDevices")]
- public BluetoothDeviceInfo[] AvailableDevices;
+ public List AvailableDevices { get; private set; }
}
public class BluetoothDeviceInfo
{
@@ -386,7 +387,7 @@ public class PairedBluetoothDevicesInfo
/// Returns a list of paired devices
///
[DataMember(Name = "PairedDevices")]
- public BluetoothDeviceInfo[] PairedDevices;
+ public List PairedDevices { get; private set; }
}
///
@@ -399,7 +400,7 @@ public class PairBluetoothDevicesInfo
/// Returns the pair results
///
[DataMember(Name = "PairResult")]
- public PairResult PairResult;
+ public PairResult PairResult { get; private set; }
}
public class PairResult
diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/DeviceInfo.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/DeviceInfo.cs
index fded71c2..bf82ecfb 100644
--- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/DeviceInfo.cs
+++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/DeviceInfo.cs
@@ -5,6 +5,7 @@
//----------------------------------------------------------------------------------------------
using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Threading.Tasks;
@@ -245,7 +246,7 @@ public class TimezoneInfo
/// Gets the list of all timezones
///
[DataMember(Name = "Timezones")]
- public Timezone[] Timezones { get; private set; }
+ public List Timezones { get; private set; }
}
///
@@ -345,7 +346,7 @@ public class ControllerDriverInfo
/// Gets the list of all the controller drivers information
///
[DataMember(Name = "ControllersDrivers")]
- public string[] ControllersDrivers { get; private set; }
+ public List ControllersDrivers { get; private set; }
///
/// Gets the request for reboot
@@ -383,7 +384,7 @@ public class DisplayResolutionInfo
/// Gets the list of resolution specifications
///
[DataMember(Name = "Resolutions")]
- public Resolution[] Resolutions { get; private set; }
+ public List Resolutions { get; private set; }
}
///
diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/IcsManager.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/IcsManager.cs
index b598db67..5ffff40a 100644
--- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/IcsManager.cs
+++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/IcsManager.cs
@@ -5,6 +5,7 @@
//----------------------------------------------------------------------------------------------
using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Threading.Tasks;
@@ -71,13 +72,13 @@ public class IscInterfacesInfo
/// Gets the internet connection sharing(ICS) private interfaces.
///
[DataMember(Name = "PrivateInterfaces")]
- public string[] PrivateInterfaces { get; private set; }
+ public List PrivateInterfaces { get; private set; }
///
/// Gets the internet connection sharing(ICS) public interfaces.
///
[DataMember(Name = "PublicInterfaces")]
- public string[] PublicInterfaces { get; private set; }
+ public List PublicInterfaces { get; private set; }
}
#endregion // Data contract
}
diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/Limpet.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/Limpet.cs
index eaeee9d0..ce0cfa4c 100644
--- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/Limpet.cs
+++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/IoT/Limpet.cs
@@ -5,6 +5,7 @@
//----------------------------------------------------------------------------------------------
using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Threading.Tasks;
@@ -160,7 +161,7 @@ public class TpmAcpiTablesInfo
/// Gets TPM ACPI Tables.
///
[DataMember(Name = "AcpiTables")]
- public string[] AcpiTables { get; private set; }
+ public List AcpiTables { get; private set; }
}
///