-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,432 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/Microsoft.TestPlatform.Client/TestSession/InProcessTestSessionEventsHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System; | ||
|
||
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; | ||
|
||
namespace Microsoft.VisualStudio.TestPlatform.Client; | ||
|
||
internal class InProcessTestSessionEventsHandler : ITestSessionEventsHandler | ||
{ | ||
private readonly ITestSessionEventsHandler _testSessionEventsHandler; | ||
|
||
public EventHandler<StartTestSessionCompleteEventArgs?>? StartTestSessionCompleteEventHandler { get; set; } | ||
|
||
public EventHandler<StopTestSessionCompleteEventArgs?>? StopTestSessionCompleteEventHandler { get; set; } | ||
|
||
public InProcessTestSessionEventsHandler(ITestSessionEventsHandler testSessionEventsHandler) | ||
{ | ||
_testSessionEventsHandler = testSessionEventsHandler; | ||
} | ||
|
||
public void HandleLogMessage(TestMessageLevel level, string? message) | ||
{ | ||
_testSessionEventsHandler.HandleLogMessage(level, message); | ||
} | ||
|
||
public void HandleRawMessage(string rawMessage) | ||
{ | ||
_testSessionEventsHandler.HandleRawMessage(rawMessage); | ||
} | ||
|
||
public void HandleStartTestSessionComplete(StartTestSessionCompleteEventArgs? eventArgs) | ||
{ | ||
StartTestSessionCompleteEventHandler?.Invoke(this, eventArgs); | ||
_testSessionEventsHandler.HandleStartTestSessionComplete(eventArgs); | ||
} | ||
|
||
public void HandleStopTestSessionComplete(StopTestSessionCompleteEventArgs? eventArgs) | ||
{ | ||
StopTestSessionCompleteEventHandler?.Invoke(this, eventArgs); | ||
_testSessionEventsHandler.HandleStopTestSessionComplete(eventArgs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.