Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
262d065
DeviceLab sample
GregPettyjohn Aug 12, 2016
94cca6f
This is what I showed to Dave
GregPettyjohn Aug 12, 2016
46cabd4
Committing so that I can change machines and not loose my work
GregPettyjohn Aug 22, 2016
aaa9c91
Added a bunch of finishing touches
GregPettyjohn Aug 24, 2016
d543959
Merge remote-tracking branch 'upstream/master'
GregPettyjohn Aug 24, 2016
cfd71a8
Latest polish
GregPettyjohn Aug 29, 2016
078c278
Added a nifty CommandSequence class
GregPettyjohn Aug 29, 2016
7a1388e
Implemented a nifty CommandSequence class and then used it for the De…
GregPettyjohn Aug 30, 2016
b8e1484
Merge remote-tracking branch 'upstream/master'
GregPettyjohn Aug 30, 2016
66cd7f7
Code cleanup + style cop. Checking in for demo
GregPettyjohn Aug 30, 2016
1239e90
Finished satisfyint StyleCop
GregPettyjohn Sep 1, 2016
331267b
Syncing with latest from the main fork
GregPettyjohn Sep 1, 2016
81712df
Merge remote-tracking branch 'upstream/master'
GregPettyjohn Sep 7, 2016
99007d8
Committing before merging changes from upstream
GregPettyjohn Sep 12, 2016
6a8a32b
Merge remote-tracking branch 'upstream/master'
GregPettyjohn Sep 12, 2016
ab8eed0
Integrated the new DeviceSignIn view. Fixed the timing issue in the r…
GregPettyjohn Sep 21, 2016
da099b2
Merge remote-tracking branch 'upstream/master'
GregPettyjohn Sep 21, 2016
a49bab9
Renamed DeviceLab to SampleDeviceCollection
GregPettyjohn Sep 23, 2016
377b3c2
Added finishing touches to the code. Getting it ready for a pull request
GregPettyjohn Sep 28, 2016
cfa9144
Breaking Change: Updating async methods to follow C# async naming con…
hpsin Oct 11, 2016
7e28aae
Merge the latest from the upstream repo
GregPettyjohn Oct 12, 2016
c8bef65
Update calls into the wrapper to use the latest async naming convention
GregPettyjohn Oct 12, 2016
870c303
Not tracking sync.cmd
GregPettyjohn Oct 12, 2016
6991238
Ended up with a stray orig file. Deleting
GregPettyjohn Oct 12, 2016
d1941d9
Change array return types to Lists for #189 (#191)
hpsin Oct 15, 2016
175a541
App, process, and crash dump collection APIs (#193)
hpsin Oct 17, 2016
bb4bc56
Merge pull request #192 from GregPettyjohn/master
Oct 17, 2016
0a6f579
add file type association for appxbundle
Oct 19, 2016
a3af3bc
tweak appxbundle association
Oct 19, 2016
0d482e0
fix GetMrcFileDataAsync
Oct 27, 2016
3645ccd
remove manifest change
Oct 27, 2016
351016f
Merge pull request #198 from davidkline-ms/master
Oct 27, 2016
3256c14
completes implementation of the mixed reality capture api (issue 71)
Oct 31, 2016
565886c
append Async to the new methods
Oct 31, 2016
0e295c6
Merge pull request #199 from davidkline-ms/master
Oct 31, 2016
53cecb0
complete implementation of Holographic Perception Simulation Playback…
Oct 31, 2016
4c334ad
Merge pull request #200 from davidkline-ms/master
Oct 31, 2016
2e37027
implement holographic services API
Oct 31, 2016
826aa7f
Merge remote-tracking branch 'upstream/master'
Oct 31, 2016
18f3b28
add comments, fix style warnings
Oct 31, 2016
f8e9bf9
Merge pull request #201 from davidkline-ms/master
Nov 2, 2016
9458038
partial implementation of holographic perception
Nov 4, 2016
704133e
pr feedback change
Nov 4, 2016
d44e771
partial implementation of holographic perception (#202)
Nov 4, 2016
eec2f23
Merge remote-tracking branch 'upstream/master'
Nov 4, 2016
32d51c5
increase wrapper version to 0.9.2
Nov 29, 2016
3574f9a
cleanup
Nov 29, 2016
0dc303d
pr feedback
Nov 29, 2016
5683e09
Merge pull request #203 from davidkline-ms/master
Nov 29, 2016
d69b6aa
v0.9.2 release
hpsin Nov 30, 2016
6dcab45
Fix failing MRC test
hpsin Dec 1, 2016
4be3757
Add release steps 
hpsin Dec 1, 2016
0e24f5d
Add an IsFolder method to FileOrFolderInformation class. (#207)
WilliamsJason Jan 24, 2017
6b8a62b
Adds PackageOrigin to PackageInfo (#210)
WilliamsJason Jan 26, 2017
612ca51
BREAKING CHANGE: ConnectAsync(updateConnection)
Jan 31, 2017
ba41167
Merge pull request #211 from davidkline-ms/master
Jan 31, 2017
6d23ead
increase version number after breaking change to ConnectAsync (#212)
Jan 31, 2017
b4d29f0
Initial implementation of wrapper for the ETW APIs (issue #31)
CBaud Feb 8, 2017
5861be2
Update ETW API tests to validate the contents of the EtwProviders obj…
CBaud Feb 10, 2017
834b52d
Refactor the WebSocket class implementations to decouple the Connect,…
CBaud Feb 14, 2017
74b3137
Implement the Data Contract for the realtime ETW API. (Issue #31)
CBaud Feb 14, 2017
42c7ed8
Update the Data Contract for the realtime ETW API to use the correct …
CBaud Feb 14, 2017
5870eb3
Merge pull request #213 from CBaud/master
Feb 14, 2017
83d12b2
Refactored use of async. (#215)
dotMorten Feb 15, 2017
64078b5
Expose extra ETW Payload in ETW tracing (#220)
hpsin Feb 19, 2017
4575542
Fix unit test build break. (#222)
CBaud Feb 24, 2017
b7c5300
Merge branch 'release' into master
hpsin Feb 24, 2017
faa6f8b
Issue #29: WindowsErrorReporting is unimplemented (#224)
CBaud Feb 27, 2017
6e03903
Update content for WER (#225)
hpsin Feb 27, 2017
4fd8709
Missing using in WER
hpsin Feb 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ Address any review comments, force push to your topic branch, and post a comment

If the pull request review goes well, a project maintainer will merge your changes. Thank you for helping improve the Windows Device Portal Wrapper!

# NuGet release and versioning

**For maintainers**

When creating a new NuGet and GitHub release, the following steps should be taken:
1. Bump the version number as appropriate in master (after 1.0, WDP Wrapper will correctly use semver)
2. Merge from Master to Release, with a PR appropriately named ("v1.2.3 release")
3. Squash and merge commits, leaving major feature entries and fixes in the description.
4. Compile release builds of the .NET and UWP libraries, sign them, and upload to NuGet
5. Cut a new release on GitHub using the same version number ("v1.2.3") and attach the signed libraries to the release.
6. Update code documentation.

# Updating code documentation

Expand Down
405 changes: 146 additions & 259 deletions Samples/SampleWdpClient.UniversalWindows/MainPage.xaml.cs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions WindowsDevicePortalWrapper/MockDataGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ public class Program
new Endpoint(HttpMethods.Get, DevicePortal.IpConfigApi),
new Endpoint(HttpMethods.Get, DevicePortal.SystemPerfApi),
new Endpoint(HttpMethods.Get, DevicePortal.RunningProcessApi),
new Endpoint(HttpMethods.Get, DevicePortal.CustomEtwProvidersApi),
new Endpoint(HttpMethods.Get, DevicePortal.EtwProvidersApi),
new Endpoint(HttpMethods.WebSocket, DevicePortal.SystemPerfApi),
new Endpoint(HttpMethods.WebSocket, DevicePortal.RunningProcessApi),
new Endpoint(HttpMethods.WebSocket, DevicePortal.RealtimeEtwSessionApi),

// HoloLens specific endpoints
new Endpoint(HttpMethods.Get, DevicePortal.HolographicIpdApi),
Expand Down
109 changes: 109 additions & 0 deletions WindowsDevicePortalWrapper/UnitTestProject/Core/EtwTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
//----------------------------------------------------------------------------------------------
// <copyright file="EtwTests.cs" company="Microsoft Corporation">
// Licensed under the MIT License. See LICENSE.TXT in the project root license information.
// </copyright>
//----------------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static Microsoft.Tools.WindowsDevicePortal.DevicePortal;

namespace Microsoft.Tools.WindowsDevicePortal.Tests.Core
{
/// <summary>
/// Test class for ETW APIs.
/// </summary>
[TestClass]
public class EtwTests : BaseTests
{
/// <summary>
/// Basic test of GET method for getting a list of custom registered ETW providers.
/// </summary>
[TestMethod]
public void GetCustomEtwProvidersTest()
{
TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.CustomEtwProvidersApi, HttpMethods.Get);

Task<EtwProviders> getCustomEtwProvidersTask = TestHelpers.Portal.GetCustomEtwProvidersAsync();
getCustomEtwProvidersTask.Wait();

Assert.AreEqual(TaskStatus.RanToCompletion, getCustomEtwProvidersTask.Status);

ValidateEtwProviders(getCustomEtwProvidersTask.Result);
}

/// <summary>
/// Basic test of GET method for getting a list of registered ETW providers.
/// </summary>
[TestMethod]
public void GetEtwProvidersTest()
{
TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.EtwProvidersApi, HttpMethods.Get);

Task<EtwProviders> getEtwProvidersTask = TestHelpers.Portal.GetEtwProvidersAsync();
getEtwProvidersTask.Wait();

Assert.AreEqual(TaskStatus.RanToCompletion, getEtwProvidersTask.Status);

ValidateEtwProviders(getEtwProvidersTask.Result);
}

[TestMethod]
public void GetEtwEventsTest()
{
TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RealtimeEtwSessionApi, HttpMethods.WebSocket);

ManualResetEvent etwEventsReceived = new ManualResetEvent(false);
EtwEvents etwEvents = null;

WindowsDevicePortal.WebSocketMessageReceivedEventHandler<EtwEvents> etwEventsReceivedHandler =
delegate (DevicePortal sender, WebSocketMessageReceivedEventArgs<EtwEvents> args)
{
if (args.Message != null)
{
etwEvents = args.Message;
etwEventsReceived.Set();
}
};

TestHelpers.Portal.RealtimeEventsMessageReceived += etwEventsReceivedHandler;

Task startListeningForEtwEventsTask = TestHelpers.Portal.StartListeningForEtwEventsAsync();
startListeningForEtwEventsTask.Wait();
Assert.AreEqual(TaskStatus.RanToCompletion, startListeningForEtwEventsTask.Status);

etwEventsReceived.WaitOne();

Task stopListeningForEtwEventsTask = TestHelpers.Portal.StopListeningForEtwEventsAsync();
stopListeningForEtwEventsTask.Wait();
Assert.AreEqual(TaskStatus.RanToCompletion, stopListeningForEtwEventsTask.Status);

TestHelpers.Portal.RealtimeEventsMessageReceived -= etwEventsReceivedHandler;

ValidateEtwEvents(etwEvents);
}

/// <summary>
/// Validate the <see cref="EtwEvents"/> returned from the tests.
/// </summary>
/// <param name="etwEvents">The <see cref="EtwEvents"/> to validate.</param>
private static void ValidateEtwEvents(EtwEvents etwEvents)
{
Assert.IsNotNull(etwEvents);
}

/// <summary>
/// Validate the <see cref="EtwProviders"/> returned from the tests.
/// </summary>
/// <param name="etw">The <see cref="EtwProviders"/> to validate.</param>
private static void ValidateEtwProviders(EtwProviders etw)
{
Assert.IsTrue(etw.Providers.Count > 0);
Assert.IsTrue(etw.Providers.All(etwProvider => !string.IsNullOrEmpty(etwProvider.Name)));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//----------------------------------------------------------------------------------------------
// <copyright file="WindowsErrorReportingTests.cs" company="Microsoft Corporation">
// Licensed under the MIT License. See LICENSE.TXT in the project root license information.
// </copyright>
//----------------------------------------------------------------------------------------------

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static Microsoft.Tools.WindowsDevicePortal.DevicePortal;

namespace Microsoft.Tools.WindowsDevicePortal.Tests.Core
{
/// <summary>
/// Test class for Windows Error Reporting (WER) APIs.
/// </summary>
[TestClass]
public class WindowsErrorReportingTests : BaseTests
{
/// <summary>
/// Basic test of GET method for getting a list of Windows Error Reporting (WER) reports.
/// </summary>
[TestMethod]
public void GetWindowsErrorReportsTest()
{
TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.WindowsErrorReportsApi, HttpMethods.Get);

Task<WerDeviceReports> getWerReportsTask = TestHelpers.Portal.GetWindowsErrorReportsAsync();
getWerReportsTask.Wait();

Assert.AreEqual(TaskStatus.RanToCompletion, getWerReportsTask.Status);

List<WerUserReports> deviceReports = getWerReportsTask.Result.UserReports;
Assert.AreEqual(6, deviceReports.Count);
deviceReports.ForEach(userReport =>
{
Assert.IsFalse(string.IsNullOrWhiteSpace(userReport.UserName));
userReport.Reports.ForEach(report =>
{
Assert.AreNotEqual(0, report.CreationTime);
Assert.IsFalse(string.IsNullOrWhiteSpace(report.Name));
switch (report.Type.ToLower())
{
case "queue":
case "archive":
break;
default:
Assert.Fail($"Expected the report type to be 'Queue' or 'Archive'. Actual value is '{report.Type}'.");
break;
}
});
});
}

/// <summary>
/// Basic test of GET method for getting a list of Windows Error Reporting (WER) report files.
/// </summary>
[TestMethod]
public void GetWindowsErrorReportFilesTest()
{
TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.WindowsErrorReportingFilesApi, HttpMethods.Get);

Task<WerFiles> getWerReportingFilesTask = TestHelpers.Portal.GetWindowsErrorReportingFileListAsync(string.Empty, string.Empty, string.Empty);
getWerReportingFilesTask.Wait();

Assert.AreEqual(TaskStatus.RanToCompletion, getWerReportingFilesTask.Status);

List<WerFileInformation> list = getWerReportingFilesTask.Result.Files;
Assert.AreEqual(2, list.Count);
list.ForEach(file =>
{
Assert.IsFalse(string.IsNullOrWhiteSpace(file.Name));
Assert.AreNotEqual(0, file.Size);
});
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Providers" : [{"GUID" : "3A43D90E-530E-41E5-A897-B555516070E2", "Name" : "Provider.One"},{"GUID" : "52B1715B-5AB6-4B48-A61A-A93EE8D4B5CD", "Name" : "Provider-Two"},{"GUID" : "698F02FF-2B63-4CBB-AB06-FEB88011347E", "Name" : "Provider.Three"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Providers" : [{"GUID" : "3A43D90E-530E-41E5-A897-B555516070E2", "Name" : "Provider.One"},{"GUID" : "52B1715B-5AB6-4B48-A61A-A93EE8D4B5CD", "Name" : "Provider-Two"},{"GUID" : "698F02FF-2B63-4CBB-AB06-FEB88011347E", "Name" : "Provider.Three"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Files" : [{"Name" : "DMI59C3.tmp.log.xml", "Size" : 17490},{"Name" : "Report.wer", "Size" : 2354}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"WerReports" : [{"User" : "All Users", "Reports" : []},{"User" : "Default", "Reports" : []},{"User" : "Default User", "Reports" : []},{"User" : "defaultuser0", "Reports" : []},{"User" : "Public", "Reports" : []},{"User" : "SYSTEM", "Reports" : [{"CreationTime" : 131318340058889142, "Name" : "NonCritical_x64_7929388dba23a244febb598fddbb379b5a87d15_00000000_cab_03f96433", "Type" : "Queue"},{"CreationTime" : 131318340058732887, "Name" : "NonCritical_x64_bf8ef24cbbad37c50f759d68f2292f1f2b0e7df_00000000_cab_03f96423", "Type" : "Queue"},{"CreationTime" : 131318550054539960, "Name" : "NonCritical_x64_f52a5825f740cca45c7b0c8078746ec73beaac_00000000_18add298", "Type" : "Archive"},{"CreationTime" : 131318340063576709, "Name" : "NonCritical_x64_f728cd6f9e9f34997130a4d3dd3d855648a6f_00000000_0ca56608", "Type" : "Archive"}]}]}
17 changes: 17 additions & 0 deletions WindowsDevicePortalWrapper/UnitTestProject/UnitTestProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
<ItemGroup>
<Compile Include="BaseTests.cs" />
<Compile Include="Core\AppFileExplorerTests.cs" />
<Compile Include="Core\WindowsErrorReportingTests.cs" />
<Compile Include="Core\EtwTests.cs" />
<Compile Include="Core\PerformanceDataTests.cs" />
<Compile Include="Device-VersionTests\HoloLens\HoloLensHelpers.cs" />
<Compile Include="Device-VersionTests\HoloLens\HoloLens_rs1_release.cs" />
Expand All @@ -85,9 +87,24 @@
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<None Include="MockData\Defaults\api_wer_report_files_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="MockData\Defaults\api_wer_reports_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="MockData\Defaults\WebSocket_api_etw_session_realtime_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="MockData\Defaults\api_etw_providers_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="MockData\Defaults\api_os_devicefamily_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="MockData\Defaults\api_etw_customproviders_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="MockData\Defaults\api_os_info_Default.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private async Task<Stream> DeleteAsync(Uri uri)
{
if (!response.IsSuccessStatusCode)
{
throw new DevicePortalException(response);
throw await DevicePortalException.CreateAsync(response);
}

if (response.Content != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private async Task<Stream> GetAsync(
{
if (!response.IsSuccessStatusCode)
{
throw new DevicePortalException(response);
throw await DevicePortalException.CreateAsync(response);
}

using (HttpContent content = response.Content)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private async Task<Stream> PostAsync(
{
if (!response.IsSuccessStatusCode)
{
throw new DevicePortalException(response);
throw await DevicePortalException.CreateAsync(response);
}

if (response.Content != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private async Task<Stream> PutAsync(
{
if (!response.IsSuccessStatusCode)
{
throw new DevicePortalException(response);
throw await DevicePortalException.CreateAsync(response);
}

if (response.Content != null)
Expand Down
Loading