Loading WindowsDevicePortalWrapper/UnitTestProject/WDPMockImplementations/WebSocket.cs +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Stops listneing for messages from the websocket and closes the connection to the websocket. /// </summary> /// <returns>The task of closing the websocket connection.</returns> #pragma warning disable 1998 private async Task StopListeningForMessagesInternal() { if (this.IsListeningForMessages) Loading @@ -68,6 +69,7 @@ namespace Microsoft.Tools.WindowsDevicePortal } } } #pragma warning restore 1998 /// <summary> /// Connects to the websocket and starts listening for messages from the websocket. Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/PerceptionSimulationPlayback.cs +38 −18 Original line number Diff line number Diff line Loading @@ -62,10 +62,42 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> public static readonly string HolographicSimulationPlaybackDataTypesApi = "api/holographic/simulation/playback/session/types"; /// <summary> /// Enumeration describing the available Holgraphic Simulation playback states. /// </summary> public enum HolographicSimulationPlaybackStates { /// <summary> /// The simulation has been stopped. /// </summary> Stopped = 0, /// <summary> /// The simulation is playing. /// </summary> Playing, /// <summary> /// The simulation has been paused. /// </summary> Paused, /// <summary> /// Playback has completed. /// </summary> Complete, /// <summary> /// Playback is in an unexpected / unknown state. /// </summary> Unexpected = 9999 } /// <summary> /// Deletes the specified Holographic Simulation recording. /// </summary> /// <param name="name">The name of the recording to delete (ex: testsession.xef).</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task DeleteHolographicSimulationRecording(string name) { Loading Loading @@ -94,7 +126,7 @@ namespace Microsoft.Tools.WindowsDevicePortal throw new NotSupportedException("This method is only supported on HoloLens."); } HolographicSimulationPlaybackStates playbackState = HolographicSimulationPlaybackStates.Unknown; HolographicSimulationPlaybackStates playbackState = HolographicSimulationPlaybackStates.Unexpected; string payload = string.Format( "recording={0}", Loading Loading @@ -135,6 +167,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Loads the specified Holographic Simulation recording. /// </summary> /// <param name="name">The name of the recording to load (ex: testsession.xef).</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task LoadHolographicSimulationRecording(string name) { Loading @@ -154,6 +187,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Unloads the specified Holographic Simulation recording. /// </summary> /// <param name="name">The name of the recording to unload (ex: testsession.xef).</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task UnloadHolographicSimulationRecording(string name) { Loading @@ -170,20 +204,6 @@ namespace Microsoft.Tools.WindowsDevicePortal } #region Data contract /// <summary> /// Enumeration describing the available Holgraphic Simulation playback states. /// </summary> public enum HolographicSimulationPlaybackStates { Unknown = -1, Stopped = 0, Playing, Paused, Complete, Unexpected = 9999 } /// <summary> /// Object representation of the Holographic Simulation playback state /// </summary> Loading @@ -194,7 +214,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Gets the state value as a string /// </summary> [DataMember(Name = "state")] public string stateRaw { get; private set; } public string StateRaw { get; private set; } /// <summary> /// Gets the playback session state Loading @@ -203,9 +223,9 @@ namespace Microsoft.Tools.WindowsDevicePortal { get { HolographicSimulationPlaybackStates state = HolographicSimulationPlaybackStates.Unknown; HolographicSimulationPlaybackStates state = HolographicSimulationPlaybackStates.Unexpected; switch (stateRaw) switch (this.StateRaw) { case "stopped": state = HolographicSimulationPlaybackStates.Stopped; Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/PerceptionSimulationRecording.cs +1 −1 Original line number Diff line number Diff line Loading @@ -56,8 +56,8 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <param name="recordHands">Should hand data be recorded? The default value is true.</param> /// <param name="recordSpatialMapping">Should Spatial Mapping data be recorded? The default value is true.</param> /// <param name="recordEnvironment">Should environment data be recorded? The default value is true.</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task StartHolographicSimulationRecording( string name, bool recordHead = true, Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.UniversalWindows/HttpRest/WebSocket.cs +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> /// <param name="endpoint">The uri that the weboscket should connect to</param> /// <returns>The task of opening a connection to the websocket.</returns> #pragma warning disable 1998 private async Task StartListeningForMessagesInternal( Uri endpoint) { Loading Loading @@ -74,6 +75,7 @@ namespace Microsoft.Tools.WindowsDevicePortal // Do not wait on receiving messages. Task connectTask = this.ConnectAsync(endpoint); } #pragma warning restore 1998 /// <summary> /// Opens a connection to the specified websocket API. Loading Loading @@ -127,6 +129,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Closes the connection to the websocket. /// </summary> /// <returns>The task of closing the websocket connection.</returns> #pragma warning disable 1998 private async Task StopListeningForMessagesInternal() { if (this.IsListeningForMessages) Loading @@ -140,5 +143,6 @@ namespace Microsoft.Tools.WindowsDevicePortal } } } #pragma warning restore 1998 } } Loading
WindowsDevicePortalWrapper/UnitTestProject/WDPMockImplementations/WebSocket.cs +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Stops listneing for messages from the websocket and closes the connection to the websocket. /// </summary> /// <returns>The task of closing the websocket connection.</returns> #pragma warning disable 1998 private async Task StopListeningForMessagesInternal() { if (this.IsListeningForMessages) Loading @@ -68,6 +69,7 @@ namespace Microsoft.Tools.WindowsDevicePortal } } } #pragma warning restore 1998 /// <summary> /// Connects to the websocket and starts listening for messages from the websocket. Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/PerceptionSimulationPlayback.cs +38 −18 Original line number Diff line number Diff line Loading @@ -62,10 +62,42 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> public static readonly string HolographicSimulationPlaybackDataTypesApi = "api/holographic/simulation/playback/session/types"; /// <summary> /// Enumeration describing the available Holgraphic Simulation playback states. /// </summary> public enum HolographicSimulationPlaybackStates { /// <summary> /// The simulation has been stopped. /// </summary> Stopped = 0, /// <summary> /// The simulation is playing. /// </summary> Playing, /// <summary> /// The simulation has been paused. /// </summary> Paused, /// <summary> /// Playback has completed. /// </summary> Complete, /// <summary> /// Playback is in an unexpected / unknown state. /// </summary> Unexpected = 9999 } /// <summary> /// Deletes the specified Holographic Simulation recording. /// </summary> /// <param name="name">The name of the recording to delete (ex: testsession.xef).</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task DeleteHolographicSimulationRecording(string name) { Loading Loading @@ -94,7 +126,7 @@ namespace Microsoft.Tools.WindowsDevicePortal throw new NotSupportedException("This method is only supported on HoloLens."); } HolographicSimulationPlaybackStates playbackState = HolographicSimulationPlaybackStates.Unknown; HolographicSimulationPlaybackStates playbackState = HolographicSimulationPlaybackStates.Unexpected; string payload = string.Format( "recording={0}", Loading Loading @@ -135,6 +167,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Loads the specified Holographic Simulation recording. /// </summary> /// <param name="name">The name of the recording to load (ex: testsession.xef).</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task LoadHolographicSimulationRecording(string name) { Loading @@ -154,6 +187,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Unloads the specified Holographic Simulation recording. /// </summary> /// <param name="name">The name of the recording to unload (ex: testsession.xef).</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task UnloadHolographicSimulationRecording(string name) { Loading @@ -170,20 +204,6 @@ namespace Microsoft.Tools.WindowsDevicePortal } #region Data contract /// <summary> /// Enumeration describing the available Holgraphic Simulation playback states. /// </summary> public enum HolographicSimulationPlaybackStates { Unknown = -1, Stopped = 0, Playing, Paused, Complete, Unexpected = 9999 } /// <summary> /// Object representation of the Holographic Simulation playback state /// </summary> Loading @@ -194,7 +214,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Gets the state value as a string /// </summary> [DataMember(Name = "state")] public string stateRaw { get; private set; } public string StateRaw { get; private set; } /// <summary> /// Gets the playback session state Loading @@ -203,9 +223,9 @@ namespace Microsoft.Tools.WindowsDevicePortal { get { HolographicSimulationPlaybackStates state = HolographicSimulationPlaybackStates.Unknown; HolographicSimulationPlaybackStates state = HolographicSimulationPlaybackStates.Unexpected; switch (stateRaw) switch (this.StateRaw) { case "stopped": state = HolographicSimulationPlaybackStates.Stopped; Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/PerceptionSimulationRecording.cs +1 −1 Original line number Diff line number Diff line Loading @@ -56,8 +56,8 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <param name="recordHands">Should hand data be recorded? The default value is true.</param> /// <param name="recordSpatialMapping">Should Spatial Mapping data be recorded? The default value is true.</param> /// <param name="recordEnvironment">Should environment data be recorded? The default value is true.</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task StartHolographicSimulationRecording( string name, bool recordHead = true, Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.UniversalWindows/HttpRest/WebSocket.cs +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> /// <param name="endpoint">The uri that the weboscket should connect to</param> /// <returns>The task of opening a connection to the websocket.</returns> #pragma warning disable 1998 private async Task StartListeningForMessagesInternal( Uri endpoint) { Loading Loading @@ -74,6 +75,7 @@ namespace Microsoft.Tools.WindowsDevicePortal // Do not wait on receiving messages. Task connectTask = this.ConnectAsync(endpoint); } #pragma warning restore 1998 /// <summary> /// Opens a connection to the specified websocket API. Loading Loading @@ -127,6 +129,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Closes the connection to the websocket. /// </summary> /// <returns>The task of closing the websocket connection.</returns> #pragma warning disable 1998 private async Task StopListeningForMessagesInternal() { if (this.IsListeningForMessages) Loading @@ -140,5 +143,6 @@ namespace Microsoft.Tools.WindowsDevicePortal } } } #pragma warning restore 1998 } }